| | |
| | | export default { |
| | | name: "BusinessWork", |
| | | components: { vciWebRefer }, |
| | | props:['ids','templateId',"taskId","modelKey","codeClassifyOid"], |
| | | props:['ids','templateId',"taskId","modelKey","codeClassifyOid",'stageAttrs'], |
| | | data() { |
| | | return { |
| | | BuinessOids:[], |
| | |
| | | this.BuinseseRend() |
| | | }, |
| | | deep:true |
| | | }, |
| | | stageAttrs(newval,oldval){ |
| | | this.hasEditor=newval.length>0; |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | }, |
| | |
| | | HandlerSave(){ |
| | | this.editingRow = null; |
| | | //保存 |
| | | batchUpdateCode(this.tableData).then(res => { |
| | | console.log(res) |
| | | if(res.data.data.success){ |
| | | this.$message.success("保存成功"); |
| | | let datas=this.tableData.map(item=> { |
| | | let newitem = { |
| | | codeClassifyOid: item.codeclsfid, |
| | | templateOid: this.templateId, |
| | | editInProcess: true, |
| | | data: item, |
| | | oid:item.oid, |
| | | ts:item.ts |
| | | } |
| | | |
| | | return newitem; |
| | | }) |
| | | batchUpdateCode(datas).then(res => { |
| | | if(res.data.data.success){ |
| | | this.$message.success("修改成功"); |
| | | } |
| | | }) |
| | | }, |
| | | //表格头渲染 |
| | |
| | | 'modelKey': this.modelKey, |
| | | 'codeClassifyOid': this.codeClassifyOid |
| | | }).then((res) => { |
| | | this.hasEditor=res.data.tableDefineVO.hasEditor; |
| | | this.options = res.data.tableDefineVO.seniorQueryColumns; |
| | | this.List = res.data.tableDefineVO.cols[0]; |
| | | this.tableHeadData=[]; |
| | | this.List.forEach((item) => { |
| | | let editAttr=this.stageAttrs.filter(stageitem => stageitem.attrId == item.field); |
| | | let columnItem = { |
| | | label: item.title, |
| | | prop: item.field, |
| | | type: this.columnType[item.type], |
| | | sortable: item.sort, |
| | | width: item.minWidth, |
| | | edit:this.columnType[item.edit] |
| | | width: item.minWidth |
| | | }; |
| | | if(item.field == 'id' && validatenull(item.templet)){ |
| | | //企业编码的默认添加超链接,暂未实现 |
| | |
| | | } |
| | | |
| | | } |
| | | if(!validatenull(item.edit)) { |
| | | if (typeof item.editConfig == "string") { |
| | | if(editAttr.length>0) { |
| | | editAttr=editAttr[0] |
| | | columnItem.edit= 'text';//this.columnType[editAttr.edit] |
| | | if (typeof editAttr.editConfig == "string") { |
| | | columnItem.editConfig = eval("(" + item.editConfig + ")"); |
| | | } else { |
| | | columnItem.editConfig = item.editConfig |