missMyLove 3 سال پیش
والد
کامیت
8dbbf89796

+ 58 - 0
src/components/eloamApplyCard.vue

@@ -0,0 +1,58 @@
+<template>
+  <div :style="outerStyles" @click="customClick">
+    <div v-if="itemModel" style="padding-top: 10px;padding-left:10px;font-size: 18px"><strong>{{itemModel}}</strong>
+        <Badge style="position: absolute;top:1%;right: 1%;" :text="itemType === 0?'公开':(itemType === 1?'私密':'机密')" :class-name="itemType === 0?'demo-badge-alone':(itemType === 1?'demo-blue-alone':'demo-red-alone')">
+        </Badge>
+    </div>
+    <div v-if="itemName" style="padding-bottom: 10px;padding-left:10px;font-size: 14px">{{itemName}}</div>
+  </div>
+</template>
+<style>
+  .demo-badge-alone{
+    background: #5cb85c !important;
+  }
+  .demo-red-alone{
+    background: #ff2845 !important;
+  }
+  .demo-blue-alone{
+    background: #008080 !important;
+  }
+</style>
+<script>
+export default {
+  name: 'EloamApplyCard',
+  props: {
+    itemModel: {
+      type: String,
+      default: ''
+    },
+    itemName: {
+      type: String,
+      default: ''
+    },
+    itemType: {
+      type: Number,
+      default: 0
+    },
+    styles: {
+      type: Object,
+      default: () => ({})
+    },
+    id: {
+      type: Number,
+      default: 0
+    }
+  },
+  computed: {
+    outerStyles () {
+      let obj = { width: '200px', height: 'auto', position: 'relative', 'border-radius': '5px', border: '1px solid #e8e8e8', 'text-align': 'left', margin: '10px' }
+      return Object.assign(obj, this.styles)
+    }
+  },
+  methods: {
+    customClick () {
+      this.$emit('on-success-click', this.id, this.itemModel + ' ' + this.itemName)
+    }
+  }
+}
+</script>

+ 1 - 0
src/locale/lang/en-US.js

@@ -33,6 +33,7 @@ export default {
   advertising_list: 'Ad list',
   PATIENT_MANAGE: 'Epidemic management',
   PATIENT_QUERY_LIST: 'Epidemic inquiry',
+  APPLY_RECORD_LIST: 'Epidemic inquiry',
   修改密码: 'Change Password', // 修改密码
   动态数据: 'Dynamic data',
   全屏: 'Full screen',

+ 2 - 0
src/locale/lang/zh-CN.js

@@ -39,6 +39,8 @@ export default {
   WX_REGISTER_DETAILS: '入驻编辑',
   WX_REGISTER_EDIT: '入驻编辑',
   WX_REGISTER_LIST: '商户管理',
+  APPLY_RECORD_LIST: '审核管理',
+  bus_resources_tools: '文件库',
   修改密码: '修改密码',
   动态数据: '动态数据',
   全屏: '全屏',

+ 20 - 0
src/router/routers.js

@@ -92,6 +92,26 @@ export default [
           title: '资料管理'
         },
         component: () => import('@/view/crops/sn_data_record')
+        // component: () => import('@/view/crops/eloam_apply_record')
+      },
+      {
+        path: 'APPLY_RECORD_LIST',
+        name: 'APPLY_RECORD_LIST',
+        meta: {
+          notCache: true,
+          title: '审核管理'
+        },
+        component: () => import('@/view/crops/apply_record_list')
+      },
+      {
+        path: 'bus_resources_tools',
+        name: 'bus_resources_tools',
+        meta: {
+          notCache: true,
+          title: '文件库'
+        },
+        // component: () => import('@/view/crops/sn_data_record')
+        component: () => import('@/view/crops/eloam_apply_record')
       }
     ]
   },

+ 713 - 0
src/view/crops/apply_record_list.vue

@@ -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>&nbsp;&nbsp;&nbsp;&nbsp;申请人:</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>

+ 204 - 0
src/view/crops/eloam_apply_record.vue

