| | |
| | | :label="item.label" |
| | | :prop="item.prop" |
| | | :sortable="item.sortable" |
| | | :formatter="formatBoolean" |
| | | :formatter="item.formatter" |
| | | :width="item.label.length >=4 ?'150':item.label.length==3 ?'120':'90'" |
| | | :show-overflow-tooltip="true" |
| | | align="center" |
| | |
| | | import SetPersonnel from "@/components/template/SetPersonnel"; |
| | | import ResembleQueryDialog from "@/components/FormTemplate/ResembleQueryDialog.vue"; |
| | | import BatchImport from '@/components/BatchImport' |
| | | import { validatenull } from "@/util/validate"; |
| | | export default { |
| | | components: { |
| | | integrationTransfer, |
| | |
| | | }, |
| | | tableHeadFindData: { |
| | | handler(newval, oldval) { |
| | | newval.forEach((record,_index) =>{ |
| | | if(record.field == 'id' && validatenull(record.templet)){ |
| | | //企业编码的默认添加超链接,暂未实现 |
| | | record.formatter = ''; |
| | | }else { |
| | | if (record.templet && typeof (record.templet) == 'string' && !validatenull(record.templet) && record.templet.indexOf("function(row,column)")>-1) { |
| | | record.formatter = eval("(" + record.templet + ")"); |
| | | //function(row,column){return row[column.property]=='true' || row[column.property]=='1'?'是':'否'} |
| | | }else if(record.fieldType=="truefalse"){ |
| | | record.formatter = function(row,column){return row[column.property]=='true' || row[column.property]=='1'?'是':'否'} |
| | | } |
| | | } |
| | | }) |
| | | this.tableHeadFindDatas = newval; |
| | | }, |
| | | }, |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | // 转换数据true和false |
| | | formatBoolean(row, column) { |
| | | if (column.property === "xiaoshouwl" |
| | | ||column.property === "shifoupihaoguanli" |
| | | ||column.property === "caigouwl" |
| | | ||column.property === "kucunwl" |
| | | ||column.property === "passing") { |
| | | return row[column.property] =='true'? "是" : "否"; |
| | | } |
| | | return row[column.property]; |
| | | }, |
| | | // 发布 |
| | | setHandler() { |
| | | if (this.selectRow.length <= 0) { |
| | |
| | | this.$message.warning("编码状态不是“编辑中”,不可编辑"); |
| | | } else { |
| | | this.editvisible = true; |
| | | this.rowOid = this.selectRow[0]['oid'] |
| | | } |
| | | }, |
| | | //高级查询按钮 |