| | |
| | | VUE_APP_TBAS_KEY=admin.tabs |
| | | VUE_APP_TBAS_TITLES_KEY=admin.tabs.titles |
| | | VUE_APP_API_BASE_URL=http://api.iczer.com |
| | | VUE_APP_ROLE_LIST=admin.roleList |
| | | VUE_APP_DEPARTMENT_LIST=admin.department |
| | |
| | | </div> |
| | | </template> |
| | | </a-table> |
| | | <div class="modal-footer"> |
| | | <a-button type="primary" @click="handleClick">{{ text }}</a-button> |
| | | <div class="modal-footer" v-if="!noFooter"> |
| | | <slot name="footer"> |
| | | <a-button type="primary" @click="handleClick">{{ text }}</a-button> |
| | | </slot> |
| | | </div> |
| | | </a-spin> |
| | | </div> |
| | |
| | | text: { |
| | | type: String, |
| | | default: "提交审核" |
| | | }, |
| | | noFooter: { |
| | | type: Boolean, |
| | | default: false, |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | <rejected-list :is-show="'rejected'==cardName"></rejected-list> |
| | | <approved-list :is-show="'approved'==cardName"></approved-list> |
| | | <handling-list :is-show="'handling'==cardName"></handling-list> |
| | | <handled-list :is-show="'handled'==cardName"></handled-list> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | import getItemByKey from "@/assets/js/tools/getItemByKey"; |
| | | import {statusStatistic} from "@/pages/workplace/apis"; |
| | | import HandlingList from "@/pages/workplace/handlingList/HandlingList"; |
| | | import HandledList from "@/pages/workplace/handledList/HandledList"; |
| | | export default { |
| | | name: 'WorkPlace', |
| | | components: { |
| | | HandledList, |
| | | HandlingList, |
| | | ApprovedList, |
| | | RejectedList, |
| | |
| | | |
| | | /** |
| | | * 查看分页-审批中 |
| | | * @param pageNum 当前页 |
| | | * @param pageSize 每页的数据量 |
| | | * @returns {AxiosPromise} |
| | | */ |
| | | export const approvingListPage = ()=>{ |
| | | export const approvingListPage = (pageNum, pageSize)=>{ |
| | | return axios({ |
| | | method: "GET", |
| | | url: "worksheetMain/approvingListPage", |
| | | params: null |
| | | params: { |
| | | pageNum, |
| | | pageSize |
| | | } |
| | | }); |
| | | } |
| | | |
New file |
| | |
| | | <template> |
| | | <page-toggle-transition v-if="isShow" :disabled="animate.disabled" :animate="animate.name" :direction="animate.direction"> |
| | | <div class="page-content"> |
| | | <advance-table |
| | | :data-source="dataSource" |
| | | :columns="columns" |
| | | :loading="loading" |
| | | title="已处理" |
| | | row-key="beginTime" |
| | | @search="onSearch" |
| | | @refresh="onRefresh" |
| | | @reset="onReset" |
| | | :format-conditions="true" |
| | | :pagination="{ |
| | | current: page, |
| | | pageSize: pageSize, |
| | | total: total, |
| | | showSizeChanger: true, |
| | | showLessItems: true, |
| | | showQuickJumper: true, |
| | | showTotal: (total, range) => `第 ${range[0]}-${range[1]} 条,总计 ${total} 条`, |
| | | onChange: onPageChange, |
| | | onShowSizeChange: onSizeChange, |
| | | }"> |
| | | <template slot="action" slot-scope="scope"> |
| | | <a @click="show(scope)">详情</a> |
| | | </template> |
| | | </advance-table> |
| | | <a-modal |
| | | v-model="workDetailVisible" |
| | | :title="workDetailTitle" |
| | | centered |
| | | :footer="false" |
| | | :width="1300"> |
| | | <draw-upload v-if="isReload" :list="subList" text="审核结果" no-footer></draw-upload> |
| | | </a-modal> |
| | | </div> |
| | | </page-toggle-transition> |
| | | </template> |
| | | |
| | | <script> |
| | | import PageToggleTransition from "@/components/transition/PageToggleTransition"; |
| | | import AdvanceTable from "@/components/table/advance/AdvanceTable"; |
| | | import {mapState} from "vuex"; |
| | | import {handledListPage, linkInfo} from "@/pages/workplace/apis"; |
| | | import DrawUpload from "@/pages/components/drawUpload/DrawUpload"; |
| | | import AuditForm from "@/pages/workplace/workForm/auditForm"; |
| | | |
| | | export default { |
| | | name: "HandledList", |
| | | components: { |
| | | DrawUpload, |
| | | PageToggleTransition, |
| | | AdvanceTable, |
| | | AuditForm, |
| | | }, |
| | | props: { |
| | | isShow: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | workDetailVisible: false, |
| | | auditFormVisible: false, |
| | | page: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | | conditions: {}, |
| | | columns: [ |
| | | { |
| | | title: '工单标题', |
| | | dataIndex: 'title', |
| | | key: 'title', |
| | | align: "center" |
| | | }, |
| | | { |
| | | title: '工单描述', |
| | | dataIndex: 'description', |
| | | key: 'description', |
| | | align: "center" |
| | | }, |
| | | { |
| | | title: '创建人', |
| | | dataIndex: 'createUserName', |
| | | key: 'createUserName', |
| | | align: "center" |
| | | }, |
| | | { |
| | | title: '创建日期', |
| | | dataIndex: 'beginTime', |
| | | key: 'beginTime', |
| | | align: "center" |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: "operation", |
| | | key: 'operation', |
| | | align: "center", |
| | | fixed: 'right', |
| | | width: 100, |
| | | scopedSlots: { customRender: 'action' } |
| | | }, |
| | | ], |
| | | dataSource: [], |
| | | title: "", |
| | | subList: [], |
| | | formData: { |
| | | id: 0, // 连接id |
| | | mainId: 0, // 主id |
| | | linkStatus: 1, // 审批状态 1:通过,2:驳回 |
| | | dealReason: "", // 审核建议 |
| | | nextUser: 0, // 下一个审核的用户id |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | show(scope) { |
| | | let record = scope.record; |
| | | this.title = record.title; |
| | | this.searchBomList(record.id); |
| | | }, |
| | | searchBomList(id) { |
| | | let loading = this.$layer.loading(); |
| | | linkInfo(id).then(res=>{ |
| | | this.$layer.close(loading); |
| | | let rs = res.data; |
| | | let rsData = rs.data; |
| | | let data = []; |
| | | if(rs.code == 1) { |
| | | data = rsData.approvingBomList; |
| | | } |
| | | this.subList = data; |
| | | this.workDetailVisible = true; |
| | | |
| | | // 设置审核表单 |
| | | this.formData.id = rsData.links[rsData.links.length-1].id; |
| | | this.formData.mainId = rsData.id; |
| | | }).catch(error=>{ |
| | | console.log(error); |
| | | this.$layer.close(loading); |
| | | }); |
| | | }, |
| | | onSearch(conditions, searchOptions) { |
| | | this.page = 1 |
| | | this.conditions = conditions |
| | | this.searchData(); |
| | | }, |
| | | onPageChange(page, pageSize) { |
| | | this.page = page; |
| | | this.pageSize = pageSize; |
| | | this.searchData(); |
| | | }, |
| | | onSizeChange(current, size) { |
| | | this.page = 1; |
| | | this.pageSize = size; |
| | | this.searchData(); |
| | | }, |
| | | onRefresh(conditions) { |
| | | this.conditions = conditions |
| | | this.searchData() |
| | | }, |
| | | onReset(conditions) { |
| | | this.conditions = conditions |
| | | this.searchData() |
| | | }, |
| | | searchData() { |
| | | handledListPage(this.page, this.pageSize).then(res=>{ |
| | | let rs = res.data; |
| | | console.log(rs); |
| | | let data = []; |
| | | if(rs.code == 1) { |
| | | data = rs.data.list.map(item=>{ |
| | | item.createUserName = item.createUser.name; |
| | | return item; |
| | | }); |
| | | } |
| | | this.total = rs.data.total; |
| | | this.dataSource = data; |
| | | }); |
| | | }, |
| | | }, |
| | | computed: { |
| | | ...mapState('setting', ['animate']), |
| | | workDetailTitle() { |
| | | return this.title; |
| | | }, |
| | | isReload() { |
| | | return this.workDetailVisible || this.auditFormVisible?true:false; |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.searchData(); |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
New file |
| | |
| | | import HandledList from "./HandledList"; |
| | | export default HandledList; |
| | |
| | | :width="1300"> |
| | | <draw-upload v-if="isReload" :list="subList" @success="showAudit" text="审核结果"></draw-upload> |
| | | </a-modal> |
| | | <a-modal |
| | | v-model="auditFormVisible" |
| | | title="审核" |
| | | centered |
| | | :maskClosable="false" |
| | | :footer="false" |
| | | :width="500"> |
| | | <audit-form v-if="isReload" @success="auditSuccess"></audit-form> |
| | | </a-modal> |
| | | </div> |
| | | </page-toggle-transition> |
| | | </template> |
| | |
| | | :columns="columns" |
| | | :loading="loading" |
| | | title="审批中" |
| | | row-key="name" |
| | | row-key="beginTime" |
| | | @search="onSearch" |
| | | @refresh="onRefresh" |
| | | @reset="onReset" |
| | |
| | | onShowSizeChange: onSizeChange, |
| | | }"> |
| | | <template slot="action" slot-scope="scope"> |
| | | <a @click="scope.record">下载</a> |
| | | <a-divider type="vertical"></a-divider> |
| | | <a @click="scope.record">详情</a> |
| | | </template> |
| | | </advance-table> |
| | |
| | | import PageToggleTransition from "@/components/transition/PageToggleTransition"; |
| | | import AdvanceTable from "@/components/table/advance/AdvanceTable"; |
| | | import {mapState} from "vuex"; |
| | | import {approvingListPage} from "@/pages/workplace/apis"; |
| | | export default { |
| | | name: "NotApproved", |
| | | components: { |
| | |
| | | loading: false, |
| | | page: 1, |
| | | pageSize: 10, |
| | | total: 100, |
| | | total: 0, |
| | | conditions: {}, |
| | | columns: [ |
| | | { |
| | | title: '图纸编码', |
| | | dataIndex: 'name', |
| | | key: 'name', |
| | | align: "center", |
| | | searchAble: true |
| | | title: '工单标题', |
| | | dataIndex: 'title', |
| | | key: 'title', |
| | | align: "center" |
| | | }, |
| | | { |
| | | title: '图纸类型', |
| | | dataIndex: 'type', |
| | | key: 'type', |
| | | align: "center", |
| | | searchAble: true, |
| | | dataType: 'select', |
| | | search: { |
| | | selectOptions: [] |
| | | } |
| | | title: '工单描述', |
| | | dataIndex: 'description', |
| | | key: 'description', |
| | | align: "center" |
| | | }, |
| | | { |
| | | title: '上传日期', |
| | | dataIndex: 'uploadDate', |
| | | key: 'uploadDate', |
| | | align: "center", |
| | | title: '创建人', |
| | | dataIndex: 'createUserName', |
| | | key: 'createUserName', |
| | | align: "center" |
| | | }, |
| | | { |
| | | title: '创建日期', |
| | | dataIndex: 'beginTime', |
| | | key: 'beginTime', |
| | | align: "center" |
| | | }, |
| | | { |
| | | title: '操作', |
| | |
| | | key: 'operation', |
| | | align: "center", |
| | | fixed: 'right', |
| | | width: 100, |
| | | scopedSlots: { customRender: 'action' } |
| | | }, |
| | | ], |
| | |
| | | this.searchData() |
| | | }, |
| | | searchData() { |
| | | console.log("查询后台返回参数"); |
| | | approvingListPage(this.page, this.pageSize).then(res=>{ |
| | | let rs = res.data; |
| | | let data = []; |
| | | if(rs.code == 1) { |
| | | data = rs.data.list.map(item=>{ |
| | | return item; |
| | | }); |
| | | } |
| | | this.total = rs.data.total; |
| | | this.dataSource = data; |
| | | }); |
| | | }, |
| | | }, |
| | | computed: { |
| | | ...mapState('setting', ['animate']), |
| | | }, |
| | | mounted() { |
| | | this.searchData(); |
| | | } |
| | | } |
| | | </script> |
| | |
| | | user: undefined, |
| | | permissions: null, |
| | | roles: null, |
| | | routesConfig: null |
| | | routesConfig: null, |
| | | roleList: null, |
| | | departmentList: null |
| | | }, |
| | | getters: { |
| | | user: state => { |
| | |
| | | } |
| | | } |
| | | return state.routesConfig |
| | | } |
| | | }, |
| | | departmentList: state => { |
| | | if(!state.departmentList) { |
| | | try { |
| | | const departmentList = localStorage.getItem(process.env.VUE_APP_DEPARTMENT_LIST); |
| | | state.departmentList = JSON.parse(departmentList); |
| | | state.departmentList = state.departmentList?state.departmentList:[]; |
| | | }catch (e){ |
| | | console.error(e.message); |
| | | } |
| | | } |
| | | return state.departmentList; |
| | | }, |
| | | roleList: state => { |
| | | if(!state.roleList) { |
| | | try { |
| | | const roleList = localStorage.getItem(process.env.VUE_APP_ROLE_LIST); |
| | | state.roleList = JSON.parse(roleList); |
| | | state.roleList = state.roleList?state.roleList:[]; |
| | | }catch (e){ |
| | | console.error(e.message); |
| | | } |
| | | } |
| | | return state.roleList; |
| | | }, |
| | | }, |
| | | mutations: { |
| | | setUser (state, user) { |
| | |
| | | setRoutesConfig(state, routesConfig) { |
| | | state.routesConfig = routesConfig |
| | | localStorage.setItem(process.env.VUE_APP_ROUTES_KEY, JSON.stringify(routesConfig)) |
| | | }, |
| | | setRoleList(state, roleList) { |
| | | state.roleList = roleList; |
| | | localStorage.setItem(process.env.VUE_APP_ROLE_LIST, JSON.stringify(roleList)); |
| | | }, |
| | | setDepartmentList(state, departmentList) { |
| | | state.departmentList = departmentList; |
| | | localStorage.setItem(process.env.VUE_APP_DEPARTMENT_LIST, JSON.stringify(departmentList)); |
| | | } |
| | | } |
| | | } |