| | |
| | | } |
| | | }, |
| | | classifyAuthData(newval){ |
| | | |
| | | this.addIndex = newval.length <= 0 ? 0 :newval.length-1; |
| | | console.log(this.addIndex) |
| | | } |
| | | }, |
| | | computed: {}, |
| | |
| | | if (code === "data_view") { |
| | | row.checkTheStatus = check; |
| | | } else if (!row.checkTheStatus) { |
| | | this.$message.warning('请先勾选查看按钮!'); |
| | | this.$message.warning('请确认是否配置查看按钮,如已配置请先勾选查看按钮!'); |
| | | // 在条件不满足时将多选框状态设置为false |
| | | row[id] = false; |
| | | } |
| | |
| | | |
| | | //和表格列进行对比 |
| | | this.classifyAuthHeader.forEach((item) => { |
| | | // if (item.code !== 'data_view') { |
| | | // this.$set(this.classifyAuthData[index].authButton, "allDisabled", true); |
| | | // } |
| | | const isMatched = filteredItems.some((x) => x.id === item.prop); |
| | | this.$nextTick(() => { |
| | | if (this.classifyAuthData[index]) { |
| | | if (isMatched) { |
| | | Object.keys(this.classifyAuthData[index]).forEach((key) => { |
| | | this.$set(this.classifyAuthData[index].authButton, item.code, true); |
| | | |
| | | //添加 “查看全部禁用条件” |
| | | if (item.code === "data_view") { |
| | | this.$set(this.classifyAuthData[index].authButton, "allDisabled", true); |
| | |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // console.log(this.classifyAuthData) |
| | | //强制刷新表格 |
| | | this.itemKey = uuidv4(); |
| | | }); |
| | |
| | | classifyItem: this.classifyData.label, |
| | | authButton: {}, |
| | | uuid: uuidv4(),//生成唯一的id, |
| | | index: this.addIndex, |
| | | index: this.classifyAuthData.length -1, |
| | | } |
| | | //将按钮设置进去 |
| | | this.classifyAuthButton.forEach(data => { |
| | |
| | | }) |
| | | //console.log(item) |
| | | this.classifyAuthData.push(item) |
| | | this.roleHandlerMethods(this.roleList[0].id, 'add', this.addIndex) |
| | | this.roleHandlerMethods(this.roleList[0].id, 'add', this.classifyAuthData.length -1) |
| | | }, |
| | | // 删除行 |
| | | subClassifyAuth() { |
| | |
| | | <template> |
| | | <div> |
| | | <div v-if="this.crudArrayFlag" class="app" style="display: flex;flex-wrap: wrap; display: inline-block;height: 80px"> |
| | | <div v-if="this.crudArrayFlag" class="app" |
| | | style="display: flex;flex-wrap: wrap; display: inline-block;height: 80px"> |
| | | <el-button-group> |
| | | <!--新增--> |
| | | <span v-if="permissionList.busineStatus"> |
| | |
| | | ></refer-config-dialog> |
| | | <!--近义词查询规则 --> |
| | | <el-dialog :visible.sync="synonymVisible" append-to-body title="近义词查询规则"> |
| | | <avue-crud :data="synonymData" :option="synonymOption" v-loading="sysonymLoading" @selection-change="sysChange"> |
| | | <avue-crud v-loading="sysonymLoading" :data="synonymData" :option="synonymOption" @selection-change="sysChange"> |
| | | <template slot="lcStatus" slot-scope="{row}"> |
| | | <el-tag v-if="row.lcStatus === 'Released'" type="success">启用</el-tag> |
| | | <el-tag v-else type="danger">停用</el-tag> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {AttrByBtm, gridCodeClassifyTemplateAttr, batchAddSave, copyto, listByFlag,codeSynonym} from '@/api/template/templateAttr' |
| | | import { |
| | | AttrByBtm, |
| | | gridCodeClassifyTemplateAttr, |
| | | batchAddSave, |
| | | copyto, |
| | | listByFlag, |
| | | codeSynonym |
| | | } from '@/api/template/templateAttr' |
| | | import {getList} from "@/api/refer/table"; |
| | | import func from "@/util/func"; |
| | | import {getCurrentInstance} from "vue"; |
| | |
| | | }, |
| | | { |
| | | label:'近义词查询规则', |
| | | prop:'sysonymRuleOids', |
| | | prop: 'sysonymRuleOidsText', |
| | | cell: false, |
| | | edit: 'refer' |
| | | }, |
| | |
| | | }else { |
| | | const newArray = this.sysSelectData.map(obj => obj.oid); |
| | | const newString = newArray.join(','); |
| | | const newArrayName = this.sysSelectData.map(obj => obj.name); |
| | | const newStringName = newArrayName.join(',') |
| | | this.$set(this.CurrentCell, 'sysonymRuleOids', newString) |
| | | //text |
| | | this.$set(this.CurrentCell, 'sysonymRuleOidsText', newStringName) |
| | | this.AddCellFlag = true; |
| | | this.synonymVisible = false; |
| | | } |
| | | }, |
| | | sysChange(row){ |
| | | console.log(row) |
| | | this.sysSelectData = row; |
| | | }, |
| | | //新增搜索 |
| | |
| | | this.attrModel = this.CurrentCell.attributeGroup |
| | | } |
| | | }, |
| | | sysonymRuleOids: () =>{ |
| | | sysonymRuleOidsText: () => { |
| | | this.sysonymLoading = true |
| | | codeSynonym('1','-1','Released').then(res=>{ |
| | | this.synonymData = res.data.data.records; |
| | |
| | | @Treedata="TreedataList" |
| | | @codeClassifyOid="codeClassifyOidList" |
| | | @coderuleoid="coderuleoidList" |
| | | @loading="loadingHandler" |
| | | @nodeClickList="nodeClickLists" |
| | | @nodeClickTemplateOids="nodeClickTem" |
| | | @tableDataArray="tableDataArrays" |
| | | @tableHeadBttoms="tableHeadBttoms" |
| | | @tableHeadDataFateher="tableHeadDatas" |
| | | @tableHeadFindData="tableHeadFindDatas" |
| | | @nodeClickList="nodeClickLists" |
| | | @total="totals" |
| | | @loading="loadingHandler" |
| | | > |
| | | </master-tree> |
| | | </basic-container> |
| | |
| | | <el-main> |
| | | <!-- 表格组件--> |
| | | <VciMasterCrud |
| | | ref="vciMasterCrud" |
| | | :TreeValue="TreeValue" |
| | | :Treedata="Treedata" |
| | | :codeClassifyOid="this.codeClassifyOid" |
| | | :coderuleoid="this.coderuleoid" |
| | | :isLoading="isLoading" |
| | | :nodeClickList="this.nodeClickList" |
| | | :page="this.page" |
| | | :tableDataArray="tableDataArray" |
| | | :tableHeadBtnData="masterVrBtnList" |
| | |
| | | :tableHeadFindData="tableHeadFindData" |
| | | :templateOid="templateOid" |
| | | :total="this.total" |
| | | :nodeClickList="this.nodeClickList" |
| | | @currentPage="currentPages" |
| | | @pageSize="pageSizes" |
| | | ref="vciMasterCrud" |
| | | > |
| | | </VciMasterCrud> |
| | | </el-main> |
| | |
| | | <!-- </el-collapse>--> |
| | | <!-- </basic-container>--> |
| | | <!-- </el-row>--> |
| | | <!-- --> |
| | | |
| | | <!-- </el-col>--> |
| | | </el-row> |