Merge remote-tracking branch 'origin/master'
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | // å表æ¥è¯¢ |
| | | export function getProcessTempList(params) { |
| | | return request({ |
| | | url: "/api/pvolumesController/getPvolumesPage", |
| | | method: "get", |
| | | params |
| | | }); |
| | | } |
| | | export function saveProcessTemp(params) { |
| | | return request({ |
| | | url: "/api/pvolumesController/savePvolume", |
| | | method: "post", |
| | | data: params |
| | | }); |
| | | } |
| | | export function updateProcessTemp(params) { |
| | | return request({ |
| | | url: "/api/pvolumesController/updatePvolume", |
| | | method: "post", |
| | | data: params |
| | | }); |
| | | } |
| | | export function deleteProcessTemp(params) { |
| | | return request({ |
| | | url: "/api/pvolumesController/deletePvolume", |
| | | method: "delete", |
| | | params |
| | | }) |
| | | } |
| | | // å¯¼åº |
| | | export function download (params) { |
| | | return request({ |
| | | url: '/api/webEnumController/exportEnumTypes', |
| | | method: 'get', |
| | | headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'}, |
| | | responseType: 'blob', |
| | | params |
| | | }) |
| | | } |
| | | |
| | | // ä¸è½½å¯¼å
¥æ¨¡æ¿ |
| | | export function downloadTemplate (params) { |
| | | return request({ |
| | | url: '/api/webEnumController/downloadEnumTemplate', |
| | | method: 'get', |
| | | headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'}, |
| | | responseType: 'blob', |
| | | params |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | // å表æ¥è¯¢ |
| | | export function getTypeList(params) { |
| | | return request({ |
| | | url: "/api/pvolumesController/getPvolumesPage", |
| | | method: "get", |
| | | params |
| | | }); |
| | | } |
| | | export function saveType(params) { |
| | | return request({ |
| | | url: "/api/pvolumesController/savePvolume", |
| | | method: "post", |
| | | data: params |
| | | }); |
| | | } |
| | | export function updateType(params) { |
| | | return request({ |
| | | url: "/api/pvolumesController/updatePvolume", |
| | | method: "post", |
| | | data: params |
| | | }); |
| | | } |
| | | export function deleteType(params) { |
| | | return request({ |
| | | url: "/api/pvolumesController/deletePvolume", |
| | | method: "delete", |
| | | params |
| | | }) |
| | | } |
| | |
| | | <template> |
| | | <!--å¨ææ¨¡æ¿--> |
| | | <avue-form ref="form" :option="option" v-model="form" v-loading="loading"> |
| | | <avue-form ref="basicform" :option="option" v-model="form" v-loading="loading"> |
| | | <template v-for="item in allColumn" :slot="item.prop+ ''"> |
| | | <vciWebRefer |
| | | v-if="item.type === 'refer'" |
| | |
| | | // è¡¨åæ ¡éª |
| | | validate(done) { |
| | | return new Promise((resolve) => { |
| | | this.$refs.form.validate((valid,fields) => { |
| | | this.$refs.basicform.validate((valid,fields) => { |
| | | done(valid,fields); |
| | | if (valid) { |
| | | resolve(true); |
| | |
| | | }); |
| | | }, |
| | | resetFields(){ |
| | | this.$refs.form.resetFields() |
| | | this.$refs.basicform.resetFields() |
| | | }, |
| | | clearValidate(props){ |
| | | this.$refs.form.clearValidate(props) |
| | | this.$refs.basicform.clearValidate(props) |
| | | }, |
| | | updateDic(prop,data){ |
| | | this.$refs.form.updateDic(prop,data) |
| | | this.$refs.basicform.updateDic(prop,data) |
| | | }, |
| | | dicInit(){ |
| | | this.$refs.form.dicInit() |
| | | this.$refs.basicform.dicInit() |
| | | }, |
| | | getPropRef(){ |
| | | this.$refs.form.getPropRef() |
| | | this.$refs.basicform.getPropRef() |
| | | } |
| | | }, |
| | | }; |
| | |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="addSaveHandler">ç¡® å®</el-button> |
| | | <el-button @click="addEscHandler">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="addSaveHandler">ç¡® å®</el-button> |
| | | <el-button size="small" @click="addEscHandler">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!--导å
¥ --> |
| | |
| | | </avue-crud> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="addDialogSavaHandler">ç¡® å®</el-button> |
| | | <el-button @click="addDialogClose">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="addDialogSavaHandler">ç¡® å®</el-button> |
| | | <el-button size="small" @click="addDialogClose">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | > |
| | | </avue-crud> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="dialogAttrAddClickHandler">ç¡® å®</el-button> |
| | | <el-button @click="dialogAttrClose">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="dialogAttrAddClickHandler">ç¡® å®</el-button> |
| | | <el-button size="small" @click="dialogAttrClose">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | :table-loading="conCheckLoading"> |
| | | </avue-crud> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="repairClickHandler">ä¿® å¤</el-button> |
| | | <el-button @click="conCheckVisible = false">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="repairClickHandler">ä¿® å¤</el-button> |
| | | <el-button size="small" @click="conCheckVisible = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | </span> |
| | | </el-dialog> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="indexClickAddHandler">ä¿ å</el-button> |
| | | <el-button @click="indexDialogClose">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="indexClickAddHandler">ä¿ å</el-button> |
| | | <el-button size="small" @click="indexDialogClose">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="rowSaveHandler">ç¡® å®</el-button> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="rowSaveHandler">ç¡® å®</el-button> |
| | | <el-button size="small" @click="dialogVisible = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | </avue-crud> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="addDialogSavaHandler">ç¡® å®</el-button> |
| | | <el-button @click="addDialogClose">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="addDialogSavaHandler">ç¡® å®</el-button> |
| | | <el-button size="small" @click="addDialogClose">å æ¶</el-button> |
| | | </span> |
| | | |
| | | <!-- 屿§æ± å表 --> |
| | |
| | | > |
| | | </avue-crud> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="dialogAttrAddClickHandler">ç¡® å®</el-button> |
| | | <el-button @click="dialogAttrClose">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="dialogAttrAddClickHandler">ç¡® å®</el-button> |
| | | <el-button size="small" @click="dialogAttrClose">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </el-dialog> |
| | |
| | | :table-loading="conCheckLoading"> |
| | | </avue-crud> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="conCheckVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="repairClickHandler">ä¿® å¤</el-button> |
| | | <el-button size="small" @click="conCheckVisible = false">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="repairClickHandler">ä¿® å¤</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | </avue-crud> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="bizTypeAddHandler">ç¡® å®</el-button> |
| | | <el-button @click="bizTypeVisible = false">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="bizTypeAddHandler">ç¡® å®</el-button> |
| | | <el-button size="small" @click="bizTypeVisible = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="addSaveHandler">ç¡® å®</el-button> |
| | | <el-button @click="visibleCloseHandler">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="addSaveHandler">ç¡® å®</el-button> |
| | | <el-button size="small" @click="visibleCloseHandler">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | const formData = this.initFormData(); |
| | | console.log(formData) |
| | | btmSave(formData).then(res => { |
| | | if (res.data.success) { |
| | | this.$message.success("ä¿åæå"); |
| | |
| | | this.orderFieldList.unshift({ |
| | | id: data.row.orderField |
| | | }); |
| | | this.tableFormOption.column[0].dicData = this.orderFieldList |
| | | this.$refs.tableForm.updateDic('orderField',this.orderFieldList); |
| | | }, |
| | | //è·åæåºè®¾ç½®ä¸æææåºå段 |
| | | getAllAttr() { |
| | |
| | | }, { |
| | | label: 'åå', |
| | | value: 'opposite' |
| | | }] |
| | | }], |
| | | control: (val, form) => { |
| | | const dicData=this.getDicData(val); |
| | | this.form.btmType=dicData[0].value |
| | | return { |
| | | btmType: { |
| | | dicData: dicData |
| | | } |
| | | }; |
| | | } |
| | | },{ |
| | | label: 'ä¸å¡ç±»å', |
| | | prop: 'btmType', |
| | |
| | | message: "è¯·éæ©ä¸å¡ç±»å", |
| | | trigger: "blur" |
| | | }], |
| | | dicData: [] |
| | | dicData: [], |
| | | change: ({ value, column, item, dic }) => { |
| | | this.form.btmType=value; |
| | | if(value){ |
| | | this.getAllAttr(); |
| | | this.getTemp(value,false); |
| | | } |
| | | }, |
| | | }, { |
| | | label: 'çæ¬çæ¬¡', |
| | | prop: 'version', |
| | |
| | | |
| | | }; |
| | | }, |
| | | watch: { |
| | | //æ¹å |
| | | 'form.direction': { |
| | | handler(val) { |
| | | if(val=='positive'){ |
| | | //æ£å |
| | | const dicData=this.treeData.btmItemsTo.map(item=>{ |
| | | return { |
| | | label: item, |
| | | value: item |
| | | } |
| | | }) |
| | | dicData.push({ |
| | | label: 'ææç±»å', |
| | | value: '*' |
| | | }) |
| | | this.$refs.form.updateDic('btmType', dicData); |
| | | this.form.btmType=dicData[0].value |
| | | this.getAllAttr(); |
| | | }else if(val=='opposite'){ |
| | | //åå |
| | | const dicData=this.treeData.btmItemsFrom.map(item=>{ |
| | | return { |
| | | label: item, |
| | | value: item |
| | | } |
| | | }) |
| | | dicData.push({ |
| | | label: 'ææç±»å', |
| | | value: '*' |
| | | }) |
| | | this.$refs.form.updateDic('btmType', dicData); |
| | | this.form.btmType=dicData[0].value |
| | | this.getAllAttr(); |
| | | } |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | //ä¸å¡ç±»å |
| | | 'form.btmType': { |
| | | handler(val) { |
| | | if(val && val!='*'){ |
| | | this.getTemp(val,false); |
| | | } |
| | | }, |
| | | immediate: true, |
| | | } |
| | | }, |
| | | watch: {}, |
| | | methods: { |
| | | openDialog(btmName, title, mode, data) { |
| | | this.dialog.title = title; |
| | |
| | | this.queryCondition=this.selectData.queryTemplate.condition; |
| | | this.queryTree=this.selectData.tree; |
| | | this.form.levelFlag=this.selectData.levelFlag; |
| | | |
| | | const dicData=this.getDicData(this.form.direction); |
| | | this.formItems[2].dicData=dicData; |
| | | } else { |
| | | this.form.direction='positive'; |
| | | this.selectData = {}; |
| | |
| | | connector:'å¹¶ä¸', |
| | | child:[] |
| | | }; |
| | | const dicData=this.getDicData(this.form.direction); |
| | | this.formItems[2].dicData=dicData; |
| | | this.form.btmType=dicData[0].value; |
| | | } |
| | | this.dialog.showDialog = true; |
| | | this.treeOption.defaultExpandedKeys=[data.treeData.label] |
| | | this.getTemp(data.treeData.label, true) |
| | | }, |
| | | //è·åä¸å¡ç±»åä¸ææ°æ® |
| | | getDicData(directionVal){ |
| | | let dicData=[]; |
| | | if(directionVal=='positive'){ |
| | | //æ£å |
| | | dicData=this.treeData.btmItemsTo.map(item=>{ |
| | | return { |
| | | label: item, |
| | | value: item |
| | | } |
| | | }) |
| | | }else if(directionVal=='opposite'){ |
| | | //åå |
| | | dicData=this.treeData.btmItemsFrom.map(item=>{ |
| | | return { |
| | | label: item, |
| | | value: item |
| | | } |
| | | }) |
| | | } |
| | | dicData.push({ |
| | | label: 'ææç±»å', |
| | | value: '*' |
| | | }) |
| | | return dicData; |
| | | }, |
| | | cancelDialog() { |
| | | this.dialog.loading = false; |
| | |
| | | this.orderFieldList.unshift({ |
| | | id: data.row.orderField |
| | | }); |
| | | this.tableFormOption.column[0].dicData= this.orderFieldList |
| | | this.$refs.tableForm.updateDic('orderField',this.orderFieldList); |
| | | }, |
| | | //è·åæåºè®¾ç½®ä¸æææåºå段 |
| | | getAllAttr() { |
| | |
| | | @node-click="nodeClick"></avue-tree> |
| | | </div> |
| | | <div v-if="!readOnly" style="text-align: right;margin-top: 10px;"> |
| | | <el-button v-if="radioForm==1" plain size="mini" type="primary" @click="addHandler">å¢å é»è¾</el-button> |
| | | <el-button v-if="radioForm==1" plain size="mini" type="primary" @click="editHandler">ä¿®æ¹æ¡ä»¶</el-button> |
| | | <el-button v-if="radioForm==1" plain size="mini" type="primary" @click="delHandler">å é¤</el-button> |
| | | <el-button v-show="radioForm==1" plain size="mini" type="primary" @click="addHandler">å¢å é»è¾</el-button> |
| | | <el-button v-show="radioForm==1" plain size="mini" type="primary" @click="editHandler">ä¿®æ¹æ¡ä»¶</el-button> |
| | | <el-button v-show="radioForm==1" plain size="mini" type="primary" @click="delHandler">å é¤</el-button> |
| | | <el-button plain size="mini" type="primary" @click="queryHandler">æ¥è¯¢</el-button> |
| | | <el-button plain size="mini" type="primary" @click="">åæ¶</el-button> |
| | | <!--<el-button plain size="mini" type="primary" @click="">åæ¶</el-button>--> |
| | | </div> |
| | | |
| | | <!--ä¿®æ¹æ¡ä»¶--> |
| | |
| | | <script> |
| | | import basicOption from "@/util/basic-option"; |
| | | import {getAllQTs} from "@/api/queryTemplate/queryDefine"; |
| | | import {getCriteria} from "@/api/queryTemplate/linkTypeQuery"; |
| | | import {dateFormat} from "@/util/date" |
| | | |
| | | export default { |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.getTemp(); |
| | | if (!this.readOnly) { |
| | | this.getTemp(); |
| | | } |
| | | }, |
| | | methods: { |
| | | // ææ½å°æ¶ |
| | |
| | | prop: 'btmType', |
| | | width: 130, |
| | | formatter:function (row, value) { |
| | | return row.queryTemplate.btmType; |
| | | if (row.queryTemplate.btmType == '*') { |
| | | return 'ææç±»å' |
| | | } else { |
| | | return row.queryTemplate.btmType; |
| | | } |
| | | } |
| | | }, { |
| | | label: 'çæ¬çæ¬¡', |
| | |
| | | prop: 'queryISLeaf', |
| | | width: 120, |
| | | formatter:function (row, value) { |
| | | return row.queryTemplate.queryISLeaf |
| | | if(row.queryTemplate.queryISLeaf=='false' || row.queryTemplate.queryISLeaf==false){ |
| | | return 'å¦' |
| | | }else{ |
| | | return 'æ¯' |
| | | } |
| | | } |
| | | }, { |
| | | label: 'åèç¹å±æ¬¡æ°', |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!--æµç¨æ¨¡æ¿å®ä¹--> |
| | | <basic-container> |
| | | <div> |
| | | æµç¨åç±»ï¼ |
| | | <el-select v-model="tempType" :clearable="true" placeholder="è¯·éæ©" size="small" |
| | | style="width: 300px;margin-right: 20px;" |
| | | @change="tempTypeChange"> |
| | | <el-option |
| | | v-for="item in tempTypeData" |
| | | :key="item.oid" |
| | | :label="item.name" |
| | | :value="item.oid"> |
| | | </el-option> |
| | | </el-select> |
| | | æµç¨æ¨¡æ¿åç§°ï¼ |
| | | <el-input size="small" v-model="tempName" style="width: 300px;margin-right: 10px;"></el-input> |
| | | <el-button icon="el-icon-search" plain size="small" style="margin-right: 40px;" type="primary" |
| | | @click="searchData"> |
| | | æ¥è¯¢ |
| | | </el-button> |
| | | </div> |
| | | <div> |
| | | <el-main> |
| | | <avue-crud |
| | | ref="userCrud" |
| | | :data="tableData" |
| | | :option="option" |
| | | :table-loading="tableLoading" |
| | | @on-load="getTableList" |
| | | @refresh-change="getTableList" |
| | | @selection-change="selectionChange" |
| | | @row-click="rowClickHandler" |
| | | > |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button v-if="permissionList.addBtn" class="button-custom-icon" plain size="small" type="primary" |
| | | @click="addHandler"> |
| | | <icon-show :name="permissionList.addBtn.source"></icon-show> |
| | | å¢å |
| | | </el-button> |
| | | <el-button v-if="permissionList.downloadImportTemplateBtn" class="button-custom-icon" plain size="small" |
| | | type="primary" @click="downloadTemplateHandler"> |
| | | <icon-show :name="permissionList.downloadImportTemplateBtn.source"></icon-show> |
| | | ä¸è½½å¯¼å
¥æ¨¡æ¿ |
| | | </el-button> |
| | | <el-button v-if="permissionList.importBtn" class="button-custom-icon" plain size="small" type="primary" |
| | | @click="uploadHandler"> |
| | | <icon-show :name="permissionList.importBtn.source"></icon-show> |
| | | 导å
¥ |
| | | </el-button> |
| | | <el-button v-if="permissionList.exportBtn" class="button-custom-icon" plain size="small" type="primary" |
| | | @click="downloadHandler"> |
| | | <icon-show :name="permissionList.exportBtn.source"></icon-show> |
| | | å¯¼åº |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button v-if="permissionList.editBtn" size="small" type="text" |
| | | @click="editBtnClick(scope.row)"> |
| | | <icon-show :name="permissionList.editBtn.source"></icon-show> |
| | | ç¼è¾ |
| | | </el-button> |
| | | <el-button v-if="permissionList.delBtn" size="small" type="text" |
| | | @click="rowDeleteHandler(scope.row)"> |
| | | <icon-show :name="permissionList.delBtn.source"></icon-show> |
| | | å é¤ |
| | | </el-button> |
| | | <el-button size="small" type="text" @click.stop="stopUserHandler(scope.row)"> |
| | | <span v-if="scope.row.status === 0 && permissionList.stopBtn" style="color: #fa3434;display: flex"> |
| | | <icon-show :name="permissionList.stopBtn.source"></icon-show> |
| | | åç¨ |
| | | </span> |
| | | <span v-if="scope.row.status === 1 && permissionList.actionBtn" style="color: #55b61d;display: flex"> |
| | | <icon-show :name="permissionList.actionBtn.source"></icon-show> |
| | | å¯ç¨ |
| | | </span> |
| | | </el-button> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | | <!-- å建ç¼è¾èªå®ä¹å¯¹è¯æ¡ --> |
| | | <el-dialog |
| | | v-dialogDrag |
| | | v-loading="dialogLoading" |
| | | :title="dialogType === 'add' ? ' å建' : 'ç¼è¾'" |
| | | :visible.sync="dialogVisible" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | width="1000px" |
| | | @close="dialogClose" |
| | | > |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button size="small" type="primary" @click="rowSaveHandler">ç¡® å®</el-button> |
| | | <el-button size="small" @click="dialogVisible = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </el-main> |
| | | |
| | | <el-aside width="35%"> |
| | | <div></div> |
| | | </el-aside> |
| | | </div> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {mapGetters} from "vuex"; |
| | | import basicOption from "@/util/basic-option"; |
| | | import {getTypeList} from "@/api/processTemplate/type"; |
| | | import {getProcessTempList,saveProcessTemp,updateProcessTemp,deleteProcessTemp,downloadTemplate,download} from "@/api/processTemplate/define"; |
| | | import func from "@/util/func"; |
| | | |
| | | export default { |
| | | name: "index", |
| | | data(){ |
| | | return { |
| | | tempType:'', |
| | | tempName:'', |
| | | tempTypeData:[], |
| | | form:{}, |
| | | tableLoading: false, |
| | | tableData: [], |
| | | currentRow:null, |
| | | selectionList: [], |
| | | } |
| | | }, |
| | | computed: { |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false), |
| | | delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false), |
| | | editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false), |
| | | exportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT, false), |
| | | importBtn: this.vaildData(this.permission[this.$route.query.id].IMPORT, false), |
| | | downloadImportTemplateBtn: this.vaildData(this.permission[this.$route.query.id].DOWNLOADFILE, false), |
| | | stopBtn: this.vaildData(this.permission[this.$route.query.id].FREEZE, false), |
| | | actionBtn: this.vaildData(this.permission[this.$route.query.id].UNFREZE, false), |
| | | }; |
| | | }, |
| | | option(){ |
| | | return { |
| | | ...basicOption, |
| | | addBtn:false, |
| | | editBtn:false, |
| | | delBtn:false, |
| | | calcHeight: -60, |
| | | align:'left', |
| | | headerAlign:'center', |
| | | menuWidth:160, |
| | | dialogMenuPosition: 'right', |
| | | dialogWidth:600, |
| | | column: [ |
| | | { |
| | | label: 'æµç¨æ¨¡æ¿åç§°', |
| | | prop: 'name' |
| | | },{ |
| | | label: 'çæ¬', |
| | | prop: 'desc' |
| | | },{ |
| | | label: 'ç¶æ', |
| | | prop: 'status' |
| | | }] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | getTypeList().then(res => { |
| | | this.tempTypeData = res.data.data; |
| | | }) |
| | | }, |
| | | methods:{ |
| | | getTableList(){ |
| | | this.tableLoading = true; |
| | | getProcessTempList({tempType:this.tempType,tempName:this.tempName}).then(res => { |
| | | this.tableData = res.data.data; |
| | | this.tableLoading = false; |
| | | }) |
| | | }, |
| | | //æµç¨åç±»éæ© |
| | | tempTypeChange(val){ |
| | | this.getTableList(); |
| | | }, |
| | | searchData(){ |
| | | this.getTableList(); |
| | | }, |
| | | // æ°å¢ |
| | | saveHandler(row, done, loading) { |
| | | saveProcessTemp(row).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | done(); |
| | | } |
| | | }).catch(err => { |
| | | loading() |
| | | }); |
| | | }, |
| | | |
| | | handleEdit(row,index){ |
| | | this.$refs.crud.rowEdit(row, index); |
| | | }, |
| | | |
| | | // ç¼è¾ |
| | | updateHandler(row, index, done, loading) { |
| | | updateProcessTemp(row).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | done() |
| | | } |
| | | }).catch(err => { |
| | | loading() |
| | | }); |
| | | }, |
| | | |
| | | // å é¤ |
| | | handleDel(row,index) { |
| | | let params = { |
| | | ids: row.id |
| | | } |
| | | |
| | | this.$confirm('æ¨ç¡®å®è¦å é¤å½åæ°æ®åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteProcessTemp(params).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | } |
| | | }); |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | //éæ©çè¡ |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | |
| | | // è¡åé |
| | | rowClickHandler(row) { |
| | | func.rowClickHandler( |
| | | row, |
| | | this.$refs.crud, |
| | | this.lastIndex, |
| | | (newIndex) => { |
| | | this.lastIndex = newIndex; |
| | | }, |
| | | () => { |
| | | this.selectionList = [row]; |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | // å¯¼åº |
| | | downloadHandler() { |
| | | if (this.selectionList.length <= 0) { |
| | | this.$message.warning('请è³å°éæ©ä¸æ¡æ°æ®è¿è¡å¯¼åº'); |
| | | return; |
| | | } |
| | | |
| | | download({enumNames: this.ids}).then(res => { |
| | | func.downloadFileByBlobHandler(res); |
| | | this.$message.success('å¯¼åºæå'); |
| | | }).catch(err => { |
| | | }) |
| | | }, |
| | | |
| | | // ä¸è½½å¯¼å
¥æ¨¡æ¿ |
| | | downloadTemplateHandler() { |
| | | downloadTemplate().then(res => { |
| | | func.downloadFileByBlobHandler(res); |
| | | this.$message.success('ä¸è½½æå'); |
| | | }).catch(err => { |
| | | }) |
| | | }, |
| | | |
| | | //导å
¥ |
| | | uploadHandler() { |
| | | this.$refs.upload.visible = true; |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!--æµç¨æ¨¡æ¿åç±»--> |
| | | <basic-container> |
| | | <avue-crud |
| | | ref="crud" |
| | | v-model="form" |
| | | :data="tableData" |
| | | :option="option" |
| | | :table-loading="tableLoading" |
| | | @on-load="getTableList" |
| | | @refresh-change="getTableList" |
| | | @row-save="rowSaveHandler" |
| | | @row-update="rowUpdateHandler" |
| | | @row-click="rowClickHandler" |
| | | @selection-change="selectionChange" |
| | | > |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button v-if="permissionList.addBtn" class="button-custom-icon" size="small" type="primary" |
| | | @click="$refs.crud.rowAdd()"> |
| | | <icon-show :name="permissionList.addBtn.source"></icon-show> |
| | | æ° å¢ |
| | | </el-button> |
| | | <el-button v-if="permissionList.exportBtn" class="button-custom-icon" plain size="small" type="primary" @click="exportClickHandler"> |
| | | <icon-show :name="permissionList.exportBtn.source"></icon-show> |
| | | å¯¼åº |
| | | </el-button> |
| | | </template> |
| | | <template slot="menu" slot-scope="{ row, index }"> |
| | | <el-button |
| | | v-if="permissionList.editBtn" |
| | | size="small" |
| | | type="text" |
| | | @click="handleEdit(row, index)" |
| | | > |
| | | <icon-show :name="permissionList.editBtn.source"></icon-show> |
| | | ç¼è¾ |
| | | </el-button> |
| | | <el-button |
| | | v-if="permissionList.delBtn" |
| | | size="small" |
| | | type="text" |
| | | @click="handleDel(row, index)" |
| | | > |
| | | <icon-show :name="permissionList.delBtn.source"></icon-show> |
| | | å é¤ |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {mapGetters} from "vuex"; |
| | | import basicOption from "@/util/basic-option"; |
| | | import {getTypeList, saveType, updateType, deleteType} from "@/api/processTemplate/type"; |
| | | import func from "@/util/func"; |
| | | |
| | | export default { |
| | | name: "index", |
| | | data: function () { |
| | | return { |
| | | form:{}, |
| | | tableLoading: false, |
| | | tableData: [], |
| | | currentRow:null, |
| | | selectionList: [], |
| | | } |
| | | }, |
| | | computed: { |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false), |
| | | delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false), |
| | | editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false), |
| | | }; |
| | | }, |
| | | option(){ |
| | | return { |
| | | ...basicOption, |
| | | addBtn:false, |
| | | editBtn:false, |
| | | delBtn:false, |
| | | calcHeight: -60, |
| | | align:'left', |
| | | headerAlign:'center', |
| | | menuWidth:160, |
| | | dialogMenuPosition: 'right', |
| | | dialogWidth:600, |
| | | column: [ |
| | | { |
| | | label: 'åç±»åç§°', |
| | | prop: 'name', |
| | | span: 24, |
| | | rules: [{ required: true, message: '请è¾å
¥åç±»åç§°', trigger: 'blur' }] |
| | | },{ |
| | | label: 'æè¿°', |
| | | prop: 'desc', |
| | | span: 24, |
| | | type:'textarea' |
| | | }] |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | // è¡¨æ ¼è¯·æ± |
| | | getTableList() { |
| | | this.tableLoading = true; |
| | | getTypeList().then(res => { |
| | | this.tableData = res.data.data; |
| | | this.tableLoading = false; |
| | | }) |
| | | }, |
| | | |
| | | // æ°å¢ |
| | | rowSaveHandler(row, done, loading) { |
| | | saveType(row).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | done(); |
| | | } |
| | | }).catch(err => { |
| | | loading() |
| | | }); |
| | | }, |
| | | |
| | | handleEdit(row,index){ |
| | | this.$refs.crud.rowEdit(row, index); |
| | | }, |
| | | |
| | | // ç¼è¾ |
| | | rowUpdateHandler(row, index, done, loading) { |
| | | updateType(row).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | done() |
| | | } |
| | | }).catch(err => { |
| | | loading() |
| | | }); |
| | | }, |
| | | |
| | | // å é¤ |
| | | handleDel(row,index) { |
| | | let params = { |
| | | ids: row.id |
| | | } |
| | | |
| | | this.$confirm('æ¨ç¡®å®è¦å é¤å½åçåç±»åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteType(params).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | } |
| | | }); |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | //éæ©çè¡ |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | |
| | | // è¡åé |
| | | rowClickHandler(row) { |
| | | func.rowClickHandler( |
| | | row, |
| | | this.$refs.crud, |
| | | this.lastIndex, |
| | | (newIndex) => { |
| | | this.lastIndex = newIndex; |
| | | }, |
| | | () => { |
| | | this.selectionList = [row]; |
| | | } |
| | | ); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | let node = this.currentClickNode.parent; |
| | | node.loaded = false; |
| | | node.expand(); |
| | | this.$refs.tree.setCurrentNode(this.currentClickNode); |
| | | this.$nextTick(()=>{ |
| | | this.$refs.tree.setCurrentKey(this.currentClickNode.data.id); |
| | | }); |
| | | } else { |
| | | this.refresh = Math.random(); // å·æ°å·¦ä¾§æ |
| | | } |
| | |
| | | methods: { |
| | | // æ è¡ç¹å» |
| | | nodeClick(row, node) { |
| | | console.log(row.childType); |
| | | this.form = {...row}; |
| | | this.nodeRow = {...row}; |
| | | this.currentClickNode = node; |
| | |
| | | let node = this.currentClickNode.parent; |
| | | node.loaded = false; |
| | | node.expand(); |
| | | this.$refs.tree.setCurrentNode(this.currentClickNode); |
| | | this.$nextTick(()=>{ |
| | | this.$refs.tree.setCurrentKey(this.currentClickNode.data.id); |
| | | }); |
| | | } else { |
| | | this.refresh = Math.random(); // å·æ°å·¦ä¾§æ |
| | | } |