| | |
| | | <template> |
| | | <div> |
| | | <div style="display: flex; justify-content: flex-end;margin-bottom: 10px"> |
| | | <el-button icon="el-icon-more" type="primary" plain size="small" @click="MoreHandler">更多</el-button> |
| | | <el-button icon="el-icon-more" plain size="small" type="primary" @click="MoreHandler">更多</el-button> |
| | | </div> |
| | | <avue-data-box :option="option" :animation="true"> |
| | | <template> |
| | | <el-switch></el-switch> |
| | | </template> |
| | | </avue-data-box> |
| | | <el-dialog title="主数据配置" :visible.sync="dialogTableVisible" append-to-body class="avue-dialog avue-dialog--top" top="0"> |
| | | <avue-data-box :animation="true" :option="option"></avue-data-box> |
| | | <!-- <avue-data-panel :animation="true":option="option"></avue-data-panel>--> |
| | | <el-dialog :visible.sync="dialogTableVisible" append-to-body class="avue-dialog avue-dialog--top" title="主数据配置" |
| | | top="0"> |
| | | <avue-crud ref="crud" |
| | | v-model="Crud.form" |
| | | :data="Crud.data" |
| | | @selection-change="selectionChange" |
| | | :option="Crud.option"> |
| | | :option="Crud.option" |
| | | @selection-change="selectionChange"> |
| | | </avue-crud> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" plain @click="SaveHandler">保存</el-button> |
| | | <el-button plain type="primary" @click="SaveHandler">保存</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | return |
| | | } |
| | | let mdmNameList=[]; |
| | | mdmNameList=this.SelectRow.map(item=>{return item.code}) |
| | | mdmNameList = this.SelectRow.map(item => { |
| | | return item.code |
| | | }) |
| | | console.log(mdmNameList) |
| | | save(this.userId,mdmNameList).then(res=>{ |
| | | console.log(res) |
| | | if(res.data.code === 200){ |
| | | this.$message.success('保存成功!') |
| | | this.option.data=[]; |
| | | this.newData=[]; |
| | | this.MasterGetList() |
| | | this.dialogTableVisible=false; |
| | | } |
| | | }) |
| | | }, |
| | | MoreHandler(){ |
| | | this.dialogTableVisible=true |
| | | this.dialogTableVisible = true; |
| | | }, |
| | | // 随机色 |
| | | randomColor() { |
| | |
| | | this.userId = localStorage.getItem('userId'); |
| | | getList({ userId: this.userId }).then(res => { |
| | | res.data.data.filter(item => { |
| | | // console.log(item.icon) |
| | | if (item.isDefault === 1) { |
| | | this.hexColor = this.randomColor(); |
| | | this.option.data.push({ |