¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const gridCodeRule = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/mdmRule/gridCodeRule', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (oid) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/mdmRule/detail', |
| | | method: 'get', |
| | | params: { |
| | | oid |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const remove = (codeRuleDTO) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/mdmRule/deleteData', |
| | | method: 'delete', |
| | | data: codeRuleDTO, |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/mdmRule/addCode', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/mdmRule/update', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ä½¿ç¨èå´ |
| | | * @param {*} oid |
| | | * @returns |
| | | */ |
| | | export const listUseRange = (oid) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/mdmRule/listUseRange', |
| | | method: 'get', |
| | | params:{ |
| | | oid |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * ç¼ç è§åæ¸
空ææå·²çæçç¼ç |
| | | * @param {*} oid |
| | | * @returns |
| | | */ |
| | | export const clearAllCode = (oid) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/mdmRule/clearAllCode', |
| | | method: 'delete', |
| | | params:{ |
| | | oid |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * åç¨ä¸å¯ç¨ç¼ç è§å |
| | | * @param {*} map |
| | | * @returns |
| | | */ |
| | | export const updateStatus = (map) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/mdmRule/updateStatus', |
| | | method: 'post', |
| | | data: map |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * åç
§ä¸»æ°æ®ç¼ç è§åå表 |
| | | * @param {*} oid |
| | | * @returns |
| | | */ |
| | | export const refDataGrid = (current, size, params) => { |
| | | return request({ |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * å
éç¼ç è§å |
| | | * @param {*} codeRuleDTO |
| | | * @returns |
| | | */ |
| | | export const clone = (codeRuleDTO) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/mdmRule/clone', |
| | | method: 'post', |
| | | data: codeRuleDTO |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 主é®è·åä¸»æ°æ®ç¼ç è§å |
| | | * @param {*} oid |
| | | * @returns |
| | | */ |
| | | export const getObjectByOid = (oid) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/mdmRule/getObjectByOid', |
| | | method: 'get', |
| | | params: { |
| | | oid |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 䏻鮿¹éè·åä¸»æ°æ®ç¼ç è§å |
| | | * @param {*} codeRuleDTO |
| | | * @returns |
| | | */ |
| | | export const listDataByOids = (oids) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/mdmRule/listDataByOids', |
| | | method: 'get', |
| | | params: { |
| | | oids |
| | | } |
| | | }) |
| | | } |
| | |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/blade-system/role/submit', |
| | | url: '/api/ubcs-system/role/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | |
| | | |
| | | export const historyFlowList = (processInstanceId) => { |
| | | return request({ |
| | | url: '/api/blade-flow/process/history-flow-list', |
| | | url: '/api/ubcs-flow/process/history-flow-list', |
| | | method: 'get', |
| | | params: { |
| | | processInstanceId |
| | |
| | | |
| | | export const leaveProcess = (data) => { |
| | | return request({ |
| | | url: '/api/blade-desk/process/leave/start-process', |
| | | url: '/api/ubcs-desk/process/leave/start-process', |
| | | method: 'post', |
| | | data |
| | | }) |
| | |
| | | |
| | | export const leaveDetail = (businessId) => { |
| | | return request({ |
| | | url: '/api/blade-desk/process/leave/detail', |
| | | url: '/api/ubcs-desk/process/leave/detail', |
| | | method: 'get', |
| | | params: { |
| | | businessId |
| | |
| | | |
| | | export const startList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/blade-flow/work/start-list', |
| | | url: '/api/ubcs-flow/work/start-list', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | |
| | | |
| | | export const claimList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/blade-flow/work/claim-list', |
| | | url: '/api/ubcs-flow/work/claim-list', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | |
| | | |
| | | export const todoList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/blade-flow/work/todo-list', |
| | | url: '/api/ubcs-flow/work/todo-list', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | |
| | | |
| | | export const sendList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/blade-flow/work/send-list', |
| | | url: '/api/ubcs-flow/work/send-list', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | |
| | | |
| | | export const doneList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/blade-flow/work/done-list', |
| | | url: '/api/ubcs-flow/work/done-list', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | |
| | | |
| | | export const claimTask = (taskId) => { |
| | | return request({ |
| | | url: '/api/blade-flow/work/claim-task', |
| | | url: '/api/ubcs-flow/work/claim-task', |
| | | method: 'post', |
| | | params: { |
| | | taskId |
| | |
| | | |
| | | export const completeTask = (data) => { |
| | | return request({ |
| | | url: '/api/blade-flow/work/complete-task', |
| | | url: '/api/ubcs-flow/work/complete-task', |
| | | method: 'post', |
| | | data |
| | | }) |
| | |
| | | } |
| | | }, |
| | | // ç¬¬ä¸æ¹ç³»ç»ææå°å |
| | | authUrl: 'http://localhost/blade-auth/oauth/render', |
| | | authUrl: 'http://localhost/ubcs-auth/oauth/render', |
| | | // æ¥è¡¨è®¾è®¡å¨å°å(cloud端å£ä¸º8108,boot端å£ä¸º80) |
| | | reportUrl: 'http://localhost:8108/ureport', |
| | | // åç¹ç»å½ç³»ç»è®¤è¯(blade-authæå¡çå°) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | height:'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | editBtn:false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "ç¼å·", |
| | | prop: "id", |
| | | search: true, |
| | | searchLabelWidth: 45, |
| | | searchSpan: 4, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请è¾å
¥ç¼å·", |
| | | trigger: "blur", |
| | | }] |
| | | }, |
| | | { |
| | | label: "åç§°", |
| | | prop: "name", |
| | | search: true, |
| | | searchLabelWidth: 45, |
| | | searchSpan: 4, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请è¾å
¥åç§°", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "æè¿°", |
| | | prop: "description", |
| | | search: true, |
| | | type: "textarea", |
| | | searchLabelWidth: 45, |
| | | searchSpan: 5, |
| | | span: 24, |
| | | overHidden: true, |
| | | rules: [{ |
| | | required: false, |
| | | message: "请è¾å
¥æè¿°", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "ç¶æ", |
| | | prop: "lcStatusText", |
| | | search: true, |
| | | searchLabelWidth: 45, |
| | | searchSpan: 5, |
| | | display: false, |
| | | }, |
| | | ] |
| | | } |
| | |
| | | search: true, |
| | | span: 24, |
| | | type: "select", |
| | | dicUrl: "/api/blade-develop/datasource/select", |
| | | dicUrl: "/api/ubcs-develop/datasource/select", |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | |
| | | label: 'åå
¸ç¼ç ', |
| | | prop: 'dictCode', |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict/select", |
| | | dicUrl: "/api/ubcs-system/dict/select", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "code" |
| | |
| | | |
| | | export default ({mock}) => { |
| | | if (!mock) return; |
| | | Mock.mock(/\/api\/blade-system\/param\/list/, 'get', getFakeList); |
| | | Mock.mock(/\/api\/ubcs-system\/param\/list/, 'get', getFakeList); |
| | | |
| | | Mock.mock(/\/api\/blade-system\/param\/detail/, 'get', getFakeDetail); |
| | | Mock.mock(/\/api\/ubcs-system\/param\/detail/, 'get', getFakeDetail); |
| | | |
| | | Mock.mock(/\/api\/blade-system\/param\/submit/, 'post', fakeSuccess); |
| | | Mock.mock(/\/api\/ubcs-system\/param\/submit/, 'post', fakeSuccess); |
| | | |
| | | Mock.mock(/\/api\/blade-system\/param\/remove/, 'post', fakeSuccess); |
| | | Mock.mock(/\/api\/ubcs-system\/param\/remove/, 'post', fakeSuccess); |
| | | |
| | | } |
| | |
| | | text: ' ', |
| | | ratio: 0.1 |
| | | }, |
| | | action: '/api/blade-resource/oss/endpoint/put-file', |
| | | action: '/api/ubcs-resource/oss/endpoint/put-file', |
| | | tip: 'åªè½ä¸ä¼ jpg/pngç¨æ·å¤´åï¼ä¸ä¸è¶
è¿500kb', |
| | | span: 12, |
| | | row: true, |
| | |
| | | switchDept() { |
| | | const userId = this.userInfo.user_id; |
| | | const deptColumn = this.findObject(this.userOption.column, "deptId"); |
| | | deptColumn.dicUrl = `/api/blade-system/dept/select?userId=${userId}`; |
| | | deptColumn.dicUrl = `/api/ubcs-system/dept/select?userId=${userId}`; |
| | | deptColumn.display = true; |
| | | const roleColumn = this.findObject(this.userOption.column, "roleId"); |
| | | roleColumn.dicUrl = `/api/blade-system/role/select?userId=${userId}`; |
| | | roleColumn.dicUrl = `/api/ubcs-system/role/select?userId=${userId}`; |
| | | roleColumn.display = true; |
| | | this.userBox = true; |
| | | }, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :permission="permissionList" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | </avue-crud> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import {clone} from "@/api/code/mdmrule"; |
| | | export default { |
| | | name: "cloneCode", |
| | | data() { |
| | | return { |
| | | loading: true, |
| | | selectionList: [], |
| | | option: { |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: false, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | disablePage:false, |
| | | viewBtn: false, |
| | | selection: false, |
| | | dialogClickModal: false, |
| | | dialogWidth: 400, |
| | | column: [ |
| | | { |
| | | label: "ç æ®µç¼å·", |
| | | prop: "packageName", |
| | | span: 24 |
| | | }, |
| | | { |
| | | label: "ç æ®µåç§°", |
| | | prop: "menuId", |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "ç æ®µæè¿°", |
| | | prop: "menuId", |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "ç æ®µç±»å", |
| | | prop: "menuId", |
| | | span: 24, |
| | | } |
| | | ] |
| | | }, |
| | | data: [] |
| | | }; |
| | | }, |
| | | computed: { |
| | | permissionList() { |
| | | return { |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | editBtn: false |
| | | }; |
| | | }, |
| | | |
| | | }, |
| | | methods: { |
| | | initData() { |
| | | |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(); |
| | | }, |
| | | onLoad() { |
| | | this.loading = true; |
| | | let oid = localStorage.getItem("cloneOid"); |
| | | console.log(oid); |
| | | }, |
| | | save(){ |
| | | clone().then(() => { |
| | | this.loading = true; |
| | | this.$message({ |
| | | type: "success", |
| | | message: "æä½æå!" |
| | | }); |
| | | }, error => { |
| | | window.console.log(error); |
| | | }); |
| | | }, |
| | | |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <basic-container> |
| | | <!-- ç¼ç è§åä¿¡æ¯å±ç¤ºåºå --> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | v-model="form" |
| | | ref="crud" |
| | | :before-open="beforeOpen" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <!-- è¡¨æ ¼å
æä½æé® --> |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button type="text" |
| | | size="small" |
| | | icon="el-icon-edit" |
| | | v-show="scope.row.lcStatusText=='ç¼è¾ä¸' ? true:false" |
| | | plain |
| | | @click="openEdit(scope.row)">ç¼ è¾ |
| | | </el-button> |
| | | <el-button type="text" |
| | | size="small" |
| | | icon="iconfont iconicon_shakehands" |
| | | v-show="scope.row.lcStatusText=='ç¼è¾ä¸' ? true:false" |
| | | plain |
| | | @click="enableOrDeactivatse(scope.row.oid,'release')">å å¸ |
| | | </el-button> |
| | | <el-button type="text" |
| | | size="small" |
| | | v-show="scope.row.lcStatusText=='å·²åå¸' ? true:false" |
| | | icon="iconfont iconicon_details" |
| | | plain |
| | | @click="enableOrDeactivatse(scope.row.oid,'disable')">å ç¨ |
| | | </el-button> |
| | | <el-button type="text" |
| | | size="small" |
| | | v-show="scope.row.lcStatusText=='åç¨' ? true:false" |
| | | icon="iconfont iconicon_task_done" |
| | | plain |
| | | @click="enableOrDeactivatse(scope.row.oid,'enable')">å¯ ç¨ |
| | | </el-button> |
| | | </template> |
| | | <!-- è¡¨æ ¼å·¦ä¸æ¹æé®åºå --> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | @click="handleDelete">å é¤ |
| | | </el-button> |
| | | <el-button size="small" |
| | | icon="el-icon-coin" |
| | | plain |
| | | @click="cloneCodeSetting">å
é |
| | | </el-button> |
| | | <el-button size="small" |
| | | icon="el-icon-coine" |
| | | plain |
| | | @click="handleDelete">ä»å
¶ä»è§åä¸å
éç æ®µ |
| | | </el-button> |
| | | <el-button size="small" |
| | | icon="el-icon-notebook-1" |
| | | plain |
| | | @click="handleRange">使ç¨èå´ |
| | | </el-button> |
| | | <el-button size="small" |
| | | icon="el-icon-notebook-2" |
| | | plain |
| | | @click="handleDelete">æ¸
空ç å¼ |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <!-- å¯¹è¯æ¡ --> |
| | | <el-dialog title="ç¼ç è§å使ç¨èå´" |
| | | append-to-body |
| | | :visible.sync="codeRangeSettingBox" |
| | | width="800px"> |
| | | <avue-crud |
| | | :option="dialogeOption" |
| | | :table-loading="dialogLoading" |
| | | :data="useRangeData" |
| | | @refresh-change="refreshUseRangeChange"></avue-crud> |
| | | </el-dialog> |
| | | <!-- å
éå¯¹è¯æ¡ --> |
| | | <el-dialog title="å
éç¼ç è§å" |
| | | append-to-body |
| | | :visible.sync="cloneSettingBox" |
| | | width="800px"> |
| | | <clone-code></clone-code> |
| | | </el-dialog> |
| | | |
| | | <!-- åºç¡ç¼ç ä¿¡æ¯ --> |
| | | |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {gridCodeRule, getDetail, add, update, remove, listUseRange, updateStatus} from "@/api/code/mdmrule"; |
| | | import option from "@/const/code/mdmrule"; |
| | | import {mapGetters} from "vuex"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | selectionList: [], |
| | | option: option, |
| | | data: [], |
| | | |
| | | /*使ç¨èå´*/ |
| | | codeRangeSettingBox: false, |
| | | /*å
éå¼¹çª*/ |
| | | cloneSettingBox: false, |
| | | useRangeData: [], |
| | | dialogLoading: true, |
| | | /*使ç¨èå´å¯¹è¯æ¡*/ |
| | | dialogeOption: { |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: false, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | disablePage:false, |
| | | viewBtn: false, |
| | | addBtn: false, |
| | | menu: false, |
| | | selection: false, |
| | | dialogClickModal: false, |
| | | align: 'center', |
| | | dialogWidth: 400, |
| | | column: [ |
| | | { |
| | | label: "åç±»ç¼å·", |
| | | prop: "id", |
| | | span: 24 |
| | | }, |
| | | { |
| | | label: "åç±»åç§°", |
| | | prop: "name", |
| | | span: 24, |
| | | } |
| | | ] |
| | | }, |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.codeRule_add, true), |
| | | viewBtn: this.vaildData(this.permission.codeRule_view, false), |
| | | delBtn: this.vaildData(this.permission.plCodeRule_delete, false), |
| | | editBtn: this.vaildData(this.permission.codeRule_edit, true) |
| | | }; |
| | | }, |
| | | }, |
| | | methods: { |
| | | //æ¥è¯¢ä½¿ç¨èå´ |
| | | handleRange(){ |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("è¯·éæ©è³å°ä¸æ¡æ°æ®!"); |
| | | return; |
| | | } |
| | | if (this.selectionList.length > 1) { |
| | | this.$message.warning("æ¯æ¬¡åªè½éæ©ä¸æ¡æ°æ®!"); |
| | | return; |
| | | } |
| | | this.codeRangeSettingBox = true; |
| | | this.getRangeCodeList() |
| | | }, |
| | | getRangeCodeList(){ |
| | | this.dialogLoading = true; |
| | | if(this.selectionList[0].oid==null){ |
| | | this.$message.error("æªè·åå°åæ°!"); |
| | | } |
| | | |
| | | listUseRange(this.selectionList[0].oid).then(res => { |
| | | this.useRangeData = res.data.data; |
| | | //console.log(this.useRangeData); |
| | | this.dialogLoading = false; |
| | | }); |
| | | }, |
| | | refreshUseRangeChange(){ |
| | | this.getRangeCodeList(); |
| | | }, |
| | | //å¯ç¨ä¸åç¨ |
| | | enableOrDeactivatse(oId,update){ |
| | | updateStatus({"oid":oId,"ts":new Date().getTime,"update":update}).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "æä½æå!" |
| | | }); |
| | | }, error => { |
| | | window.console.log(error); |
| | | }); |
| | | }, |
| | | //å
é |
| | | cloneCodeSetting() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("è¯·éæ©è³å°ä¸æ¡æ°æ®!"); |
| | | return; |
| | | } |
| | | if (this.selectionList.length > 1) { |
| | | this.$message.warning("æ¯æ¬¡åªè½éæ©ä¸æ¡æ°æ®!"); |
| | | return; |
| | | } |
| | | localStorage.setItem("cloneOid",this.selectionList[0].oid) |
| | | this.cloneSettingBox = true; |
| | | }, |
| | | |
| | | // æ·»å |
| | | rowSave(row, done, loading) { |
| | | add(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "æä½æå!" |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | loading(); |
| | | window.console.log(error); |
| | | }); |
| | | }, |
| | | openEdit(row){ |
| | | this.$refs.crud.rowEdit(row,row.$index); |
| | | }, |
| | | // ä¿®æ¹ |
| | | rowUpdate(row, index, done, loading) { |
| | | row.ts = new Date().getTime; |
| | | update(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "æä½æå!" |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | loading(); |
| | | console.log(error); |
| | | }); |
| | | }, |
| | | // å é¤ |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | return; |
| | | } |
| | | if (this.selectionList.length > 1) { |
| | | this.$message.warning("æ¯æ¬¡åªè½éæ©ä¸æ¡æ°æ®"); |
| | | return; |
| | | } |
| | | this.$confirm("ç¡®å®å°éæ©æ°æ®å é¤?", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | let ts = new Date().getTime(); |
| | | // åªæ¯ææ¯æ¬¡åæ¡è®°å½å é¤ |
| | | let oid = this.selectionList[0].oid |
| | | return remove({oid: oid,ts: ts}); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "æä½æå!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | //æå¼ä¿®æ¹ |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.oid).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | | done(); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | }, |
| | | currentChange(currentPage){ |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize){ |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | gridCodeRule(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | //console.log(res); |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | |
| | | }, |
| | | methods: { |
| | | handlePreview(name) { |
| | | this.$router.push({path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`}); |
| | | this.$router.push({path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=ubcs-${name}`}); |
| | | }, |
| | | handleDesign(name) { |
| | | this.$router.push({path: `/myiframe/urlPath?name=designer-${name}&src=${this.website.reportUrl}/designer?_u=blade-${name}`}); |
| | | this.$router.push({path: `/myiframe/urlPath?name=designer-${name}&src=${this.website.reportUrl}/designer?_u=ubcs-${name}`}); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("ç¡®å®å°éæ©æ°æ®å é¤?", { |
| | |
| | | }, |
| | | 'debugForm.code'() { |
| | | const column = this.findObject(this.debugOption.column, "backgroundUrl"); |
| | | column.action = `/api/blade-resource/oss/endpoint/put-file?code=${this.debugForm.code}`; |
| | | column.action = `/api/ubcs-resource/oss/endpoint/put-file?code=${this.debugForm.code}`; |
| | | } |
| | | }, |
| | | computed: { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud v-model="form" :option="option" :data="data" ref="crud" @row-save="rowSave" @row-update="rowUpdate" @row-del="rowDel"> |
| | | <template slot="icon" slot-scope="scope"> |
| | | <i :class="scope.row.icon" style="font-size:24px"></i> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | export default { |
| | | name: "password.vue", |
| | | data() { |
| | | return { |
| | | parentId:undefined, |
| | | form:{}, |
| | | data: [ |
| | | { |
| | | id: 0, |
| | | event: 'äºä»¶1', |
| | | timeLine: 50, |
| | | comment: 'æ ' |
| | | }, |
| | | { |
| | | id: 1, |
| | | event: 'äºä»¶2', |
| | | timeLine: 100, |
| | | comment: 'æ ', |
| | | |
| | | }, |
| | | { |
| | | id: 2, |
| | | event: 'äºä»¶3', |
| | | timeLine: 100, |
| | | comment: 'æ ', |
| | | } |
| | | ], |
| | | option: { |
| | | headerAlign: 'center', |
| | | align: 'center', |
| | | border: true, |
| | | index: true, |
| | | rowKey:'id', |
| | | rowParentKey:'parentId', |
| | | // defaultExpandAll:true, |
| | | column: [ |
| | | { |
| | | label: 'çç¥åç§°', |
| | | prop: 'name', |
| | | align: 'left', |
| | | span:24 |
| | | }, |
| | | { |
| | | label: 'å¯ç æå°é¿åº¦', |
| | | prop: 'smallLength', |
| | | labelWidth:118, |
| | | span:12 |
| | | }, |
| | | { |
| | | label: 'å¯ç æå¤§é¿åº¦', |
| | | prop: 'bigLength', |
| | | labelWidth:118, |
| | | span:12 |
| | | }, |
| | | { |
| | | label: 'ç»åæ¹æ³', |
| | | prop: 'makeUp', |
| | | type: "checkbox", |
| | | labelWidth:91, |
| | | dicData: [ |
| | | { |
| | | label: "æ°å", |
| | | value: "Dicnumber" |
| | | }, |
| | | { |
| | | label: "符å·", |
| | | value: "Diccharacter" |
| | | }, |
| | | { |
| | | label: "å°å忝", |
| | | value: "smallLeter" |
| | | }, |
| | | { |
| | | label: "大å忝", |
| | | value: "bigLeter" |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: 'å¿
å¡«ç§ç±»', |
| | | prop: 'Required', |
| | | type: 'select', |
| | | labelWidth: 91, |
| | | dicData:[{ |
| | | label:'1ç§', |
| | | value:0 |
| | | }, |
| | | { |
| | | label:'2ç§', |
| | | value:1 |
| | | }, |
| | | { |
| | | label:'3ç§', |
| | | value:2 |
| | | }, |
| | | { |
| | | label:'4ç§', |
| | | value:3 |
| | | } |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | label: 'è¿ææ¶é´(天)', |
| | | prop:'overdueTime', |
| | | labelWidth:115 |
| | | }, |
| | | { |
| | | label: 'æéæ¶é´(天)', |
| | | prop:'remindTime', |
| | | labelWidth:113 |
| | | }, |
| | | { |
| | | label: 'é宿¬¡æ°(次)', |
| | | prop:'locksNumber', |
| | | labelWidth:116 |
| | | }, |
| | | { |
| | | label: 'é宿¶é´(åé)', |
| | | prop:'locksTime', |
| | | labelWidth:128 |
| | | }, |
| | | { |
| | | label: 'æè¿°', |
| | | prop:'overview', |
| | | type: 'textarea', |
| | | rows: 5 |
| | | }, |
| | | { |
| | | label: 'æ¯å¦ä¸ºé»è®¤çç¥', |
| | | prop: 'switch', |
| | | type: 'switch', |
| | | labelWidth: 132, |
| | | dicData:[{ |
| | | label:'å¦', |
| | | value:0 |
| | | },{ |
| | | label:'æ¯', |
| | | value:1 |
| | | }] |
| | | } |
| | | ], |
| | | } |
| | | } |
| | | |
| | | }, |
| | | methods:{ |
| | | rowDel(row,index,done){ |
| | | done(row) |
| | | }, |
| | | rowSave(row,done){ |
| | | row.parentId=this.parentId; |
| | | row.id=new Date().getTime() |
| | | this.parentId=undefined; |
| | | done(row) |
| | | }, |
| | | rowUpdate(row,index,done){ |
| | | done(row) |
| | | }, |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | this.form.codeName = modelName; |
| | | } |
| | | if (validatenull(this.form.serviceName)) { |
| | | this.form.serviceName = `blade-${modelCode}`; |
| | | this.form.serviceName = `ubcs-${modelCode}`; |
| | | } |
| | | if (validatenull(this.form.pkName)) { |
| | | this.form.pkName = "id"; |
| | |
| | | proxy: { |
| | | '/api': { |
| | | //æ¬å°æå¡æ¥å£å°å |
| | | target: 'http://192.168.0.101:37000', |
| | | target: 'http://192.168.3.7:37000', |
| | | // target: 'http://dev.vci-tech.com:37000', |
| | | //è¿ç¨æ¼ç¤ºæå¡å°å,å¯ç¨äºç´æ¥å¯å¨é¡¹ç® |
| | | //target: 'https://saber.bladex.vip/api', |