|
@@ -0,0 +1,713 @@
|
|
|
+<style>
|
|
|
+ .ivu-table-border th, .ivu-table-border td {
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ivu-steps-main .ivu-steps-content {
|
|
|
+ width: 200px;
|
|
|
+ }
|
|
|
+</style>
|
|
|
+<template>
|
|
|
+ <Card dis-hover>
|
|
|
+ <p slot="title">审核管理</p>
|
|
|
+ <Row>
|
|
|
+ <Col :md="8" :lg="4">
|
|
|
+ <label> 申请人:</label>
|
|
|
+ <Input style="width: 70%" v-model="searchData.applyName" placeholder="请输入申请人" :maxlength="11" clearable></Input>
|
|
|
+ </Col>
|
|
|
+ <Col :md="8" :lg="{span:4,offset:1}">
|
|
|
+ <label>申请状态:</label>
|
|
|
+ <Select style="width: 70%" v-model="searchData.status" clearable placeholder="请选择申请状态">
|
|
|
+ <Option v-for="item in statusList" :value="item.value" :key="item.value">{{item.label}}</Option>
|
|
|
+ </Select>
|
|
|
+ </Col>
|
|
|
+ <Col :md="8" :lg="{span:4,offset:1}">
|
|
|
+ <label>申请时间:</label>
|
|
|
+ <DatePicker
|
|
|
+ type="daterange"
|
|
|
+ v-model="searchData.useDate"
|
|
|
+ id="launchDate"
|
|
|
+ :options="datePickOptions"
|
|
|
+ :editable="false"
|
|
|
+ :start-date="new Date(Date.now() - 3600 * 1000 * 24 * 30)"
|
|
|
+ placement="bottom-start"
|
|
|
+ style="width: 70%"
|
|
|
+ placeholder="请选择申请时间"
|
|
|
+ ></DatePicker>
|
|
|
+ </Col>
|
|
|
+ <Col :md="12" :lg="{span:1,offset:4}">
|
|
|
+ <Button @click="clickSearchBtn" type="primary" icon="ios-search">查询</Button>
|
|
|
+ </Col>
|
|
|
+ <Col :md="12" :lg="{span:1,offset:3}" :xl="{span:2,offset:2}" :xll="{span:1,offset:1}">
|
|
|
+ <Button @click="resetSearchData" type="default" icon="ios-refresh-circle-outline">重置</Button>
|
|
|
+ </Col>
|
|
|
+ </Row>
|
|
|
+ <Row style="padding-top: 10px">
|
|
|
+ <Col :md="8" :lg="{span:4}">
|
|
|
+ <label>产品型号:</label>
|
|
|
+ <Input style="width: 70%" v-model="searchData.productModel" placeholder="请输入产品型号" :maxlength="16"
|
|
|
+ clearable></Input>
|
|
|
+ </Col>
|
|
|
+ <Col :md="8" :lg="{span:4,offset:1}">
|
|
|
+ <label>文件名称:</label>
|
|
|
+ <Input style="width: 70%" v-model="searchData.fileName" placeholder="请输入文件名称" :maxlength="16" clearable></Input>
|
|
|
+ </Col>
|
|
|
+ </Row>
|
|
|
+ <Row style="padding-top: 20px">
|
|
|
+ <Button @click="authorizationConfigurationAction" type="primary">授权配置</Button>
|
|
|
+ </Row>
|
|
|
+ <Row style="padding-top: 20px">
|
|
|
+ <Table :loading="loading" :columns="columns" :data="tableData" :row-class-name="cellStyle"></Table>
|
|
|
+ </Row>
|
|
|
+ <Row style="padding-top: 20px;text-align: center">
|
|
|
+ <Page
|
|
|
+ :total="totalCount"
|
|
|
+ :page-size="pageSize"
|
|
|
+ :current="pageNum"
|
|
|
+ @on-change="changePage"
|
|
|
+ @on-page-size-change="changePageSize"
|
|
|
+ show-total
|
|
|
+ show-sizer
|
|
|
+ show-elevator
|
|
|
+ ></Page>
|
|
|
+ <!-- 复制错误信息 输入框 START-->
|
|
|
+ <input type="text" ref="errorInfoInput" style="opacity: 0;"/>
|
|
|
+ <!-- 复制错误信息 输入框 END -->
|
|
|
+ <!-- 拒绝理由-->
|
|
|
+ <Modal title="拒绝理由" v-model="refuseModal" :mask-closable="false" :closable="false">
|
|
|
+ <div style="font-size: 20px;padding-left: 20px">
|
|
|
+ <p>您将拒绝授权申请文件:<strong>{{updateStepsStatusFileName}}</strong></p>
|
|
|
+ </div>
|
|
|
+ <div style="padding-left: 20px;padding-top: 20px">
|
|
|
+ <Input v-model="refuseReason" placeholder="请补充拒绝理由" :maxlength="32"/>
|
|
|
+ </div>
|
|
|
+ <div slot="footer" style="text-align:center">
|
|
|
+ <Button type="dashed" @click="cancelRefuseHandle">取消</Button>
|
|
|
+ <Button type="primary" @click="agreeRefuseHandle" style="margin-left: 40px">确定</Button>
|
|
|
+ </div>
|
|
|
+ </Modal>
|
|
|
+ <Modal title="授权配置" v-model="authConfModal" :mask-closable="false" :closable="false">
|
|
|
+ <Select v-model="searchApplyIndex" clearable filterable @on-open-change="openSelectApplyName" @on-query-change="toSearchApplyName">
|
|
|
+ <Option v-for="(item,index) in searchApplyList" :value="index" :key="index">{{item.nickName}}-{{item.loginName}}</Option>
|
|
|
+ </Select>
|
|
|
+ <div style="padding-top: 20px;padding-bottom: 20px">
|
|
|
+ <tree :data="authConfList" :render="renderContentAuthConf"></tree>
|
|
|
+ </div>
|
|
|
+ <div slot="footer" style="text-align:center">
|
|
|
+ <Button type="dashed" @click="refuseAuthConf">取消</Button>
|
|
|
+ <Button type="primary" @click="agreeAuthConf" style="margin-left: 40px">确定</Button>
|
|
|
+ </div>
|
|
|
+ </Modal>
|
|
|
+ <Modal :title="detailForm.status" v-model="applyDetailsModal" :mask-closable="false" :closable="false">
|
|
|
+ <!--toSearchApplyName-->
|
|
|
+ <!-- <Select style="width: 70%" v-model="searchApplyId" clearable filterable @on-open-change="openSelectApplyName" @on-query-change="toSearchApplyName">
|
|
|
+ <Option v-for="(item,index) in searchApplyList" :value="item.id" :key="index">{{item.nickName}}-{{item.loginName}}</Option>
|
|
|
+ </Select>-->
|
|
|
+ <Form :model="detailForm" :label-width="80">
|
|
|
+ <FormItem label="产品型号">
|
|
|
+ <Input v-model="detailForm.productModel" readonly></Input>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem label="文件名称">
|
|
|
+ <Input v-model="detailForm.fileName" readonly></Input>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem v-if="detailForm.baseUrl" label="访问链接">
|
|
|
+ <Input v-model="detailForm.baseUrl" type="textarea" readonly></Input>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem label="申请人">
|
|
|
+ <Input v-model="detailForm.applyName" readonly></Input>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem label="申请时间">
|
|
|
+ <Input v-model="detailForm.createTime" readonly></Input>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem label="申请理由">
|
|
|
+ <Input v-model="detailForm.applyReason" readonly></Input>
|
|
|
+ </FormItem>
|
|
|
+ </Form>
|
|
|
+ <div style="padding-left: 20px">
|
|
|
+ <div style="font-size: 16px;font-weight: bolder;padding-bottom: 20px">授权申请详情</div>
|
|
|
+ <Steps :current="stepsCurrent" direction="vertical" :status="stepsRefuse?'error':'process'">
|
|
|
+ <template v-for="(item,index) in stepsList">
|
|
|
+ <Step :key="index" :title="item.title" :content="item.content"></Step>
|
|
|
+ </template>
|
|
|
+ </Steps>
|
|
|
+ </div>
|
|
|
+ <div slot="footer" style="text-align:center">
|
|
|
+ <!--这里需要处理数据-->
|
|
|
+ <div v-if="!detailForm.toExamineStatus">
|
|
|
+ <Button type="dashed" @click="refuseApplyRecord">拒绝</Button>
|
|
|
+ <Button type="primary" @click="agreeApplyRecord" style="margin-left: 40px">同意</Button>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <Button type="primary" icon="md-close" @click="applyRecordDetailsCancel">关闭</Button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </Modal>
|
|
|
+ <Modal title="审核授权申请" v-model="updateStepsStatusModal" :mask-closable="false" :closable="true">
|
|
|
+ <div style="font-size: 20px;padding-left: 20px">
|
|
|
+ <p><strong>{{updateStepsStatusApplyName}}</strong>发起授权申请文件:</p>
|
|
|
+ <p><strong>{{updateStepsStatusFileName}}</strong>,请审核</p>
|
|
|
+ </div>
|
|
|
+ <div slot="footer" style="text-align:center">
|
|
|
+ <Button type="dashed" @click="refuseApplyRecord">拒绝</Button>
|
|
|
+ <Button type="primary" @click="agreeApplyRecord" style="margin-left: 40px">同意</Button>
|
|
|
+ </div>
|
|
|
+ </Modal>
|
|
|
+ </Row>
|
|
|
+ </Card>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import { getDatePickOptions, dateFormatMethod } from '../../common/date'
|
|
|
+import { mapActions } from 'vuex'
|
|
|
+
|
|
|
+export default {
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ title: '申请人',
|
|
|
+ key: 'applyName',
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'left',
|
|
|
+ minWidth: 140
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '产品型号',
|
|
|
+ key: 'productModel',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 120
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '文件名称',
|
|
|
+ key: 'fileName',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 140
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '申请状态',
|
|
|
+ key: 'status',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 150,
|
|
|
+ render: (h, params) => {
|
|
|
+ let status = params.row.status
|
|
|
+ return h('span', status === 1 ? '已通过' : (status === -1 ? '已拒绝' : '待审核'))
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '申请时间',
|
|
|
+ key: 'createTime',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 150,
|
|
|
+ render: (h, params) => {
|
|
|
+ let data = params.row
|
|
|
+ return h('span', dateFormatMethod(data.createTime, '--'))
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ key: 'action',
|
|
|
+ minWidth: 100,
|
|
|
+ fixed: 'right',
|
|
|
+ align: 'center',
|
|
|
+ render: (h, params) => {
|
|
|
+ const data = params.row
|
|
|
+ let status = data.status
|
|
|
+ let type = data.type // 0 表示提交人 1表示审核人
|
|
|
+ /* let msg = '启用'
|
|
|
+ let btn_icon = 'md-radio-button-off'
|
|
|
+ if (status === 1) {
|
|
|
+ btn_icon = 'ios-radio-button-on'
|
|
|
+ msg = '停用'
|
|
|
+ } */
|
|
|
+ return h('div', [
|
|
|
+ h(
|
|
|
+ 'Tooltip',
|
|
|
+ {
|
|
|
+ props: {
|
|
|
+ transfer: true,
|
|
|
+ placement: 'top',
|
|
|
+ content: '查看'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ [
|
|
|
+ h('Button', {
|
|
|
+ props: {
|
|
|
+ type: 'default',
|
|
|
+ size: 'small',
|
|
|
+ icon: 'ios-eye'
|
|
|
+ },
|
|
|
+ /* directives: [{
|
|
|
+ name: 'has',
|
|
|
+ value: 'HANDLE_SN_STATUS'
|
|
|
+ }], */
|
|
|
+ on: {
|
|
|
+ click: () => {
|
|
|
+ this.findApplyDetails(data)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ ]
|
|
|
+ ),
|
|
|
+ h(
|
|
|
+ 'Tooltip',
|
|
|
+ {
|
|
|
+ props: {
|
|
|
+ transfer: true,
|
|
|
+ placement: 'top',
|
|
|
+ content: '审核'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ [
|
|
|
+ h('Button', {
|
|
|
+ props: {
|
|
|
+ type: 'default',
|
|
|
+ size: 'small',
|
|
|
+ icon: 'ios-radio-button-on',
|
|
|
+ disabled: type === 0 || status !== 0
|
|
|
+ },
|
|
|
+ style: {
|
|
|
+ marginLeft: '15px'
|
|
|
+ },
|
|
|
+ /* directives: [{
|
|
|
+ name: 'has',
|
|
|
+ value: 'HANDLE_SN_STATUS'
|
|
|
+ }], */
|
|
|
+ on: {
|
|
|
+ click: () => {
|
|
|
+ this.updateApplyHandle(data)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ ]
|
|
|
+ )
|
|
|
+ ])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ detailForm: {
|
|
|
+ applyName: '',
|
|
|
+ productModel: '',
|
|
|
+ fileName: '',
|
|
|
+ status: '',
|
|
|
+ createTime: '',
|
|
|
+ applyReason: '',
|
|
|
+ baseUrl: '',
|
|
|
+ toExamineStatus: ''
|
|
|
+ },
|
|
|
+ datePickOptions: getDatePickOptions(),
|
|
|
+ loading: false,
|
|
|
+ applyDetailsModal: false,
|
|
|
+ tableData: [],
|
|
|
+ totalCount: 0, // 总记录数
|
|
|
+ pageNum: 1, // 页码
|
|
|
+ pageSize: 10,
|
|
|
+ searchData: {
|
|
|
+ applyName: '',
|
|
|
+ useDate: [],
|
|
|
+ productModel: '',
|
|
|
+ fileName: '',
|
|
|
+ status: ''
|
|
|
+ },
|
|
|
+ statusList: [
|
|
|
+ { value: 0, label: '待审核' },
|
|
|
+ { value: 1, label: '已拒绝' },
|
|
|
+ { value: 2, label: '已通过' }
|
|
|
+ ],
|
|
|
+ stepsCurrent: 0,
|
|
|
+ stepsList: [],
|
|
|
+ stepsRefuse: false,
|
|
|
+ updateStepsStatusModal: false,
|
|
|
+ updateStepsStatusApplyName: '',
|
|
|
+ updateStepsStatusFileName: '',
|
|
|
+ updateStepsId: '',
|
|
|
+ searchApplyName: '',
|
|
|
+ searchApplyList: [],
|
|
|
+ searchApplyIndex: '',
|
|
|
+ refuseModal: false,
|
|
|
+ authConfModal: false,
|
|
|
+ refuseReason: '',
|
|
|
+ authConfList: [{
|
|
|
+ nickName: '审核顺序',
|
|
|
+ expand: true,
|
|
|
+ children: []
|
|
|
+ }],
|
|
|
+ buttonProps: {
|
|
|
+ type: 'default',
|
|
|
+ size: 'small'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ this.handleSearch() // 查询数据
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...mapActions(['requestMethod']),
|
|
|
+ resetSearchData () {
|
|
|
+ this.searchData = {}
|
|
|
+ },
|
|
|
+ renderContentAuthConf (h, { root, node, data }) {
|
|
|
+ if (data.nodeKey === 0) {
|
|
|
+ return h('span', {
|
|
|
+ style: {
|
|
|
+ display: 'inline-block',
|
|
|
+ width: '100%'
|
|
|
+ }
|
|
|
+ }, [
|
|
|
+ h('span', [
|
|
|
+ h('Icon', {
|
|
|
+ style: {
|
|
|
+ marginRight: '5px'
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ h('span', data.nickName)
|
|
|
+ ])
|
|
|
+ ])
|
|
|
+ }
|
|
|
+ let icon = 'md-person'
|
|
|
+ return h('span', {
|
|
|
+ style: {
|
|
|
+ display: 'inline-block',
|
|
|
+ width: '100%'
|
|
|
+ }
|
|
|
+ }, [
|
|
|
+ h('span', [
|
|
|
+ h('Icon', {
|
|
|
+ style: {
|
|
|
+ marginRight: '5px'
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ type: icon
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ h('span', data.nickName)
|
|
|
+ ]),
|
|
|
+ h('span', {
|
|
|
+ style: {
|
|
|
+ display: 'inline-block',
|
|
|
+ float: 'right',
|
|
|
+ marginRight: '32px'
|
|
|
+ }
|
|
|
+ }, [
|
|
|
+ h('Tooltip', {
|
|
|
+ props: {
|
|
|
+ placement: 'top', content: '往上'
|
|
|
+ }
|
|
|
+ }, [
|
|
|
+ h('Button', {
|
|
|
+ props: Object.assign({}, this.buttonProps, { icon: 'md-arrow-up' }),
|
|
|
+ style: {
|
|
|
+ marginRight: '8px'
|
|
|
+ },
|
|
|
+ on: {
|
|
|
+ click: () => {
|
|
|
+ this.moveTree(root, node, data, true)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ ]),
|
|
|
+ h('Tooltip', {
|
|
|
+ props: {
|
|
|
+ placement: 'top', content: '往下'
|
|
|
+ }
|
|
|
+ }, [
|
|
|
+ h('Button', {
|
|
|
+ props: Object.assign({}, this.buttonProps, { icon: 'md-arrow-down' }),
|
|
|
+ style: {
|
|
|
+ marginRight: '8px'
|
|
|
+ },
|
|
|
+ on: {
|
|
|
+ click: () => {
|
|
|
+ this.moveTree(root, node, data, false)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ ]),
|
|
|
+ h('Tooltip', {
|
|
|
+ props: {
|
|
|
+ placement: 'top', content: '删除'
|
|
|
+ }
|
|
|
+ }, [
|
|
|
+ h('Button', {
|
|
|
+ props: Object.assign({}, this.buttonProps, {
|
|
|
+ icon: 'md-remove'
|
|
|
+ }),
|
|
|
+ on: {
|
|
|
+ click: () => {
|
|
|
+ this.remove(root, node, data)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ ])
|
|
|
+ ])
|
|
|
+ ])
|
|
|
+ },
|
|
|
+ remove (root, node, data) {
|
|
|
+ let parentKey = root.find(el => el === node).parent
|
|
|
+ let parent = root.find(el => el.nodeKey === parentKey).node
|
|
|
+ let index = parent.children.indexOf(data)
|
|
|
+ parent.children.splice(index, 1)
|
|
|
+ },
|
|
|
+ moveTree (root, node, data, up) {
|
|
|
+ let parentKey = root.find(el => el === node).parent
|
|
|
+ let parent = root.find(el => el.nodeKey === parentKey).node
|
|
|
+ let children = parent.children
|
|
|
+ let index = children.indexOf(data)
|
|
|
+ if (up && index === 0) {
|
|
|
+ this.$Message.warning('已经到顶点啦~~')
|
|
|
+ } else if (!up && index === children.length - 1) {
|
|
|
+ this.$Message.warning('已经是最低点啦~~')
|
|
|
+ } else {
|
|
|
+ let child = children[index]
|
|
|
+ let nodeKey = child.nodeKey
|
|
|
+ if (up) {
|
|
|
+ children[index] = children[index - 1]
|
|
|
+ children[index - 1] = child
|
|
|
+ children[index - 1].nodeKey = nodeKey - 1
|
|
|
+ children[index].nodeKey = nodeKey
|
|
|
+ } else {
|
|
|
+ children[index] = children[index + 1]
|
|
|
+ children[index + 1] = child
|
|
|
+ children[index].nodeKey = nodeKey
|
|
|
+ children[index + 1].nodeKey = nodeKey + 1
|
|
|
+ }
|
|
|
+ this.$set(this.authConfList, 0, parent)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ cellStyle (row, index) {
|
|
|
+ /* if (row.status === 1) {
|
|
|
+ return 'demo-table-info-row'
|
|
|
+ } else {
|
|
|
+ return 'demo-table-error-row'
|
|
|
+ } */
|
|
|
+ return 'demo-table-info-row'
|
|
|
+ },
|
|
|
+ cancelRefuseHandle () {
|
|
|
+ this.refuseReason = ''
|
|
|
+ this.refuseModal = false
|
|
|
+ this.updateStepsStatusModal = false
|
|
|
+ this.applyDetailsModal = false
|
|
|
+ },
|
|
|
+ agreeRefuseHandle () {
|
|
|
+ if (this.refuseReason) {
|
|
|
+ this.refuseModal = false
|
|
|
+ this.doApplyRecord(-1)
|
|
|
+ } else {
|
|
|
+ this.$Message.error('拒绝需要理由哟~')
|
|
|
+ }
|
|
|
+ this.refuseReason = ''
|
|
|
+ },
|
|
|
+ myCardTest (val) {
|
|
|
+ console.log(val)
|
|
|
+ },
|
|
|
+ authorizationConfigurationAction () {
|
|
|
+ // 授权配置
|
|
|
+ this.requestMethod({ method: 'get', URI: 'apply/findAuthConf' }).then(res => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ this.authConfList[0].children = res.data
|
|
|
+ this.authConfModal = true
|
|
|
+ } else {
|
|
|
+ this.$Message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ openSelectApplyName (val) {
|
|
|
+ // 这里关闭,需要添加授权人员
|
|
|
+ if (val === false && (this.searchApplyIndex === 0 || !!this.searchApplyIndex)) {
|
|
|
+ let children = this.authConfList[0].children || []
|
|
|
+ let item = this.searchApplyList[this.searchApplyIndex]
|
|
|
+ // {{item.nickName}}-{{item.loginName}}
|
|
|
+ children.push({
|
|
|
+ id: item.id,
|
|
|
+ nickName: item.nickName + '--' + item.loginName
|
|
|
+ })
|
|
|
+ this.$set(this.authConfList, 'children', children)
|
|
|
+ console.log(this.authConfList)
|
|
|
+ // 清理数据
|
|
|
+ this.searchApplyIndex = ''
|
|
|
+ this.searchApplyList = []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ toSearchApplyName (val) {
|
|
|
+ if (val) {
|
|
|
+ // 这里准备查询数据
|
|
|
+ this.requestMethod({ method: 'get', URI: '/apply/findApplyListByName?nickName=' + val }).then(res => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ this.searchApplyList = res.data
|
|
|
+ } else {
|
|
|
+ this.$Message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ refuseAuthConf () {
|
|
|
+ this.authConfModal = false
|
|
|
+ },
|
|
|
+ agreeAuthConf () {
|
|
|
+ let arr = this.authConfList[0].children.map(item => item.id)
|
|
|
+ // 发现消息处理数据
|
|
|
+ this.requestMethod({ method: 'post', URI: 'apply/setAuthConf', data: { ids: arr } }).then(res => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ this.$Message.success('配置成功')
|
|
|
+ } else this.$Message.error(res.msg)
|
|
|
+ this.authConfModal = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ refuseApplyRecord () {
|
|
|
+ // 这里需要填写理由
|
|
|
+ // 这里需要处理数据
|
|
|
+ this.refuseModal = true
|
|
|
+ // this.doApplyRecord(-1)
|
|
|
+ },
|
|
|
+ applyRecordDetailsCancel () {
|
|
|
+ this.applyDetailsModal = false
|
|
|
+ },
|
|
|
+ agreeApplyRecord () {
|
|
|
+ this.doApplyRecord(1)
|
|
|
+ },
|
|
|
+ doApplyRecord (status) {
|
|
|
+ if (this.updateStepsId) {
|
|
|
+ this.requestMethod({
|
|
|
+ method: 'post',
|
|
|
+ URI: `/apply/handleApplyRecord/${this.updateStepsId}/${status}?refuseReason=` + this.refuseReason
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ this.$Message.success('审核成功')
|
|
|
+ this.handleSearch()
|
|
|
+ } else {
|
|
|
+ this.$Message.error(res.msg)
|
|
|
+ }
|
|
|
+ this.updateStepsStatusModal = false
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.updateStepsStatusModal = false
|
|
|
+ }
|
|
|
+ this.applyDetailsModal = false
|
|
|
+ },
|
|
|
+ closeApplyDetailsModal () {
|
|
|
+ this.applyDetailsModal = false
|
|
|
+ },
|
|
|
+ findApplyDetails (da) {
|
|
|
+ let df = this.detailForm
|
|
|
+ let status = da.status
|
|
|
+ df.toExamineStatus = da.type === 0 || da.status !== 0
|
|
|
+ df.status = status === 1 ? '已通过' : (status === -1 ? '已拒绝' : '待审核')
|
|
|
+ df.applyName = da.applyName
|
|
|
+ df.fileName = da.fileName
|
|
|
+ df.productModel = da.productModel
|
|
|
+ df.applyReason = da.applyReason
|
|
|
+ df.createTime = dateFormatMethod(da.createTime, '--')
|
|
|
+ // this.applyDetailsModal = true
|
|
|
+ this.requestMethod({ method: 'get', URI: `apply/findApplyDetails/${da.id}` }).then(res => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ // 处理数据
|
|
|
+ let data = res.data
|
|
|
+ this.stepsCurrent = data.current
|
|
|
+ this.stepsList = data.list
|
|
|
+ this.applyDetailsModal = true
|
|
|
+ this.stepsRefuse = data.refuse
|
|
|
+ df.baseUrl = data.baseUrl
|
|
|
+ } else {
|
|
|
+ this.$Message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ updateApplyHandle (data) {
|
|
|
+ this.updateStepsStatusModal = true
|
|
|
+ this.updateStepsStatusFileName = data.fileName
|
|
|
+ this.updateStepsStatusApplyName = data.applyName
|
|
|
+ this.updateStepsId = data.id
|
|
|
+ /* if (status === 1) {
|
|
|
+ this.$Modal.confirm({
|
|
|
+ title: '温馨提示',
|
|
|
+ content: `<p>停用后,设备SN:<strong style="color:red">${sn}</strong>联网将无法使用,仍然继续?`,
|
|
|
+ onOk: () => {
|
|
|
+ this.doSnStatus(id, status)
|
|
|
+ },
|
|
|
+ onCancel: () => {
|
|
|
+ this.$Message.info('已取消')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.doSnStatus(id, status)
|
|
|
+ } */
|
|
|
+ },
|
|
|
+ doSnStatus (id, status) {
|
|
|
+ let _status = status === 1 ? 0 : 1
|
|
|
+ let text = '已启动'
|
|
|
+ if (status === 1) text = '已停用'
|
|
|
+ let data = {
|
|
|
+ id: id,
|
|
|
+ status: _status
|
|
|
+ }
|
|
|
+ // 成功回调
|
|
|
+ const successCallback = res => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ if (status === 1) {
|
|
|
+ this.$Message.info(text)
|
|
|
+ } else {
|
|
|
+ this.$Message.success(text)
|
|
|
+ }
|
|
|
+ // 重新加载列表
|
|
|
+ this.handleSearch()
|
|
|
+ } else {
|
|
|
+ this.$Message.error(res.msg)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.requestMethod({ method: 'post', URI: '/sn/snManageHandle', data }).then(successCallback)
|
|
|
+ },
|
|
|
+ // 点击查询按钮
|
|
|
+ clickSearchBtn () {
|
|
|
+ this.pageNum = 1 // 重置页码
|
|
|
+ this.handleSearch()
|
|
|
+ },
|
|
|
+ // 分页
|
|
|
+ changePage (pageNum) {
|
|
|
+ this.pageNum = pageNum
|
|
|
+ this.handleSearch()
|
|
|
+ },
|
|
|
+ // 更改页容量
|
|
|
+ changePageSize (pageSize) {
|
|
|
+ this.pageSize = pageSize
|
|
|
+ this.pageNum = 1
|
|
|
+ this.handleSearch()
|
|
|
+ },
|
|
|
+ // 获取异常日志列表数据
|
|
|
+ handleSearch () {
|
|
|
+ if (this.loading) return
|
|
|
+ this.loading = true
|
|
|
+ const URI = '/apply/findApplyPageList'
|
|
|
+ let sd = this.searchData
|
|
|
+ let startTime = ''
|
|
|
+ let endTime = ''
|
|
|
+ if (sd.useDate && sd.useDate.length === 2 && sd.useDate[0]) {
|
|
|
+ startTime = sd.useDate[0].getTime()
|
|
|
+ endTime = sd.useDate[1].getTime()
|
|
|
+ }
|
|
|
+ const data = {
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ pageNum: this.pageNum,
|
|
|
+ startTime: startTime,
|
|
|
+ endTime: endTime,
|
|
|
+ productModel: sd.productModel,
|
|
|
+ fileName: sd.fileName,
|
|
|
+ status: sd.status,
|
|
|
+ applyName: sd.applyName
|
|
|
+ }
|
|
|
+ const successCallback = res => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ const receivedData = res.data
|
|
|
+ this.tableData = receivedData.list
|
|
|
+ this.totalCount = receivedData.totalRow
|
|
|
+ } else {
|
|
|
+ this.$Message.error(res.msg)
|
|
|
+ }
|
|
|
+ this.loading = false
|
|
|
+ }
|
|
|
+ this.requestMethod({ method: 'post', URI, data })
|
|
|
+ .then(successCallback)
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|