| | |
| | | @current-change="currentChange" |
| | | > |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button icon="el-icon-plus" size="small" type="primary" @click="rowSaveHandlerClick">创建</el-button> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="rowSaveHandlerClick">创建</el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="allDelHandler">删除</el-button> |
| | | <el-button icon="el-icon-view" plain size="small" type="primary" @click="chekView">查看使用范围</el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadTemplateHandler">下载导入模板 |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadTemplateHandler">下载导入模板</el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadHandler">导入</el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="downLoadHandler">导出</el-button> |
| | | </template> |
| | |
| | | <el-row> |
| | | <div class="addDialog"> |
| | | <div> |
| | | |
| | | <h3>属性项</h3> |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item label="名称:" prop="id"> |
| | | <el-input v-model="form.id"></el-input> |
| | |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | menuWidth:160, |
| | | column |
| | | }, |
| | | tableLoading: false, |
| | |
| | | row, |
| | | this.$refs.userCrud, |
| | | this.lastIndex, |
| | | (newIndex) => { this.lastIndex = newIndex; }, |
| | | () => { this.selectList = []; } |
| | | (newIndex) => { |
| | | this.lastIndex = newIndex; |
| | | }, |
| | | () => { |
| | | this.selectList = []; |
| | | } |
| | | ); |
| | | }, |
| | | |
| | |
| | | linkTypeName: "", |
| | | rangeValue: "" |
| | | }; |
| | | if (this.dialogTitle === 'add') { |
| | | this.form.range = this.form.rangeValue.replace(/\n/g, ';'); |
| | | if (this.form.attributeSelectType === 'business') { |
| | | this.form.btmTypeId = this.form.referValue; |
| | | } else { |
| | | this.form.linkTypeName = this.form.referValue; |
| | | } |
| | | addAttribute(this.form).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | this.form = form; |
| | | this.addVisible = false; |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | if (this.dialogTitle === 'add') { |
| | | this.form.range = this.form.rangeValue.replace(/\n/g, ';'); |
| | | if (this.form.attributeSelectType === 'business') { |
| | | this.form.btmTypeId = this.form.referValue; |
| | | } else { |
| | | this.form.linkTypeName = this.form.referValue; |
| | | } |
| | | addAttribute(this.form).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | this.form = form; |
| | | this.addVisible = false; |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | if (this.dialogTitle === 'edit') { |
| | | this.form.range = this.form.rangeValue.replace(/\n/g, ';'); |
| | | if (this.form.attributeSelectType === 'business') { |
| | | this.form.btmTypeId = this.form.referValue; |
| | | } else { |
| | | this.form.linkTypeName = this.form.referValue; |
| | | } |
| | | updateAttribute(this.form).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | this.form = form; |
| | | this.addVisible = false; |
| | | if (this.dialogTitle === 'edit') { |
| | | this.form.range = this.form.rangeValue.replace(/\n/g, ';'); |
| | | if (this.form.attributeSelectType === 'business') { |
| | | this.form.btmTypeId = this.form.referValue; |
| | | } else { |
| | | this.form.linkTypeName = this.form.referValue; |
| | | } |
| | | updateAttribute(this.form).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | this.form = form; |
| | | this.addVisible = false; |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 导入 |