|
|
@ -10,46 +10,16 @@ |
|
|
@node-click="nodeClick" |
|
|
@node-click="nodeClick" |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
<div :style="'margin-left: 5px;width:'+ (window.pageWidth < 600 ? 350 : window.pageWidth - 200 - 50) + 'px;'"> |
|
|
|
|
|
<div style="display: flex"> |
|
|
|
|
|
<div> |
|
|
|
|
|
<span>体检中心</span> |
|
|
|
|
|
<el-select |
|
|
|
|
|
v-model="organizationId" |
|
|
|
|
|
placeholder="请选择体检中心" |
|
|
|
|
|
style="margin-left: 15px" |
|
|
|
|
|
filterable |
|
|
|
|
|
size="small" |
|
|
|
|
|
@change="changeOrganization" |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in organization" |
|
|
|
|
|
:key="item.id" |
|
|
|
|
|
:label="item.displayName" |
|
|
|
|
|
:value="item.id" |
|
|
|
|
|
> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</div> |
|
|
|
|
|
<!-- |
|
|
|
|
|
<div style="display: flex"> |
|
|
|
|
|
<el-color-picker v-model="color16" @change="chooseColor" /> |
|
|
|
|
|
<el-input v-model="color10" @input="inputColor" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
--> |
|
|
|
|
|
<div style="margin-left: 30px"> |
|
|
|
|
|
<el-button type="success" @click="save" size="small">保存</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div style="margin-top: 2px"> |
|
|
|
|
|
|
|
|
<div :style="'margin-left: 5px;width:'+ (window.pageWidth < 600 ? 350 : window.pageWidth - 200 - 50) + 'px;'"> |
|
|
|
|
|
<div> |
|
|
<el-table |
|
|
<el-table |
|
|
:data="sysParms" |
|
|
:data="sysParms" |
|
|
border |
|
|
border |
|
|
:height="window.pageHeight < 600 ? 418 : window.pageHeight - 182" |
|
|
:height="window.pageHeight < 600 ? 418 : window.pageHeight - 182" |
|
|
size="small" |
|
|
|
|
|
|
|
|
size="small" :span-method="spanMethod" |
|
|
highlight-current-row |
|
|
highlight-current-row |
|
|
> |
|
|
> |
|
|
<el-table-column prop="id" label="参数ID" min-width="150"/> |
|
|
|
|
|
|
|
|
<el-table-column prop="sysParmId" label="参数ID" min-width="150"/> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
prop="displayName" |
|
|
prop="displayName" |
|
|
label="参数名称" |
|
|
label="参数名称" |
|
|
@ -57,6 +27,7 @@ |
|
|
/> |
|
|
/> |
|
|
<el-table-column prop="organizationUnitId" label="体检中心" min-width="100"> |
|
|
<el-table-column prop="organizationUnitId" label="体检中心" min-width="100"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<!-- |
|
|
<el-select |
|
|
<el-select |
|
|
v-model="scope.row.organizationUnitId" |
|
|
v-model="scope.row.organizationUnitId" |
|
|
placeholder="请选择体检中心" |
|
|
placeholder="请选择体检中心" |
|
|
@ -71,6 +42,8 @@ |
|
|
> |
|
|
> |
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
|
|
|
--> |
|
|
|
|
|
<div>{{ dddw(organization,'id',scope.row.organizationUnitId,'displayName')}}</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="sysParmValueName" label="参数值" min-width="80"> |
|
|
<el-table-column prop="sysParmValueName" label="参数值" min-width="80"> |
|
|
@ -98,6 +71,33 @@ |
|
|
<el-table-column prop="remark" label="参数说明" min-width="150"/> |
|
|
<el-table-column prop="remark" label="参数说明" min-width="150"/> |
|
|
</el-table> |
|
|
</el-table> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div style="margin-top:2px; display: flex;justify-content:space-between;"> |
|
|
|
|
|
<!-- |
|
|
|
|
|
<div> |
|
|
|
|
|
<span>体检中心</span> |
|
|
|
|
|
<el-select |
|
|
|
|
|
v-model="organizationId" |
|
|
|
|
|
placeholder="请选择体检中心" |
|
|
|
|
|
style="margin-left: 15px" |
|
|
|
|
|
filterable |
|
|
|
|
|
size="small" |
|
|
|
|
|
@change="changeOrganization" |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in organization" |
|
|
|
|
|
:key="item.id" |
|
|
|
|
|
:label="item.displayName" |
|
|
|
|
|
:value="item.id" |
|
|
|
|
|
> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</div> |
|
|
|
|
|
--> |
|
|
|
|
|
<div></div> |
|
|
|
|
|
<div> |
|
|
|
|
|
<el-button type="success" @click="btnSave" size="small">保存</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</el-card> |
|
|
</el-card> |
|
|
@ -106,7 +106,7 @@ |
|
|
<script> |
|
|
<script> |
|
|
import { mapState } from "vuex"; |
|
|
import { mapState } from "vuex"; |
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
import { tcdate, objCopy } from "../../utlis/proFunc"; |
|
|
|
|
|
|
|
|
import { tcdate, objCopy, dddw } from "../../utlis/proFunc"; |
|
|
export default { |
|
|
export default { |
|
|
components: {}, |
|
|
components: {}, |
|
|
data() { |
|
|
data() { |
|
|
@ -120,6 +120,7 @@ export default { |
|
|
organization: [], //体检中心 |
|
|
organization: [], //体检中心 |
|
|
organizationId: "00000000-0000-0000-0000-000000000000", |
|
|
organizationId: "00000000-0000-0000-0000-000000000000", |
|
|
sysParmTypeId: "", |
|
|
sysParmTypeId: "", |
|
|
|
|
|
spanRow:[], |
|
|
sysParms: [], //系统参数列表 |
|
|
sysParms: [], //系统参数列表 |
|
|
color16: "#409EFF", |
|
|
color16: "#409EFF", |
|
|
color10: 1089274, |
|
|
color10: 1089274, |
|
|
@ -138,15 +139,8 @@ export default { |
|
|
...mapState(["window", "dict"]), |
|
|
...mapState(["window", "dict"]), |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
chooseColor(v) { |
|
|
|
|
|
this.color10 = eval(v.replace("#", "0x")); |
|
|
|
|
|
}, |
|
|
|
|
|
inputColor(v) { |
|
|
|
|
|
this.color10 = Number(v); |
|
|
|
|
|
let temp = "000000" + this.color10.toString(16); |
|
|
|
|
|
this.color16 = "#" + temp.substring(temp.length - 6, temp.length); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dddw, |
|
|
|
|
|
|
|
|
//获取组织体检中心数据 |
|
|
//获取组织体检中心数据 |
|
|
getOraniztion() { |
|
|
getOraniztion() { |
|
|
getapi("/api/app/organization-units/organization-unit-by-is-peis").then( |
|
|
getapi("/api/app/organization-units/organization-unit-by-is-peis").then( |
|
|
@ -191,16 +185,94 @@ export default { |
|
|
getapi(`${url}`).then((res) => { |
|
|
getapi(`${url}`).then((res) => { |
|
|
if (res.code != -1) { |
|
|
if (res.code != -1) { |
|
|
this.sysParms = res.data; |
|
|
this.sysParms = res.data; |
|
|
|
|
|
this.spanRow = this.parseSpanRow(this.sysParms,'sysParmId') |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
save() { |
|
|
|
|
|
let body = []; |
|
|
|
|
|
|
|
|
//行合并 |
|
|
|
|
|
spanMethod({ row, column, rowIndex, columnIndex }) { |
|
|
|
|
|
console.log(row, column, rowIndex, columnIndex); |
|
|
|
|
|
if(columnIndex == 0 || columnIndex == 1 || columnIndex == 5){ |
|
|
|
|
|
for (let i = 0; i < this.spanRow.length; i++) { |
|
|
|
|
|
if (rowIndex == this.spanRow[i].startRow) { |
|
|
|
|
|
return { |
|
|
|
|
|
rowspan: Number(this.spanRow[i].endRow - this.spanRow[i].startRow) + 1, |
|
|
|
|
|
colspan: 1 |
|
|
|
|
|
}; |
|
|
|
|
|
} else if (this.spanRow[i].startRow < rowIndex && rowIndex <= this.spanRow[i].endRow) { |
|
|
|
|
|
return { |
|
|
|
|
|
rowspan: 0, |
|
|
|
|
|
colspan: 0 |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// if (columnIndex == 3) { |
|
|
|
|
|
// for (let i = 0; i < this.spanRow.length; i++) { |
|
|
|
|
|
// if (rowIndex == this.spanRow[i].startRow) { |
|
|
|
|
|
// return { |
|
|
|
|
|
// rowspan: Number(this.spanRow[i].endRow - this.spanRow[i].startRow) + 1, |
|
|
|
|
|
// colspan: 1 |
|
|
|
|
|
// }; |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
// if (columnIndex == 4) { |
|
|
|
|
|
// for (let i = 0; i < this.spanRow.length; i++) { |
|
|
|
|
|
// if (rowIndex == this.spanRow[i].startRow) { |
|
|
|
|
|
// return { |
|
|
|
|
|
// rowspan: Number(this.spanRow[i].endRow - this.spanRow[i].startRow) + 1, |
|
|
|
|
|
// colspan: 1 |
|
|
|
|
|
// }; |
|
|
|
|
|
// } else if (this.spanRow[i].startRow < rowIndex && rowIndex <= this.spanRow[i].endRow) { |
|
|
|
|
|
// return { |
|
|
|
|
|
// rowspan: 0, |
|
|
|
|
|
// colspan: 0 |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//分析合并的行数据 |
|
|
|
|
|
parseSpanRow(arrayData,key) { |
|
|
|
|
|
let spanRow = []; |
|
|
|
|
|
let preVal = '', curVal = ''; |
|
|
|
|
|
let startRow = 0; |
|
|
|
|
|
for (let i = 0; i < arrayData.length; i++) { |
|
|
|
|
|
if (i == 0) { |
|
|
|
|
|
preVal = arrayData[i][key]; |
|
|
|
|
|
curVal = arrayData[i][key]; |
|
|
|
|
|
} else { |
|
|
|
|
|
curVal = arrayData[i][key]; |
|
|
|
|
|
if (preVal !== curVal) { |
|
|
|
|
|
if (startRow !== i - 1) spanRow.push({ startRow, endRow: i - 1 }); |
|
|
|
|
|
startRow = i; |
|
|
|
|
|
preVal = arrayData[i][key]; |
|
|
|
|
|
} |
|
|
|
|
|
if (i == arrayData.length - 1 && preVal === curVal){ |
|
|
|
|
|
spanRow.push({ startRow, endRow: i }); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return spanRow |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
btnSave() { |
|
|
|
|
|
|
|
|
|
|
|
let body = { |
|
|
|
|
|
sysParmTypeId:this.sysParmTypeId, |
|
|
|
|
|
details:[] |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (this.sysParms.length < 1) return; |
|
|
if (this.sysParms.length < 1) return; |
|
|
|
|
|
|
|
|
this.sysParms.forEach((item) => { |
|
|
this.sysParms.forEach((item) => { |
|
|
body.push({ |
|
|
|
|
|
sysParmId: item.id, |
|
|
|
|
|
|
|
|
body.details.push({ |
|
|
|
|
|
sysParmId: item.sysParmId, |
|
|
organizationUnitId: item.organizationUnitId, |
|
|
organizationUnitId: item.organizationUnitId, |
|
|
parmValue: item.sysParmValueName, |
|
|
parmValue: item.sysParmValueName, |
|
|
remark: item.valueRemark, |
|
|
remark: item.valueRemark, |
|
|
|