Commit 2e444a30 by liuguorong93

警犬技术人员管理表头配置bug修改03

parent 3285dd50
......@@ -168,26 +168,28 @@
</div>
</template>
</el-table-column>
<el-table-column
:label="item.label"
align="left"
show-overflow-tooltip
v-for="item in colPropArr"
:key="item.prop"
>
<template slot-scope="scope">
<span v-if="item.prop === 'personName'">{{ scope.row.personName }}</span>
<span v-if="item.prop === 'idNo'">{{ scope.row.idNo }}</span>
<span v-if="item.prop === 'gender'">{{ (scope.row.gender === '1') ? ('男') : (scope.row.gender === '0' ? '女' : '') }}</span>
<span v-if="item.prop === 'birthDate'">{{ scope.row.birthDate }}</span>
<span v-if="item.prop === 'isjwzyForName'">{{ scope.row.isjwzyForName }}</span>
<span v-if="item.prop === 'school'">{{ scope.row.school }}</span>
<span v-if="item.prop === 'gsdwGajgjgdm'">{{ scope.row.gsdwGajgjgdm }}</span>
<span v-if="item.prop === 'jwjsxlForName'">{{ scope.row.jwjsxlForName }}</span>
<span v-if="item.prop === 'sxjq'">{{ scope.row.sxjq ? scope.row.sxjq + ' / 头' : '' }}</span>
<span v-if="item.prop === 'workYears'">{{ scope.row.workYears ? scope.row.workYears + ' / 年' : '' }}</span>
</template>
</el-table-column>
<template v-if="colPropArr && colPropArr.length">
<el-table-column
:label="item.label"
:align="setAlign(item.prop)"
show-overflow-tooltip
v-for="item in colPropArr"
:key="item.prop"
>
<template slot-scope="scope">
<span v-if="item.prop === 'personName'">{{ scope.row.personName }}</span>
<span v-if="item.prop === 'idNo'">{{ scope.row.idNo }}</span>
<span v-if="item.prop === 'gender'">{{ (scope.row.gender === '1') ? ('男') : (scope.row.gender === '0' ? '女' : '') }}</span>
<span v-if="item.prop === 'birthDate'">{{ scope.row.birthDate }}</span>
<span v-if="item.prop === 'isjwzyForName'">{{ scope.row.isjwzyForName }}</span>
<span v-if="item.prop === 'school'">{{ scope.row.school }}</span>
<span v-if="item.prop === 'gsdwGajgjgdm'">{{ scope.row.gsdwGajgjgdm }}</span>
<span v-if="item.prop === 'jwjsxlForName'">{{ scope.row.jwjsxlForName }}</span>
<span v-if="item.prop === 'sxjq'">{{ scope.row.sxjq ? scope.row.sxjq + ' / 头' : '' }}</span>
<span v-if="item.prop === 'workYears'">{{ scope.row.workYears ? scope.row.workYears + ' / 年' : '' }}</span>
</template>
</el-table-column>
</template>
</el-table>
<div class="pageClass">
......@@ -228,12 +230,7 @@ import {
exportArtisanUrl,
} from "@/api/menuDataApi/artisanManageApi.js";
import { getJsonDataApi } from "@/utils/getJsonData.js";
import {
getCodeName,
handleDownFile,
getColumns,
deepClone,
} from "@/utils/mk.js";
import { getCodeName, handleDownFile, getColumns } from "@/utils/mk.js";
import {
getJsryglAllColumns,
getJsryglDefaultColumns,
......@@ -313,7 +310,6 @@ export default {
} else {
this.colPropArr = this.headerSettInfo.defaultColumns;
}
console.log(this.colPropArr);
this.getLists(this.currentPage);
},
......@@ -321,6 +317,14 @@ export default {
indexMethod(index) {
return (this.currentPage - 1) * this.limit + (index + 1);
},
setAlign(val) {
let rightArr = ["sxjq", "workYears"];
if (rightArr.includes(val)) {
return "right";
} else {
return "left";
}
},
// 重置
resetForm() {
this.formData.gsdwGajgjgdm = "";
......@@ -472,8 +476,10 @@ export default {
},
getNewColArr(arr) {
if (arr?.length) {
this.colPropArr = arr;
console.log("new", this.colPropArr);
this.colPropArr = [];
setTimeout(() => {
this.colPropArr = arr;
}, 1);
}
},
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment