| | |
| | | <el-option |
| | | v-for="item in tempTypeData" |
| | | :key="item.oid" |
| | | :label="item.text" |
| | | :value="item.attributes.name"> |
| | | :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="searchValue"> |
| | | @click="searchData"> |
| | | 查询 |
| | | </el-button> |
| | | </div> |
| | | <div> |
| | | <el-main> |
| | | <basic-container> |
| | | <avue-crud |
| | | ref="userCrud" |
| | | :data="tableData" |
| | | :option="option" |
| | | :table-loading="tableLoading" |
| | | @on-load="getTableList" |
| | | @refresh-change="handleRefresh" |
| | | @search-change="handleSearch" |
| | | @search-reset="handleReset" |
| | | @selection-change="selectChange" |
| | | @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="rowSaveHandlerClick"> |
| | | @click="addHandler"> |
| | | <icon-show :name="permissionList.addBtn.source"></icon-show> |
| | | 创建 |
| | | </el-button> |
| | | <el-button v-if="permissionList.delBtn" class="button-custom-icon" plain size="small" type="danger" |
| | | @click="allDelHandler"> |
| | | <icon-show :name="permissionList.delBtn.source"></icon-show> |
| | | 删除 |
| | | </el-button> |
| | | <el-button v-if="permissionList.viewTheScopeBtn" class="button-custom-icon" plain size="small" |
| | | type="primary" |
| | | @click="chekView"> |
| | | <icon-show :name="permissionList.viewTheScopeBtn.source"></icon-show> |
| | | 查看使用范围 |
| | | 增加 |
| | | </el-button> |
| | | <el-button v-if="permissionList.downloadImportTemplateBtn" class="button-custom-icon" plain size="small" |
| | | type="primary" @click="downloadTemplateHandler"> |
| | |
| | | 下载导入模板 |
| | | </el-button> |
| | | <el-button v-if="permissionList.importBtn" class="button-custom-icon" plain size="small" type="primary" |
| | | @click="uploadUser"> |
| | | @click="uploadHandler"> |
| | | <icon-show :name="permissionList.importBtn.source"></icon-show> |
| | | 导入 |
| | | </el-button> |
| | |
| | | <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-button size="small" @click="dialogVisible = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | <el-aside width="35%"> |
| | | <basic-container> |
| | | </basic-container> |
| | | <div></div> |
| | | </el-aside> |
| | | </div> |
| | | </basic-container> |
| | |
| | | <script> |
| | | import {mapGetters} from "vuex"; |
| | | import basicOption from "@/util/basic-option"; |
| | | import {deleteType, getTypeList, saveType, updateType} from "@/api/processTemplate/type"; |
| | | import {getProcessTempList,saveProcessTemp,updateProcessTemp,deleteProcessTemp} from "@/api/processTemplate/define"; |
| | | import {getTypeList} from "@/api/processTemplate/type"; |
| | | import {getProcessTempList,saveProcessTemp,updateProcessTemp,deleteProcessTemp,downloadTemplate,download} from "@/api/processTemplate/define"; |
| | | import func from "@/util/func"; |
| | | |
| | | export default { |
| | |
| | | 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(){ |
| | |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | getTypeList().then(res => { |
| | | this.tempTypeData = res.data.data; |
| | | }) |
| | | }, |
| | | methods:{ |
| | | getTableList(){ |
| | | this.tableLoading = true; |
| | | getProcessTempList().then(res => { |
| | | getProcessTempList({tempType:this.tempType,tempName:this.tempName}).then(res => { |
| | | this.tableData = res.data.data; |
| | | this.tableLoading = false; |
| | | }) |
| | | }, |
| | | //流程分类选择 |
| | | tempTypeChange(val){ |
| | | this.getTableList(); |
| | | }, |
| | | searchData(){ |
| | | this.getTableList(); |
| | | }, |
| | | // 新增 |
| | |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | // 导出 |
| | | 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> |