| | |
| | | @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> |
| | |
| | | <template slot="label"> |
| | | 名称 |
| | | </template> |
| | | {{ lastItem.id }} |
| | | <div style="width: 330px"> |
| | | {{ lastItem.id }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 标签 |
| | | </template> |
| | | <div style="width: 330px"> |
| | | {{ lastItem.name }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 描述 |
| | | </template> |
| | | <div style="width: 330px"> |
| | | {{ lastItem.description }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | |
| | | <template slot="label"> |
| | | 允许为空 |
| | | </template> |
| | | <div style="width: 330px"> |
| | | <el-tag :type="lastItem.nullableFlag ? 'success' : 'danger'"> |
| | | {{ lastItem.nullableFlag ? '是' : '否' }} |
| | | </el-tag> |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item v-if="accuracy"> |
| | | <template slot="label"> |
| | |
| | | <template slot="label"> |
| | | 长度 |
| | | </template> |
| | | <div style="width: 330px"> |
| | | {{ lastItem.attrLength }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 默认值 |
| | | </template> |
| | | <div style="width: 330px"> |
| | | {{ lastItem.defaultValue }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | |
| | | <template slot="label"> |
| | | 当前类型 |
| | | </template> |
| | | <div style="width: 345px"> |
| | | {{ lastItem.version ? '链接类型' : '业务类型' }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 当前类型值 |
| | | </template> |
| | | <div style="width: 345px"> |
| | | {{ lastItem.version ? lastItem.linkTypeName : lastItem.btmTypeId }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item v-if="lastItem.version"> |
| | | <template slot="label"> |
| | | 当前版本次 |
| | | </template> |
| | | <div style="width: 345px"> |
| | | {{ lastItem.version }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 使用枚举 |
| | | </template> |
| | | <div style="width: 345px"> |
| | | <el-tag :type="lastItem.enumId ? 'success' : 'danger'"> |
| | | {{ lastItem.enumId ? '是' : '否' }} |
| | | </el-tag> |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 当前枚举类型 |
| | | </template> |
| | | <div style="width: 345px"> |
| | | {{ lastItem.enumId }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | |
| | | <template slot="label"> |
| | | 使用枚举 |
| | | </template> |
| | | <div style="width: 330px"> |
| | | <el-tag :type="lastItem.enumFlag ? 'success' : 'danger'"> |
| | | {{ lastItem.enumFlag ? '是' : '否' }} |
| | | </el-tag> |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 枚举类型 |
| | | </template> |
| | | <div style="width: 330px"> |
| | | {{ lastItem.enumFlag }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | 取值范围 |
| | | </template> |
| | | <div style="width: 330px; height: 80px;overflow: auto"> |
| | | <div style="width: 345px; height: 80px;overflow: auto"> |
| | | <el-tag v-for="item in rangeList" plain style="margin: 5px">{{ item }}</el-tag> |
| | | </div> |
| | | </el-descriptions-item> |
| | |
| | | <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> |
| | |
| | | </el-form-item> |
| | | <el-form-item v-if="!form.enumSwitch" label="运算符:"> |
| | | <div> |
| | | <el-button size="mini" @click="operationHandler('>')"> > </el-button> |
| | | <el-button size="mini" @click="operationHandler('<')"> < </el-button> |
| | | <el-button size="mini" @click="operationHandler('>=')"> >= </el-button> |
| | | <el-button size="mini" @click="operationHandler('<=')"> <= </el-button> |
| | | <el-button size="mini" @click="operationHandler('=')"> = </el-button> |
| | | <el-button size="mini" @click="operationHandler('!=')"> != </el-button> |
| | | <el-button size="mini" @click="operationHandler('()')"> () </el-button> |
| | | <el-button size="mini" @click="operationHandler('>')"> ></el-button> |
| | | <el-button size="mini" @click="operationHandler('<')"> <</el-button> |
| | | <el-button size="mini" @click="operationHandler('>=')"> >=</el-button> |
| | | <el-button size="mini" @click="operationHandler('<=')"> <=</el-button> |
| | | <el-button size="mini" @click="operationHandler('=')"> =</el-button> |
| | | <el-button size="mini" @click="operationHandler('!=')"> !=</el-button> |
| | | <el-button size="mini" @click="operationHandler('()')"> ()</el-button> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item :label="form.enumSwitch ? '当前枚举值:' : '当前值域:'" prop="rangeValue"> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="运算符:"> |
| | | <div> |
| | | <el-button size="mini" @click="operationHandler('>')"> > </el-button> |
| | | <el-button size="mini" @click="operationHandler('<')"> < </el-button> |
| | | <el-button size="mini" @click="operationHandler('>=')"> >= </el-button> |
| | | <el-button size="mini" @click="operationHandler('<=')"> <= </el-button> |
| | | <el-button size="mini" @click="operationHandler('=')"> = </el-button> |
| | | <el-button size="mini" @click="operationHandler('!=')"> != </el-button> |
| | | <el-button size="mini" @click="operationHandler('()')"> () </el-button> |
| | | <el-button size="mini" @click="operationHandler('>')"> ></el-button> |
| | | <el-button size="mini" @click="operationHandler('<')"> <</el-button> |
| | | <el-button size="mini" @click="operationHandler('>=')"> >=</el-button> |
| | | <el-button size="mini" @click="operationHandler('<=')"> <=</el-button> |
| | | <el-button size="mini" @click="operationHandler('=')"> =</el-button> |
| | | <el-button size="mini" @click="operationHandler('!=')"> !=</el-button> |
| | | <el-button size="mini" @click="operationHandler('()')"> ()</el-button> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item :label="form.enumSwitch ? '当前枚举值:' : '当前值域:'" prop="rangeValue"> |
| | | <el-form-item :label="form.enumSwitch ? '当前枚举值:' : '当前值域:'" prop="rangeValue"> |
| | | <textarea v-model="form.rangeValue" |
| | | style="width: 330px; height: 80px; border: 1px solid #DCDFE6; overflow: auto; text-align: left;resize: none;"> |
| | | </textarea> |
| | |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | menuWidth:160, |
| | | column |
| | | }, |
| | | tableLoading: false, |
| | |
| | | ], |
| | | upFileType: ['xls', 'xlsx'], |
| | | fileUrl: 'api/attributeController/importAttributes', |
| | | lastIndex: null |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | |
| | | // 点击行 |
| | | rowClickHandler(row) { |
| | | this.$refs.userCrud.toggleRowSelection(row); |
| | | func.rowClickHandler( |
| | | row, |
| | | this.$refs.userCrud, |
| | | this.lastIndex, |
| | | (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; |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 导入 |