| | |
| | | </el-aside> |
| | | |
| | | <el-main> |
| | | <basic-container v-if="treeNodeRow.id === 'root' "> |
| | | <basic-container v-show="treeNodeRow.id === 'root' "> |
| | | <div> |
| | | <avue-crud |
| | | ref="treeCrud" |
| | |
| | | </avue-crud> |
| | | </div> |
| | | </basic-container> |
| | | <basic-container v-else> |
| | | <basic-container v-show="treeNodeRow.id !== 'root'"> |
| | | <div> |
| | | <avue-crud |
| | | ref="crud" |
| | |
| | | @refresh-change="handleRefresh" |
| | | @selection-change="selectChangeHandler" |
| | | @row-click="rowClickHandler"> |
| | | <template slot="plCSClass" slot-scope="{row}"> |
| | | <span class="avue-icon"> |
| | | <icon-show :name="row.plCSClass"></icon-show> |
| | | </span> |
| | | </template> |
| | | <template slot-scope="{type,disabled}" slot="plCSClassForm"> |
| | | <input-icon :disabled="disabled" v-model="form.plCSClass"></input-icon> |
| | | </template> |
| | | <template slot="plTypeType" slot-scope="{row}"> |
| | | <el-tag :type="row.plTypeType === 'business' ? '' : 'success'"> |
| | | {{ row.plTypeType === 'business' ? '业务类型' : '链接类型' }} |
| | |
| | | { |
| | | label: '编号', |
| | | prop: 'plCode', |
| | | width: 220, |
| | | overHidden: true, |
| | | search: true, |
| | | rules: [ |
| | |
| | | ] |
| | | }, |
| | | { |
| | | label: '图标', |
| | | prop: 'plCSClass', |
| | | width: 80, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请选择图标', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: '分类', |
| | | prop: 'plActionCls', |
| | | type: 'tree', |
| | |
| | | props: { |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'childs' |
| | | children: 'children' |
| | | }, |
| | | rules: [ |
| | | { |
| | |
| | | ], |
| | | dicData: [] |
| | | }, |
| | | { |
| | | /*{ |
| | | label: 'C/S类路径', |
| | | prop: 'plCSClass', |
| | | search: true, |
| | | hide:true, |
| | | searchLabelWidth:120, |
| | | overHidden: true, |
| | | }, |
| | | },*/ |
| | | { |
| | | label: 'B/S链接地址', |
| | | prop: 'plBSUrl', |
| | |
| | | const data = res.data.obj; |
| | | this.treeData = this.treeDataFormAtter([data],'Action分类'); |
| | | const selectTreeData = this.option.column.find(item => item.prop === 'plActionCls'); // 找到action添加分类树 |
| | | const dicData=[data]; |
| | | const dicData=this.treeData; |
| | | dicData[0].disabled=true;//根节点不能选 |
| | | selectTreeData.dicData = dicData; |
| | | }) |
| | |
| | | beforeOpen(done, type, loading) { |
| | | if ([ 'edit'].includes(type)) { |
| | | // 编辑逻辑 |
| | | this.$set(this.option.column[2],'disabled',false); |
| | | this.$set(this.option.column[3],'disabled',false); |
| | | } else { |
| | | // 新增逻辑 |
| | | this.$set(this.option.column[2],'disabled',true); |
| | | this.$set(this.option.column[3],'disabled',true); |
| | | } |
| | | done(); |
| | | console.log(this.option.column) |
| | | }, |
| | | // action列表增加 |
| | | addClickHandler() { |
| | |
| | | actionSaveHandler(val) { |
| | | this.$set(this.basicForm, 'actionName', val.plName); |
| | | this.$set(this.basicForm, 'actionOId', val.plOId); |
| | | this.$set(this.basicForm, 'iconPath', val.plCSClass);//图标 |
| | | this.$refs.form.clearValidate('Action') |
| | | }, |
| | | // action选择弹窗直接关闭 |