@@ -0,0 +1,204 @@
+<style>
+  .ivu-table-border th, .ivu-table-border td {
+    text-align: center;
+  }
+</style>
+<template>
+  <Card dis-hover>
+    <p slot="title">文件库</p>
+    <Row>
+      <Col :md="8" :lg="{span:4}">
+        <label>产品型号:</label>
+        <Input style="width: 70%" v-model="searchData.productModel" placeholder="请输入产品型号" :maxlength="20" clearable></Input>
+      </Col>
+      <Col :md="8" :lg="{span:4,offset:1}">
+        <label>文件类型:</label>
+        <Select style="width: 70%" v-model="searchData.productType" clearable placeholder="请选择文件类型">
+          <Option v-for="item in dataProductTypeList" :value="item.value" :key="item.value">{{item.label}}</Option>
+        </Select>
+      </Col>
+      <Col :md="8" :lg="{span:4,offset:1}">
+        <label>文件名称:</label>
+        <Input style="width: 70%" v-model="searchData.title" placeholder="请输入文件名称" :maxlength="20" clearable></Input>
+      </Col>
+      <Col :md="12" :lg="{span:1,offset:2}">
+        <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: 20px;display:flex;flex-wrap: wrap">
+      <div v-for="(item,index) in tableData" :key="index">
+        <EloamApplyCard :id="item.id" :itemType="item.productType" :itemModel="item.productModel" style="margin: 20px;width: 220px"
+                        @on-success-click="selectItemClick" :itemName="item.title"></EloamApplyCard>
+      </div>
+    </Row>
+    <Row>
+      <Modal title="发起授权申请" v-model="applyModal" :mask-closable="false" :closable="false">
+        <div style="padding-left: 20px">
+          <p>您将发起授权申请文件:<strong>{{applyFileName}}</strong></p>
+        </div>
+        <div style="padding-left: 20px;padding-top: 20px">
+          <Input v-model="applyReason" 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>
+    </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-elevator
+      ></Page>
+      <!-- 复制错误信息 输入框 START-->
+      <input type="text" ref="errorInfoInput" style="opacity: 0;"/>
+      <!-- 复制错误信息 输入框 END -->
+    </Row>
+  </Card>
+</template>
+<script>
+import EloamApplyCard from '_c/eloamApplyCard.vue'
+import { getDatePickOptions } from '../../common/date'
+import { mapActions } from 'vuex'
+
+const productTypeList = [
+  { value: 0, label: '公开' },
+  { value: 1, label: '私密' },
+  { value: 2, label: '机密' }
+]
+export default {
+  components: {
+    EloamApplyCard
+  },
+  data () {
+    return {
+      dataProductTypeList: productTypeList,
+      datePickOptions: getDatePickOptions(),
+      loading: false,
+      elaomLoading: false,
+      tableData: [],
+      totalCount: 0, // 总记录数
+      pageNum: 1, // 页码
+      pageSize: 24,
+      searchData: {
+        title: '',
+        productModel: '',
+        productType: ''
+      },
+      applyModal: false,
+      applyFileName: '',
+      applyReason: '',
+      applyItemId: ''
+    }
+  },
+  created () {
+    this.handleSearch() // 查询数据
+  },
+  mounted () {
+  },
+  methods: {
+    ...mapActions(['requestMethod']),
+    cancelRefuseHandle () {
+      this.applyReason = ''
+      this.applyModal = false
+      this.applyFileName = ''
+    },
+    agreeRefuseHandle () {
+      // 发起申请
+      if (this.applyReason) {
+        // 下面处理数据
+        this.requestMethod({ method: 'post', URI: `/apply/applyResources/${this.applyItemId}?applyReason=` + this.applyReason }).then(res => {
+          if (res.code === 0) {
+            this.$Message.success('申请已发送,静等审核结果')
+          } else {
+            this.$Message.error(res.msg)
+          }
+        })
+        this.applyModal = false
+        this.applyReason = ''
+      } else {
+        this.$Message.error('申请需要理由哟~')
+      }
+    },
+    selectItemClick (id, name) {
+      this.applyFileName = name
+      this.applyItemId = id
+      // 这里需要打开浏览器
+      this.requestMethod({ method: 'post', URI: `apply/findResourcesBaseUrl/${id}` }).then(res => {
+        if (res.code === 0) {
+          window.open(res.data, '_blank')
+        } else if (res.code === 10) {
+          // 这里说明授权
+          this.applyModal = true
+        } else if (res.code === -10) {
+          this.$Message.warning('授权申请正在审核中')
+        }
+      })
+    },
+    resetSearchData () {
+      this.searchData = {}
+    },
+    beforeUploadAction () {
+      this.elaomLoading = true
+      return true
+    },
+    detailsHandleCancel () {
+      this.fileUrl = ''
+      this.$Message.info('已取消')
+    },
+    // 点击查询按钮
+    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 = '/news/findAuthNewsPageList'
+      let sd = this.searchData
+      const data = {
+        pageSize: this.pageSize,
+        pageNum: this.pageNum,
+        title: sd.title,
+        productModel: sd.productModel,
+        productType: sd.productType
+      }
+      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>

+ 92 - 24
src/view/crops/sn_data_record.vue

@@ -9,21 +9,35 @@
     background-position: center center;
     background-repeat:no-repeat;
   }
-
+  .rRight{
+    margin-right: 40px;
+    height: 32px;
+    line-height: 32px;
+  }
 </style>
 <template>
   <Card dis-hover>
     <p slot="title">资料管理</p>
     <Row>
+      <Col :md="8" :lg="{span:4}">
+        <label>产品型号:</label>
+        <Input style="width: 70%" v-model="searchData.productModel" :maxlength="20" clearable></Input>
+      </Col>
+      <Col :md="8" :lg="{span:4}">
+        <label>文件类型:</label>
+        <Select style="width: 70%" v-model="searchData.productType" clearable>
+          <Option v-for="item in dataProductTypeList" :value="item.value" :key="item.value">{{item.label}}</Option>
+        </Select>
+      </Col>
       <Col :md="8" :lg="4">
-        <label>标题:</label>
-        <Input style="width: 70%" v-model="searchData.title" :maxlength="11" clearable></Input>
+        <label>文件名称:</label>
+        <Input style="width: 70%" v-model="searchData.title" :maxlength="20" clearable></Input>
       </Col>
-      <Col :md="8" :lg="{span:4,offset:1}">
+      <Col :md="8" :lg="{span:4}">
         <label>操作者:</label>
         <Input style="width: 70%" v-model="searchData.nickName" :maxlength="11" clearable></Input>
       </Col>
-      <Col :md="8" :lg="{span:4,offset:1}">
+     <!-- <Col :md="8" :lg="{span:4,offset:1}">
         <label>更新时间:</label>
         <DatePicker
           type="daterange"
@@ -35,8 +49,8 @@
           placement="bottom-start"
           style="width: 70%"
         ></DatePicker>
-      </Col>
-      <Col :md="12" :lg="{span:1,offset:4}">
+      </Col>-->
+      <Col :md="12" :lg="{span:1,offset:2}">
         <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}">
