| | |
| | | |
| | | }, |
| | | watch:{ |
| | | FormList:{ |
| | | handler(newval,oldval){ |
| | | console.log('FormList',newval) |
| | | } |
| | | } |
| | | |
| | | }, |
| | | methods: { |
| | | /** 导入 */ |
| | |
| | | ExportExcel(){ |
| | | if(this.nodeClickList){ |
| | | exportClassify({oid:this.nodeClickList.oid}).then(res=>{ |
| | | console.log(res) |
| | | func.downloadFileByBlob(res); |
| | | }) |
| | | }else { |
| | | this.$message.warning('请先选择要导出的主题库分类') |
| | | } |
| | | }, |
| | | //模板管理已发布编辑 |
| | | // checkShowEditBtn() { |
| | | // this.showEditBtn = this.Formlist.some(item => item.lcStatus === 'Released'); |
| | | // }, |
| | | //编码规则失焦 |
| | | CodeFoucus(){ |
| | | this.MasterdialogVisible=true; |
| | |
| | | return item.codeclassifyoid == this.nodeClickList.oid |
| | | } |
| | | }) |
| | | console.log('form',this.Formlist) |
| | | if(this.Formlist.length >= 1){ |
| | | this.crudLCStatus=this.Formlist[this.selectRow].lcStatus; |
| | | this.crudArray.push(this.Formlist[this.selectRow]); |
| | |
| | | }); |
| | | } else { |
| | | this.$set(row, "codeclassifyoid", this.nodeClickList.oid) |
| | | console.log(this.nodeClickList) |
| | | addSave(row).then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | |
| | | }); |
| | | }) |
| | | }, |
| | | //模板管理表格查询,只有一条数据没必要做搜索 |
| | | /*nterFind() { |
| | | if (this.findText == "") { |
| | | gridCodeClassifyTemplate().then(res => { |
| | | this.Formlist = res.data.data |
| | | }) |
| | | } else { |
| | | gridCodeClassifyTemplate().then(res => { |
| | | this.Formlist = res.data.data.filter(item => { |
| | | return item.name.includes(this.findText) |
| | | }) |
| | | }) |
| | | } |
| | | },*/ |
| | | //克隆模板查询 |
| | | CloneEnterFind(){ |
| | | gridCodeClassifyTemplate().then(res => { |
| | |
| | | this.Formlist = res.data.data.filter(item => { |
| | | return item.codeclassifyoid == this.nodeClickList.oid |
| | | }) |
| | | this.crudLCStatus=this.Formlist[this.selectRow].lcStatus; |
| | | this.crudArray.push(this.Formlist[this.selectRow]); |
| | | gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': res.data.data[this.selectRow].oid,limit:-1}).then(res => { |
| | | this.ProData = res.data.data; |
| | | //分类注入数据格式 |
| | | this.ProData = res.data.data.map((item) => { |
| | | //如果分类注入classifyInvokeAttr为空说明是初始状态 |
| | | if(item.classifyInvokeAttr !== ''){ |
| | | if (!item.hasOwnProperty('classifyInvokeText')) { // 检查classifyInvokeText属性是否存在 |
| | | item = { |
| | | ...item, |
| | | classifyInvokeText: { |
| | | "注入类型": item.classifyInvokeAttr, |
| | | "注入类型名称": item.classifyInvokeAttrName, |
| | | "层级设置": item.classifyInvokeLevel, |
| | | "是否可修改": item.classifyInvokeEditFlag |
| | | } |
| | | }; |
| | | } |
| | | } |
| | | return item; |
| | | }); |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | | }) |
| | | } else { |
| | | this.FormLoing = true |