| | |
| | | class="dictionary_leftTree subpage_Div" |
| | | style="border: 1px solid #dcdfe6;" |
| | | > |
| | | <ul> |
| | | <el-input |
| | | size="small" |
| | | v-model="filterInput" |
| | | style="width: 200px" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueone')" |
| | | suffix-icon="el-icon-search" |
| | | ></el-input> |
| | | |
| | | <el-tree |
| | | :data="domainData" |
| | | :props="defaultProps" |
| | | :default-expand-all="true" |
| | | @node-click="getTableDesc" |
| | | :filter-node-method="filterNode" |
| | | ref="tree" |
| | | ></el-tree> |
| | | <!-- <ul> |
| | | <li |
| | | @click="getTableDesc(item)" |
| | | v-for="(item, i) in optionCount" |
| | |
| | | > |
| | | {{ item.tabDesc }} |
| | | </li> |
| | | </ul> |
| | | </ul> --> |
| | | </div> |
| | | |
| | | <div class="right subpage_Div"> |
| | |
| | | v-model="formInline.tab" |
| | | :placeholder="$t('shuJuGuanLi.lable3')" |
| | | style="width: 200px" |
| | | ><i slot="suffix" class="el-icon-search" @click="getSelectDictTab" style="padding-right: 8px"></i></el-input> |
| | | ><i |
| | | slot="suffix" |
| | | class="el-icon-search" |
| | | @click="getSelectDictTab" |
| | | style="padding-right: 8px" |
| | | ></i></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="float: right" size="small"> |
| | | <el-form-item |
| | | style="float: right" |
| | | size="small" |
| | | > |
| | | <el-button |
| | | v-if="btnStatus.insert" |
| | | icon="el-icon-edit" |
| | |
| | | @click="DelFormData" |
| | | type="danger" |
| | | >{{ $t("common.delete") }}</el-button> |
| | | <!-- <el-button |
| | | <!-- <el-button |
| | | icon="el-icon-search" |
| | | size="small" |
| | | @click="getSelectDictTab" |
| | |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | border |
| | | @selection-change="handleSelectionChange" |
| | | height="calc(100% - 57px)" |
| | | > |
| | |
| | | components: { MyBread }, |
| | | data() { |
| | | return { |
| | | filterInput: "", |
| | | activeName: "", |
| | | formInline: [], |
| | | listData: { |
| | |
| | | insert: false, |
| | | update: false, |
| | | }, |
| | | domainData: [ |
| | | { |
| | | val: "基础数据", |
| | | children: [], |
| | | }, |
| | | { |
| | | val: "业务数据", |
| | | children: [], |
| | | }, |
| | | { |
| | | val: "元数据", |
| | | children: [], |
| | | }, |
| | | ], |
| | | defaultProps: { |
| | | children: "children", |
| | | label: "val", |
| | | }, |
| | | }; |
| | | }, |
| | | watch: { |
| | | |
| | | filterInput(val) { |
| | | this.$refs.tree.filter(val); |
| | | }, |
| | | }, |
| | | created() { |
| | | this.getSelectDictTab(); |
| | | this.showPermsBtn(); |
| | | }, |
| | | methods: { |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | |
| | | return data.val.indexOf(value) !== -1; |
| | | }, |
| | | //新增 |
| | | async insertFromData() { |
| | | const data = await insertDict(this.insertform); |
| | |
| | | if (data.code != 200) { |
| | | this.$message.error("下拉调用失败"); |
| | | } |
| | | |
| | | this.optionCount = data.result; |
| | | this.insertform.tab = data.result[0].tab; |
| | | this.insertform.tabDesc = data.result[0].tabDesc; |
| | | this.insertform.ns = data.result[0].ns; |
| | | this.listData.tab = data.result[0].tab; |
| | | this.listData.ns = data.result[0].ns; |
| | | this.activeName = data.result[0].tab; |
| | | let bdres = data.result.filter((item) => item.ns == "bd"); |
| | | let bsres = data.result.filter((item) => item.ns == "bs"); |
| | | let mdres = data.result.filter((item) => item.ns == "md"); |
| | | for (var i in bdres) { |
| | | // bdres[i].val = bdres[i].tabDesc + '(' + bdres[i].tab + ')'; |
| | | bdres[i].val = bdres[i].tabDesc; |
| | | } |
| | | for (var i in bsres) { |
| | | // bsres[i].val = bsres[i].tabDesc + '(' + bsres[i].tab + ')'; |
| | | bsres[i].val = bsres[i].tabDesc; |
| | | } |
| | | for (var i in mdres) { |
| | | // bsres[i].val = bsres[i].tabDesc + '(' + bsres[i].tab + ')'; |
| | | mdres[i].val = mdres[i].tabDesc; |
| | | } |
| | | this.domainData[0].children = bdres; |
| | | this.domainData[1].children = bsres; |
| | | this.domainData[2].children = mdres; |
| | | var val = this.domainData[0].children; |
| | | this.insertform.tab = val[0].tab; |
| | | this.insertform.tabDesc = val[0].tabDesc; |
| | | this.insertform.ns = val[0].ns; |
| | | this.listData.tab = val[0].tab; |
| | | this.listData.ns = val[0].ns; |
| | | this.activeName = val[0].tab; |
| | | this.startQueryNameData(); |
| | | }, |
| | | }, |