@@ -56,15 +70,28 @@
              :mask-closable="false"
              :loading="addModalLoading" :closable="false">
        <!-- <Button type="primary" @click="showLogs">显示日志</Button>-->
-        <div style="height: 640px">
-          <Row>
-            <Col style="padding-bottom: 20px">
-              <Input v-model="addForm.title" placeholder="请在这里输入标题" :maxlength="64" clearable></Input>
-            </Col>
-            <Col>
-              <quill-editor ref="eloamQuillEditor" :options="editorOption" style="height: 580px;" v-model="addForm.content"></quill-editor>
-            </Col>
-          </Row>
+        <div style="height: 660px">
+            <Row style="padding-bottom: 20px">
+              <Col span="10" >
+                <label>文件类型:</label>
+                <RadioGroup v-model="addForm.productType" style="height: 32px;">
+                  <Radio class="rRight" label="0"> 公  开 </Radio>
+                  <Radio class="rRight" label="1"> 私  密 </Radio>
+                  <Radio class="rRight" label="2"> 机  密 </Radio>
+                </RadioGroup>
+              </Col>
+              <Col span="14">
+                <label>产品型号:</label>
+                <Input v-model="addForm.productModel"  style="width: 87%" placeholder="请在这里输入产品型号" :maxlength="20" clearable></Input>
+              </Col>
+            </Row>
+            <Row style="padding-bottom: 20px">
+              <label>文件名称:</label>
+              <Input v-model="addForm.title" style="width:92%"  placeholder="请在这里输入标题" :maxlength="64" clearable></Input>
+            </Row>
+            <Row>
+              <quill-editor ref="eloamQuillEditor" :options="editorOption" style="height: 560px;" v-model="addForm.content"></quill-editor>
+            </Row>
         </div>
         <div slot="footer" style="text-align: center">
             <Button type="dashed"  style="margin-right: 30px" @click="detailsHandleCancel()">取消</Button>
