| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: lzhe lzhe@example.com |
| | | * @Date: 2024-03-26 10:28:33 |
| | | * @LastEditors: lzhe lzhe@example.com |
| | | * @LastEditTime: 2024-04-17 17:52:50 |
| | | * @FilePath: /smart-web/src/views/master/person/main/index.vue |
| | | * @Description: è¿æ¯é»è®¤è®¾ç½®,请设置`customMade`, æå¼koroFileHeaderæ¥çé
ç½® è¿è¡è®¾ç½®: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | --> |
| | | <template> |
| | | <div class="aposcope-main"> |
| | | <div class="aposcope-left"> |
| | | <div class="left-title">èå</div> |
| | | <el-tree :data="tableData" row-key="id" :props="defalutProps" lazy :load="loadNode" @node-click="handleNodeClick" ref="treeRef"/> |
| | | </div> |
| | | <div class="aposcope-right"> |
| | | <div> |
| | | <!-- <el-button type="primary" @click="addData">+ æ·»å </el-button> --> |
| | | <!-- <el-button type="danger" plain @click="delData">å é¤</el-button> --> |
| | | </div> |
| | | <div class="right-content" v-if="searchDataList.length == 0"> |
| | | <img src="./quesheng.bd026700.png" /> |
| | | <div> |
| | | <span>ææ æ°æ®</span> |
| | | <!-- <span @click="addData">æ·»å è§å</span> --> |
| | | </div> |
| | | </div> |
| | | <el-table v-if="searchDataList.length != 0" ref="searchDataListRef" :data="searchDataList" border style="width: 100%;margin-top: 20px;" class="multipleTableRef" @selection-change="searchHandleSelectionChange"> |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column prop="moduleCode" label="æ¥å£æ¨¡å"></el-table-column> |
| | | <el-table-column prop="controllerCode" label="Controller"></el-table-column> |
| | | <el-table-column prop="scopeName" label="action"></el-table-column> |
| | | <el-table-column prop="httpMethod" label="Httpæ¹æ³"></el-table-column> |
| | | <el-table-column prop="scopePath" label="apiå°å"></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-drawer :title="'å½åéä¸èåè·¯å¾'+drawerPath" v-model="drawer" :direction="direction" :before-close="handleClose" size="780" class="drawerClass"> |
| | | <el-form :inline="true" :model="drawerSearchData" abel-width="120px"> |
| | | <el-form-item label="æ¥å£æ¨¡å"> |
| | | <el-select v-model="drawerSearchData.moduleCode" style="width: 100%"> |
| | | <el-option v-for="item in aList" :key="item.id" :label="item.title" :value="item.id"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ¥å£Controller"> |
| | | <el-select v-model="drawerSearchData.controllerCode" style="width: 100%"> |
| | | <el-option v-for="item in aList" :key="item.id" :label="item.title" :value="item.id"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="drawerSearchclick">æç´¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <div class="dict-table"> |
| | | <el-table ref="multipleTableRef" :data="drawerTableData" border style="width: 100%" class="multipleTableRef" @selection-change="drawerHandleSelectionChange"> |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column prop="className" label="æ¥å£æ¨¡å"></el-table-column> |
| | | <el-table-column prop="controllerCode" label="Controller"></el-table-column> |
| | | <el-table-column prop="name" label="action"></el-table-column> |
| | | <el-table-column prop="httpMethod" label="Httpæ¹æ³"></el-table-column> |
| | | <el-table-column prop="url" label="apiå°å"></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <div class="drawer-foot"> |
| | | <el-button type="primary" @click="drawerConfirm" disabled>æ·»å </el-button> |
| | | <el-button @click="closeDrawer">åæ¶</el-button> |
| | | </div> |
| | | </el-drawer> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | name: "apiscope", |
| | | data(){ |
| | | return { |
| | | drawerPath: "", |
| | | searchData: { |
| | | menuId: "", |
| | | size: "15", |
| | | current: "1" |
| | | }, |
| | | searchDataList: [], //å³ä¾§æ°æ®list |
| | | aList: [], |
| | | drawerSearchData: { |
| | | moduleCode: "", |
| | | controllerCode: "", |
| | | menuId: "", |
| | | size: "-1" |
| | | }, |
| | | direction: "rtl", |
| | | drawer: false, |
| | | defalutProps: { |
| | | label: 'name', |
| | | children: 'children', |
| | | isLeaf: 'hasChildren' |
| | | }, |
| | | parentId: "0", |
| | | tableData: [], |
| | | searchSelection: [] |
| | | } |
| | | }, |
| | | created(){ |
| | | |
| | | }, |
| | | mounted(){ |
| | | //this.getMenuList(); |
| | | }, |
| | | components: { |
| | | |
| | | }, |
| | | methods: { |
| | | closeDrawer() { |
| | | this.drawer = false; |
| | | }, |
| | | drawerConfirm() { |
| | | this.drawer = false; |
| | | }, |
| | | searchHandleSelectionChange(selection) { |
| | | this.searchSelection = selection; |
| | | }, |
| | | drawerHandleSelectionChange() { |
| | | |
| | | }, |
| | | drawerSearchclick() { |
| | | this.drawerSearchData.menuId = this.searchData.menuId; |
| | | var obj = {}; |
| | | for(var key in this.drawerSearchData) { |
| | | if(this.drawerSearchData[key]) { |
| | | obj[key] = this.drawerSearchData[key]; |
| | | } |
| | | } |
| | | this.$HTTP.get("/api/blade-system/resource-definition/page",obj).then(res=> { |
| | | if(res.code == 200) { |
| | | this.drawerTableData = res.data.records; |
| | | } |
| | | }) |
| | | }, |
| | | handleClose(done) { |
| | | done(); |
| | | }, |
| | | handleNodeClick(data) { |
| | | this.drawerPath = data.name; |
| | | console.log(data,data.name,222) |
| | | this.searchData.menuId = data.id; |
| | | this.$HTTP.get("/api/blade-system/api-scope/list",this.searchData).then(res=> { |
| | | if(res.code == 200) { |
| | | this.searchDataList = res.data.records; |
| | | } |
| | | }) |
| | | }, |
| | | getMenuList() { |
| | | this.$HTTP.get("/api/blade-system/menu/lazy-list?parentId=0").then(res=> { |
| | | if(res.code == 200) { |
| | | this.tableData = res.data; |
| | | } |
| | | }) |
| | | }, |
| | | loadNode(node, resolve, reject) { |
| | | if(node.data.id) { |
| | | this.parentId = node.data.id; |
| | | }else { |
| | | this.parentId = '0'; |
| | | } |
| | | this.$HTTP.get("/api/blade-system/menu/lazy-list",{parentId: this.parentId}).then(res=> { |
| | | if(res.code == 200) { |
| | | res.data.forEach(node => { |
| | | node.hasChildren = !node.hasChildren; |
| | | }); |
| | | resolve(res.data); |
| | | } |
| | | }) |
| | | }, |
| | | addData() { |
| | | this.drawerSearchclick(); |
| | | this.drawer = true; |
| | | }, |
| | | delData() { |
| | | if(this.searchSelection.length == 0) { |
| | | this.$message({ |
| | | message: 'è¯·éæ©è³å°ä¸æ¡æ°æ®', |
| | | type: 'warning' |
| | | }); |
| | | return; |
| | | } |
| | | var selStr = ""; |
| | | this.searchSelection.map(item=> { |
| | | selStr += item.id + "," |
| | | }) |
| | | selStr = selStr.replace(/,$/, ''); |
| | | var that = this; |
| | | // this.$HTTP.post("/api/blade-system/data-scope/remove?ids="+selStr).then(res=> { |
| | | // if(res.code == 200) { |
| | | // that.$message.success("æä½æå"); |
| | | // that.drawerSearchclick(); |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .aposcope-main { |
| | | display: flex; |
| | | min-height: 100%; |
| | | margin: 8px; |
| | | } |
| | | .aposcope-left { |
| | | width: 240px; |
| | | margin-right: 8px; |
| | | padding: 4px; |
| | | background-color: #fff; |
| | | } |
| | | .aposcope-right { |
| | | flex: 1; |
| | | padding: 8px; |
| | | background-color: #fff; |
| | | } |
| | | .left-title { |
| | | font-size: 16px; |
| | | text-align: center; |
| | | height: 38px; |
| | | line-height: 38px; |
| | | border-bottom: 1px solid #e2e2e2; |
| | | background-color: #409eff; |
| | | color: #fff; |
| | | border-radius: 2px 2px 0 0; |
| | | } |
| | | .right-content { |
| | | text-align: center; |
| | | } |
| | | .right-content img { |
| | | width: 350px; |
| | | height: 350px; |
| | | } |
| | | .right-content > div { |
| | | font-size: 14px;; |
| | | } |
| | | .right-content > div span:nth-child(2) { |
| | | margin-left: 8px; |
| | | color: #409eff; |
| | | cursor: pointer; |
| | | } |
| | | /deep/ .drawerClass { |
| | | padding: 8px; |
| | | } |
| | | .datascope-drawer-btn { |
| | | margin-bottom: 8px; |
| | | } |
| | | .drawer-foot { |
| | | margin-top: 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog :title="titleMap[mode]" v-model="visible" :width="800" destroy-on-close @closed="$emit('closed')"> |
| | | <el-form :model="addDictForm" :rules="addDictRules" :disabled="mode=='show'" ref="dialogForm" label-width="120px" label-position="center"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æéåç§°" prop="scopeName"> |
| | | <el-input v-model="addDictForm.scopeName" placeholder="æéåç§°" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æéç¼å·" prop="resourceCode"> |
| | | <el-input v-model="addDictForm.resourceCode" placeholder="æéç¼å·" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æéåæ®µ" prop="scopeColumn"> |
| | | <el-input v-model="addDictForm.scopeColumn" placeholder="æéåæ®µ" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è§ååç±»" prop="scopeType"> |
| | | <el-select v-model="addDictForm.scopeType" style="width: 100%" @change="scopeTypeNameChange" placeholder="è§ååç±»"> |
| | | <el-option v-for="item in scopeTypeNameList" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å¯è§å段" prop="scopeField"> |
| | | <el-input v-model="addDictForm.scopeField" placeholder="å¯è§å段" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="æéç±»å" prop="scopeClass"> |
| | | <el-input v-model="addDictForm.scopeClass" placeholder="æéç±»å" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="è§åå¼" v-if="addDictForm.scopeType == '5'"> |
| | | <el-input type="textarea" v-model="addDictForm.scopeValue" placeholder="è§åå¼" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿³¨"> |
| | | <el-input v-model="addDictForm.remark" placeholder="夿³¨" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <el-button @click="visible=false" >å æ¶</el-button> |
| | | <el-button v-if="mode!='show'" type="primary" :loading="isSaveing" @click="dictSubmit()">ä¿ å</el-button> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | emits: ['success', 'closed'], |
| | | data() { |
| | | return { |
| | | value1: true, |
| | | mode: "add", |
| | | titleMap: { |
| | | add: 'æ°å¢', |
| | | edit: 'ä¿®æ¹', |
| | | show: 'æ¥ç' |
| | | }, |
| | | visible: false, |
| | | isSaveing: false, |
| | | //è¡¨åæ°æ® |
| | | addDictForm: { |
| | | $scopeType: "", |
| | | scopeName: "å·¥ä½å°[ææ ]", |
| | | resourceCode: "", |
| | | scopeColumn: "", |
| | | scopeType: "", |
| | | scopeField: "", |
| | | scopeClass: "", |
| | | remark: "", |
| | | scopeValue: "" |
| | | }, |
| | | //éªè¯è§å |
| | | addDictRules: { |
| | | scopeName:[{required: true, message: '请è¾å
¥æéåç§°'}], |
| | | resourceCode:[{required: true, message: '请è¾å
¥æéç¼å·'}], |
| | | scopeColumn:[{required: true, message: '请è¾å
¥æéåæ®µ'}], |
| | | scopeType:[{required: true, message: '请è¾å
¥è§ååç±»',trigger: 'change'}], |
| | | scopeField:[{required: true, message: '请è¾å
¥å¯è§å段'}], |
| | | scopeClass:[{required: true, message: '请è¾å
¥æéç±»å'}], |
| | | }, |
| | | //æéæ°æ®é项 |
| | | groups: [], |
| | | groupsProps: { |
| | | value: "id", |
| | | multiple: true, |
| | | checkStrictly: true |
| | | }, |
| | | depts: [], |
| | | deptsProps: { |
| | | value: "id", |
| | | checkStrictly: true |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | // this.getDept() |
| | | }, |
| | | props: ['scopeTypeNameList','tableRow'], |
| | | methods: { |
| | | scopeTypeNameChange(value) { |
| | | this.scopeTypeNameList.forEach(item=> { |
| | | if(item.dictKey == value) { |
| | | this.addDictForm.scopeName = `å·¥ä½å°[${item.dictValue}]`; |
| | | this.addDictForm.$scopeType = item.dictValue; |
| | | } |
| | | }) |
| | | if(value == "2") { |
| | | this.addDictForm.scopeColumn = 'create_user'; |
| | | }else if(value == "3" || value == "4") { |
| | | this.addDictForm.scopeColumn = 'create_dept'; |
| | | }else { |
| | | this.addDictForm.scopeColumn = ""; |
| | | } |
| | | }, |
| | | //æ¾ç¤º |
| | | open(mode='add'){ |
| | | this.mode = mode; |
| | | this.visible = true; |
| | | this.addDictForm.resourceCode = this.tableRow.alias; |
| | | return this |
| | | }, |
| | | //å è½½æ æ°æ® |
| | | async getGroup(){ |
| | | var res = await this.$API.system.role.list.get(); |
| | | this.groups = res.data.rows; |
| | | }, |
| | | async getDept(){ |
| | | var res = await this.$API.system.dept.list.get(); |
| | | this.depts = res.data; |
| | | }, |
| | | //表åæäº¤æ¹æ³ |
| | | dictSubmit(){ |
| | | this.addDictForm.menuId = this.tableRow.id; |
| | | var obj = Object.assign({},this.addDictForm); |
| | | this.$refs.dialogForm.validate(async (valid) => { |
| | | if (valid) { |
| | | this.isSaveing = true; |
| | | this.$HTTP.post("/api/blade-system/data-scope/submit",obj).then(res=> { |
| | | this.isSaveing = false; |
| | | if(res.code == 200) { |
| | | this.$emit('success', this.addDictForm, this.mode); |
| | | this.visible = false; |
| | | this.$message.success("æä½æå"); |
| | | }else { |
| | | this.$alert(res.message, "æç¤º", {type: 'error'}); |
| | | } |
| | | }) |
| | | }else{ |
| | | return false; |
| | | } |
| | | }) |
| | | }, |
| | | //è¡¨åæ³¨å
¥æ°æ® |
| | | setData(data){ |
| | | data.scopeType = String(data.scopeType); |
| | | //å¯ä»¥åä¸é¢ä¸æ ·å个注å
¥ï¼ä¹å¯ä»¥åä¸é¢ä¸æ ·ç´æ¥åå¹¶è¿å» |
| | | Object.assign(this.addDictForm, data); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: lzhe lzhe@example.com |
| | | * @Date: 2024-03-26 10:28:33 |
| | | * @LastEditors: lzhe lzhe@example.com |
| | | * @LastEditTime: 2024-04-17 18:02:12 |
| | | * @FilePath: /smart-web/src/views/master/person/main/index.vue |
| | | * @Description: è¿æ¯é»è®¤è®¾ç½®,请设置`customMade`, æå¼koroFileHeaderæ¥çé
ç½® è¿è¡è®¾ç½®: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | --> |
| | | <template> |
| | | <div class="dict-main"> |
| | | <el-form :inline="true" :model="searchData" abel-width="120px"> |
| | | <el-form-item label="æéåç§°"> |
| | | <el-input v-model="searchData.name" placeholder="æéåç§°" clearable /> |
| | | </el-form-item> |
| | | <el-form-item label="æéæè¿°"> |
| | | <el-input v-model="searchData.code" placeholder="æéæè¿°" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="searchclick">æç´¢</el-button> |
| | | <el-button @click="searchClearBtn">æ¸
空</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <div style="margin-bottom: 12px;"> |
| | | <el-button type="primary">æ·»å </el-button> |
| | | <el-button type="danger" @click="delData">å é¤</el-button> |
| | | <el-button type="primary" @click="addAuthority">æé设置</el-button> |
| | | </div> |
| | | <div class="dict-table"> |
| | | <el-table ref="multipleTableRef" :data="tableData" border row-key="id" style="width: 100%" class="multipleTableRef" @selection-change="handleSelectionChange" :tree-props="{ children: 'children', hasChildren: 'has' }"> |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column prop="test" label="æéåç§°"></el-table-column> |
| | | <el-table-column prop="test" label="æéæè¿°"></el-table-column> |
| | | <el-table-column prop="test" label="æéç±»å"></el-table-column> |
| | | <el-table-column prop="test" label="æåº"></el-table-column> |
| | | <el-table-column fixed="right" label="æä½"> |
| | | <template #default="scope"> |
| | | <el-button text type="primary" size="small" @click="showDrawer(scope.row, scope.$index)">æéé
ç½®</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <save-dialog v-if="dialog.save" ref="saveDialog" :scopeTypeNameList="scopeTypeNameList" :tableRow="tableRow" @success="addDatascopeSuccess" @closed="dialog.save=false"></save-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import saveDialog from './add-scope-manager' |
| | | import * as ElementPlusIconsVue from '@element-plus/icons-vue' |
| | | let icons = [] |
| | | for (const [key, component] of Object.entries(ElementPlusIconsVue)) { |
| | | icons.push(key) |
| | | } |
| | | export default { |
| | | name: "datascope", |
| | | data(){ |
| | | return { |
| | | scopeTypeNameList: [], |
| | | dialog: { |
| | | save: false |
| | | }, |
| | | drawerTotal: 0, |
| | | direction: "rtl", |
| | | drawer: false, |
| | | icons, |
| | | belongApplicationList: [], |
| | | fileDialogVisible: false, |
| | | getModalData: [], |
| | | selection: [], |
| | | drawerSelection: [], |
| | | total: 0, |
| | | drawerSearchData: { |
| | | scopeName: "", |
| | | resourceCode: "", |
| | | menuId: "", |
| | | current: 1, |
| | | size: 10 |
| | | }, |
| | | searchData: { |
| | | name: "", |
| | | code: "", |
| | | belongApplication: "", |
| | | parentId: "" |
| | | }, |
| | | dialog: { |
| | | save: false, |
| | | allocation: false |
| | | }, |
| | | tableData: [], |
| | | drawerTableData: [], |
| | | rowId: "", |
| | | tableRow: {} |
| | | } |
| | | }, |
| | | created(){ |
| | | |
| | | }, |
| | | mounted(){ |
| | | this.getscopeTypeNameList();//è§ååç±»æä¸¾ |
| | | this.searchBtn(); |
| | | }, |
| | | components: { |
| | | ...ElementPlusIconsVue,saveDialog |
| | | }, |
| | | methods: { |
| | | getscopeTypeNameList() { //è§ååç±»æä¸¾ |
| | | this.$HTTP.get("/api/blade-system/dict/dictionary?code=data_scope_type").then(res=> { |
| | | if(res.code == 200) { |
| | | this.scopeTypeNameList = res.data; |
| | | } |
| | | }) |
| | | }, |
| | | addDatascopeSuccess() { |
| | | this.drawerSearchclick(); |
| | | }, |
| | | addData(){ |
| | | this.dialog.save = true |
| | | this.$nextTick(() => { |
| | | this.$refs.saveDialog.open() |
| | | }) |
| | | }, |
| | | addAuthority() { |
| | | this.$message({ |
| | | message: 'åªè½éæ©ä¸æ¡æ°æ®', |
| | | type: 'warning' |
| | | }); |
| | | }, |
| | | // å é¤ |
| | | delData() { |
| | | if(this.drawerSelection.length == 0) { |
| | | this.$message({ |
| | | message: 'è¯·éæ©è³å°ä¸æ¡æ°æ®', |
| | | type: 'warning' |
| | | }); |
| | | return; |
| | | } |
| | | var selStr = ""; |
| | | this.drawerSelection.map(item=> { |
| | | selStr += item.id + "," |
| | | }) |
| | | selStr = selStr.replace(/,$/, ''); |
| | | var that = this; |
| | | this.$HTTP.post("/api/blade-system/data-scope/remove?ids="+selStr).then(res=> { |
| | | if(res.code == 200) { |
| | | that.$message.success("æä½æå"); |
| | | that.drawerSearchclick(); |
| | | } |
| | | }) |
| | | }, |
| | | table_edit(row){ //ç¼è¾ |
| | | this.dialog.save = true |
| | | this.$HTTP.get("/api/blade-system/data-scope/detail?id="+row.id).then(res=> { |
| | | if(res.code == 200) { |
| | | this.dialog.save = true; |
| | | this.$nextTick(() => { |
| | | this.$refs.saveDialog.open('edit').setData(res.data); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | //æ¥ç |
| | | table_show(row){ //æ¥ç |
| | | this.dialog.save = true |
| | | this.$nextTick(() => { |
| | | this.$refs.saveDialog.open('show').setData(row) |
| | | }) |
| | | }, |
| | | table_del(row) { |
| | | var that = this; |
| | | this.$confirm(`ç¡®å®å°éæ©æ°æ®å é¤?`, '', { |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$HTTP.post("/api/blade-system/data-scope/remove?ids="+row.id).then(res=> { |
| | | if(res.code == 200) { |
| | | that.$message.success("æä½æå"); |
| | | that.drawerSearchclick(); |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | |
| | | }) |
| | | }, |
| | | handleClose(done) { |
| | | this.drawerTableData = []; |
| | | done(); |
| | | }, |
| | | exportFile(row,index){ |
| | | window.open(row.link); |
| | | }, |
| | | codeClick() { |
| | | |
| | | }, |
| | | searchClearBtn() { |
| | | this.searchData = { |
| | | name: "", |
| | | code: "", |
| | | belongApplication: "", |
| | | parentId: "" |
| | | } |
| | | this.searchBtn(); |
| | | }, |
| | | showDrawer(row){ |
| | | this.rowId = row.id; |
| | | this.tableRow = row; //åé¢ç»ä»¶ä¼ç¨å° |
| | | this.drawerSearchclick(); |
| | | this.drawer = true; |
| | | }, |
| | | drawerSearchclick() { |
| | | var obj = {}; |
| | | for(var key in this.drawerSearchData) { |
| | | if(this.drawerSearchData[key]) { |
| | | obj[key] = this.drawerSearchData[key]; |
| | | } |
| | | } |
| | | obj.menuId = this.rowId; |
| | | this.$HTTP.get("/api/blade-system/data-scope/list?"+this.$TOOL.qsStringify(obj)).then(res=> { |
| | | if(res.code == 200) { |
| | | this.drawerTableData = res.data.records; |
| | | this.drawerTotal = res.data.total; |
| | | } |
| | | }) |
| | | }, |
| | | drawerSearchClearBtn() { |
| | | this.drawerSearchData = { |
| | | scopeName: "", |
| | | resourceCode: "", |
| | | menuId: this.rowId, |
| | | current: 1, |
| | | size: 10 |
| | | } |
| | | this.drawerSearchclick(); |
| | | }, |
| | | searchclick() { |
| | | this.searchBtn(); |
| | | }, |
| | | searchBtn() { |
| | | var obj = {}; |
| | | for(var key in this.searchData) { |
| | | if(this.searchData[key]) { |
| | | obj[key] = this.searchData[key]; |
| | | } |
| | | } |
| | | // this.$HTTP.get("/api/blade-system/menu/lazy-menu-list",obj).then(res=> { |
| | | // if(res.code == 200) { |
| | | // this.tableData = res.data; |
| | | // } |
| | | // }) |
| | | }, |
| | | handleSelectionChange(selection) { |
| | | this.selection = selection; |
| | | }, |
| | | drawerHandleSelectionChange(selection) { |
| | | this.drawerSelection = selection; |
| | | }, |
| | | changeDepartment() { |
| | | this.departmentVisible = true; |
| | | }, |
| | | handleSizeChange(val) { |
| | | console.log(`æ¯é¡µ ${val} æ¡`); |
| | | this.drawerSearchData.current = "1"; |
| | | this.drawerSearchData.size = val; |
| | | this.drawerSearchclick(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | console.log(`å½å页: ${val}`); |
| | | this.drawerSearchData.current = val; |
| | | this.drawerSearchclick(); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .dict-main { |
| | | background-color: #fff; |
| | | margin: 8px; |
| | | padding: 8px; |
| | | } |
| | | .dict-Btn { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | border-bottom: 1px solid #dcdfe6; |
| | | margin-bottom: 8px; |
| | | padding-left: 8px; |
| | | padding-right: 8px; |
| | | } |
| | | .dict-btn-bottom { |
| | | padding-left: 8px; |
| | | padding-right: 8px; |
| | | margin-bottom: 8px; |
| | | } |
| | | .dict-table { |
| | | padding-left: 8px; |
| | | padding-right: 8px; |
| | | margin-bottom: 8px; |
| | | |
| | | } |
| | | .multipleTableRef { |
| | | margin-bottom: 8px; |
| | | } |
| | | .attachSize { |
| | | color:#3b8e8e; |
| | | padding: 0 10px; |
| | | font-size: 12px; |
| | | background-color: #ebf4f4; |
| | | border: 1px solid #d8e8e8; |
| | | } |
| | | /deep/ .drawerStyle { |
| | | padding: 20px; |
| | | } |
| | | .datascope-drawer-btn { |
| | | margin-bottom: 8px; |
| | | padding-left: 8px; |
| | | padding-right: 8px; |
| | | } |
| | | </style> |
| | |
| | | //console.log(this.setCard,222) |
| | | }, |
| | | getCard() { //è·åå¿«æ·èå |
| | | var data = this.$TOOL.data.get("MENU"); |
| | | this.workid = data[0].children[0].id; //è®°å½ç¬¬ä¸ä¸ªchildrençid |
| | | this.$HTTP.get(`/api/blade-system/workbench-card/list?workbenchId=${this.workid}`).then(res=> { |
| | | if(res.code == 200) { |
| | | this.setCard = res.data; |