@@ -156,12 +183,20 @@ const titleConfig = {
   'ql-clean': '清除字体样式',
   'ql-upload': '上传'
 }
+
+const productTypeList = [
+  { value: 0, label: '公开' },
+  { value: 1, label: '私密' },
+  { value: 2, label: '机密' }
+]
+
 export default {
   components: {
     quillEditor
   },
   data () {
     return {
+      dataProductTypeList: productTypeList,
       content: '',
       // 工具栏配置
       editorOption: {
@@ -191,10 +226,29 @@ export default {
       },
       columns: [
         {
-          title: '标题',
-          key: 'title',
+          title: '产品型号',
+          key: 'productModel',
           align: 'center',
           fixed: 'left',
+          minWidth: 120
+        },
+        {
+          title: '文件类型',
+          key: 'productType',
+          align: 'center',
+          minWidth: 120,
+          render: (h, params) => {
+            let type = params.row.productType
+            let content = '公开'
+            if (type === 1) content = '私密'
+            else if (type === 2) content = '机密'
+            return h('p', content)
+          }
+        },
+        {
+          title: '文件名称',
+          key: 'title',
+          align: 'center',
           minWidth: 140
         },
         {
@@ -204,7 +258,7 @@ export default {
           minWidth: 120
         },
         {
-          title: '访问接',
+          title: '访问接',
           key: 'baseUrl',
           align: 'center',
           width: 300,
@@ -234,7 +288,7 @@ export default {
           }
         },
         {
-          title: '更新时间',
+          title: '创建时间',
           key: 'createTime',
           align: 'center',
           minWidth: 150,
@@ -295,12 +349,16 @@ export default {
       searchData: {
         title: '',
         useDate: [],
-        nickName: ''
+        nickName: '',
+        productType: '',
+        productModel: ''
       },
       addForm: {
         id: '',
         title: '',
-        content: ''
+        content: '',
+        productType: '',
+        productModel: ''
       },
       isUpdateNews: false,
       newsModal: false,
@@ -419,12 +477,16 @@ export default {
       this.fileUrl = ''
       this.addForm.content = ''
       this.addForm.title = ''
+      this.addForm.productType = '0'
+      this.addForm.productModel = ''
     },
     updateNewsHandle (data) {
       let da = this.addForm
       da.id = data.id
       da.title = data.title
       da.content = data.content
+      da.productType = data.productType + ''
+      da.productModel = data.productModel
       this.isUpdateNews = true
       this.newsModal = true
       this.fileUrl = ''
@@ -448,7 +510,9 @@ export default {
       let data = {
         id: dp.id,
         title: dp.title,
-        content: dp.content
+        content: dp.content,
+        productType: dp.productType,
+        productModel: dp.productModel
       }
       this.requestMethod({ method: 'post', URI, data }).then(res => {
         if (res.code === 0) {
@@ -459,6 +523,8 @@ export default {
           }
           this.addForm.content = ''
           this.addForm.title = ''
+          this.addForm.productModel = ''
+          this.addForm.productType = ''
           this.handleSearch()
           this.newsModal = false
         } else {
@@ -513,7 +579,9 @@ export default {
         startTime: startTime,
         endTime: endTime,
         title: sd.title,
-        nickName: sd.nickName
+        nickName: sd.nickName,
+        productType: sd.productType,
+        productModel: sd.productModel
       }
       const successCallback = res => {
         if (res.code === 0) {