徐桐章 4 年 前
コミット
3919dcab8b

+ 1 - 1
.env.development

@@ -1,7 +1,7 @@
 // 本地环境
 module.exports={
   NODE_ENV = development
-  VUE_APP_API = http://47.100.59.52:7782
+  VUE_APP_API = http://47.100.59.52:7785
   VUE_APP_IMG = http://cdn.info666.com
   VUE_APP_VER = 0.0.1
   VUE_APP_DAT = new Date().getTime()

+ 1 - 1
.env.test

@@ -1,7 +1,7 @@
 // 测试环境
 module.exports={
   NODE_ENV = test
-  VUE_APP_API = http://47.100.59.52:7782
+  VUE_APP_API = http://47.100.59.52:7785
   VUE_APP_IMG = http://cdn.info666.com
   VUE_APP_VER = 0.0.1
   VUE_APP_DAT = new Date().getTime()

+ 3 - 3
README.md

@@ -1,11 +1,11 @@
 <!--
  * @Author       : yuanrunwei
  * @Date         : 2020-05-18 12:05:37
- * @LastEditors  : yuanrunwei
- * @LastEditTime : 2020-05-18 19:38:29
+ * @LastEditors: XuTongZhang
+ * @LastEditTime: 2020-07-29 10:28:37
  * @FilePath     : \ambre-admin-noob\README.md
 --> 
-# 费多多后台
+# 
 
 ```
 install:yarn install

+ 47 - 46
src/common/api/axios.js

@@ -1,8 +1,8 @@
 /*
  * @Author       : yuanrunwei
  * @Date         : 2020-05-18 12:05:37
- * @LastEditors  : yuanrunwei
- * @LastEditTime : 2020-06-15 20:50:00
+ * @LastEditors: XuTongZhang
+ * @LastEditTime: 2020-07-29 10:45:59
  * @FilePath     : \batterycloud-admin\src\common\api\axios.js
  */
 import axios from 'axios'
@@ -12,30 +12,31 @@ import { Message, Loading } from 'element-ui'
 let api = ''
 let loading
 const whiteList = ['test', 'production']
-const allowList = [
-  '/platform/upload/platformUploadImg'
-]
+// const allowList = [
+//   '/platform/upload/platformUploadImg'
+// ]
 
 const service = axios.create({
-  baseURL: whiteList.indexOf(process.env.NODE_ENV) !== -1 && process.env.VUE_APP_API,
+  baseURL: process.env.VUE_APP_API,
+  // baseURL: 'http://47.100.59.52:7785',
   timeout: 90000
 })
 
 service.interceptors.request.use(
   config => {
-    if (allowList.indexOf(config.url) === -1) {
-      let data = {
-        'from': 0,
-        'page': 1,
-        'rows': 10,
-        'userid': localStorage.getItem('managerid') - 0,
-        'sidx': '',
-        'sord': '',
-        'token': localStorage.getItem('token'),
-        'reqdata': {}
-      }
-      config.data = Object.assign(data, config.data)
+    // if (allowList.indexOf(config.url) === -1) {
+    let data = {
+      'from': 0,
+      'page': 1,
+      'rows': 10,
+      'companyId': 1 || localStorage.getItem('managerid') - 0,
+      'sidx': '',
+      'sord': '',
+      'token': localStorage.getItem('token'),
+      'reqdata': {}
     }
+    config.data = Object.assign(data, config.data)
+    // }
     loading = Loading.service({
       lock: true,
       text: 'Loading',
@@ -63,41 +64,41 @@ service.interceptors.response.use(
           location.reload()
         }, 100)
       }
-      if (allowList.indexOf(api) !== -1) {
-        loading.close()
-        resolve(res.data)
-      } else {
-        if (res.status === 200) {
-          if (res.data.state !== 100) {
-            Message({
-              message: res.data.msg,
-              type: 'error',
-              duration: 5 * 1000
-            })
-            loading.close()
-            reject(res.data.msg)
-          } else {
-            resolve(res.data)
-            loading.close()
-          }
-        } else {
-          loading.close()
+      // if (allowList.indexOf(api) !== -1) {
+      //   loading.close()
+      //   resolve(res.data)
+      // } else {
+      if (res.status === 200) {
+        if (res.data.state !== 100) {
           Message({
-            message: res.statusText,
+            message: res.data.msg,
             type: 'error',
             duration: 5 * 1000
           })
-          if (res.status > 100 && res.status < 200) {
-            if (whiteList.indexOf(process.env.NODE_ENV) !== -1) {
-              let url = `http://monitor.info666.com/monitor/alert?projectAbbr=batterycloud-test&errorMsg=接口:${api}(${res.statusText})&logPath=前端开发环境(${process.env.NODE_ENV})`
-              axios.get(url)
-              loading.close()
-            }
-          }
           loading.close()
-          reject(res)
+          reject(res.data.msg)
+        } else {
+          resolve(res.data)
+          loading.close()
+        }
+      } else {
+        loading.close()
+        Message({
+          message: res.statusText,
+          type: 'error',
+          duration: 5 * 1000
+        })
+        if (res.status > 100 && res.status < 200) {
+          if (whiteList.indexOf(process.env.NODE_ENV) !== -1) {
+            let url = `http://monitor.info666.com/monitor/alert?projectAbbr=batterycloud-test&errorMsg=接口:${api}(${res.statusText})&logPath=前端开发环境(${process.env.NODE_ENV})`
+            axios.get(url)
+            loading.close()
+          }
         }
+        loading.close()
+        reject(res)
       }
+      // }
     })
   },
   error => {

+ 10 - 1
src/components/vNav/vNav.vue

@@ -24,7 +24,6 @@
           :style="childIndex!==item.child.length-1?'margin-bottom: 15px':''"
           >
           <div>{{child.name}}</div>
-          <!-- <div v-else><el-badge :value="$store.getters.getNumber" :hidden="!$store.getters.getNumber" :max="99" type="warning" class="item">{{child.name}}</el-badge></div> -->
         </el-menu-item>
       </el-submenu>
     </el-menu>
@@ -94,6 +93,16 @@ export default {
           icon: 'iconshangpinguanlix f-16',
           child: [
             {
+              name: '候选人总表',
+              // menuid: 202,
+              to: 'candidateAll'
+            },
+            {
+              name: '简历列表',
+              // menuid: 202,
+              to: 'resumeList'
+            },
+            {
               name: '候选人列表',
               // menuid: 202,
               to: 'candidateList'

+ 13 - 12
src/components/vTable/vTable.vue

@@ -3,7 +3,6 @@
     <el-table
       ref="multipleTable"
       :data="tableList"
-      flt
       header-row-class-name="tableHeader"
       header-cell-class-name="tableHeader"
       @selection-change="handleSelectionChange"
@@ -15,6 +14,7 @@
       <el-table-column
         v-if="table.selection"
         align="center"
+        fixed
         type="selection"
         width="55">
       </el-table-column>
@@ -85,20 +85,21 @@
       <el-table-column
       label="操作"
       v-if="table.handle"
+      :width="table.width"
       align="center">
         <template slot-scope="scope">
           <el-button-group style="display:flex;justify-content: center;">
-              <el-button
-                v-for="(item,index) in table.handle.filter(item => show!==item.show).filter(item => scope.row[item.props]===item.key)"
-                :key="index"
-                style="margin:0px;"
-                class="btn handelBtn"
-                :type="item.type"
-                :disabled="!!scope.row[item.disabled]"
-                @click="handleMethods(scope.$index, scope.row, item)">
-                {{item.title}}
-                <!-- v-if="scope.row[item.props]===item.key" -->
-              </el-button>
+            <el-button
+              v-for="(item,index) in table.handle.filter(item => show!==item.show).filter(item => scope.row[item.props]===item.key)"
+              :key="index"
+              style="margin:0px;"
+              class="btn handelBtn"
+              :type="item.type"
+              :disabled="!!scope.row[item.disabled]"
+              @click="handleMethods(scope.$index, scope.row, item)">
+              {{item.title}}
+              <!-- v-if="scope.row[item.props]===item.key" -->
+            </el-button>
           </el-button-group>
         </template>
       </el-table-column>

+ 11 - 1
src/router/index.js

@@ -2,7 +2,7 @@
  * @Author       : yuanrunwei
  * @Date         : 2020-05-18 12:05:37
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-07-28 17:36:30
+ * @LastEditTime: 2020-07-30 10:17:59
  * @FilePath     : \ambre-admin-noob\src\router\index.js
  */
 import Vue from 'vue'
@@ -13,11 +13,21 @@ Vue.use(VueRouter)
 
 const routes = [
   {
+    path: '/candidateAll',
+    name: 'candidateAll',
+    component: () => import('@/views/candidateManage/candidateAll')
+  },
+  {
     path: '/candidateList',
     name: 'candidateList',
     component: () => import('@/views/candidateManage/candidateList')
   },
   {
+    path: '/resumeList',
+    name: 'resumeList',
+    component: () => import('@/views/candidateManage/resumeList')
+  },
+  {
     path: '/basicInfo',
     name: 'basicInfo',
     component: () => import('@/views/companyManage/basicInfo')

+ 250 - 0
src/views/candidateManage/candidateAll.vue

@@ -0,0 +1,250 @@
+<!--
+ * @Description: create
+ * @Version: 1.0
+ * @Autor: XuTongZhang
+ * @Date: 2020-07-30 10:17:25
+ * @LastEditors: XuTongZhang
+ * @LastEditTime: 2020-07-30 11:33:06
+-->
+<template>
+  <div class="indexPage">
+    <v-input :btn="btn" :list="list" @search="search"></v-input>
+    <v-table
+      :table="table"
+      :tableList="tableList"
+      :sortType="true"
+      :queryData="queryData"
+      :form="form"
+      @details="details"
+      @update="update"
+      @selection-change="selection"
+      id=""
+    ></v-table>
+    <v-pager @page="callPage" :total="totalrecords"></v-pager>
+    <resume :dialogFormVisible="dialogFormVisible" :close="close"></resume>
+  </div>
+</template>
+
+<script>
+import resume from './resume'
+export default {
+  data () {
+    return {
+      tableList: [],
+      dialogFormVisible: true,
+      page: 1,
+      totalrecords: 0,
+      pickList: [],
+      form: {},
+      list: [
+        {
+          placeholder: '请输入关键字查询',
+          props: 'condition'
+        },
+        {
+          type: 'select',
+          placeholder: '性别',
+          props: 'delivererSex',
+          options: [{ label: '男', value: 1 }, { label: '女', value: 0 }]
+        },
+        {
+          type: 'select',
+          placeholder: '来源',
+          props: 'resumeFrom',
+          options: [{ label: '51job', value: 0 }, { label: '智联', value: 1 }]
+        },
+        {
+          type: 'select',
+          placeholder: '投递职位',
+          props: 'positionApplied',
+          options: []
+        },
+        {
+          type: 'select',
+          placeholder: '应聘职位',
+          props: '',
+          options: []
+        }
+      ],
+      btn: [
+        {
+          name: '重置',
+          type: 'success',
+          method: ''
+        },
+        {
+          name: '确定',
+          type: 'primary',
+          method: ''
+        }
+      ],
+      table: {
+        selection: true,
+        column: [
+          {
+            label: '编号',
+            props: ''
+          },
+          {
+            label: '姓名',
+            props: 'delivererName'
+          },
+          {
+            label: '性别',
+            props: 'delivererSex'
+          },
+          {
+            label: '简历来源',
+            props: ''
+          },
+          {
+            label: '招聘类型',
+            props: ''
+          },
+          {
+            label: '简历投递职位',
+            props: 'positionApplied'
+          },
+          {
+            label: '简历状态',
+            props: 'status'
+          },
+          {
+            label: '工作年限',
+            props: 'delivererWorkExp'
+          },
+          {
+            label: '学历',
+            props: ''
+          },
+          {
+            label: '联系电话',
+            props: 'delivererPhone'
+          },
+          {
+            label: '面试应聘职位',
+            props: ''
+          },
+          {
+            label: '通知面试时间',
+            props: ''
+          },
+          {
+            label: '完成面试时间',
+            props: ''
+          },
+          {
+            label: '面试状态',
+            props: ''
+          },
+          {
+            label: '面试结果',
+            props: ''
+          }
+        ],
+        handle: [
+          {
+            title: '查看简历',
+            method: '',
+            type: 'info'
+          }
+        ]
+      }
+    }
+  },
+  components: {
+    resume
+  },
+  mounted () {
+    this.queryData()
+  },
+  methods: {
+    queryData (form = { conditions: '' }, sort = {}) {
+      let page = this.page
+      this.form = form
+      let reqdata = form
+      this.$api
+        .post('/resumeInfo/queryResumeList', {
+          reqdata,
+          page
+        })
+        .then((res) => {
+          this.totalrecords = res.totalrecords
+          this.tableList = res.list
+        })
+    },
+    search (form) {
+      this.queryData(form)
+    },
+    details (row) {
+      this.dialogVisible = true
+      this.querydetail(row.infoId)
+    },
+    update (row) {
+      this.type = 1
+      this.querydetail(row.infoId)
+      this.openDiaLog()
+    },
+    querydetail (infoId) {
+      this.$api
+        .post('/platform/information/platformGetInformation', {
+          reqdata: {
+            infoId
+          }
+        })
+        .then((res) => {
+          let obj = res.object
+          // obj.createtime = this.$utils.format(res.object.createtime)
+          this.info = obj
+        })
+    },
+    del (row, type = false) {
+      let id = type ? row : [row.infoId]
+      this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          this.$api
+            .post('/platform/information/platformDeleteInformation', {
+              reqdata: {
+                id
+              }
+            })
+            .then((res) => {
+              this.queryData(this.form)
+              this.$message({
+                type: 'success',
+                message: '删除成功!'
+              })
+            })
+        })
+        .catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          })
+        })
+    },
+    delAll () {
+      this.pickList.length
+        ? this.del(this.pickList, true)
+        : this.$message({ type: 'info', message: '请选择需要删除的内容' })
+    },
+    selection (val) {
+      this.pickList = val
+    },
+    open () {
+      this.dialogFormVisible = true
+    },
+    close () {
+      this.dialogFormVisible = false
+    },
+    callPage (val) {
+      this.page = val
+      this.queryData(this.form)
+    }
+  }
+}
+</script>

+ 3 - 13
src/views/candidateManage/candidateList.vue

@@ -4,21 +4,17 @@
  * @Autor: XuTongZhang
  * @Date: 2020-07-28 15:25:06
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-07-28 16:42:09
+ * @LastEditTime: 2020-07-30 09:54:20
 -->
 <template>
   <div class="indexPage">
     <v-input :btn="btn" :list="list" :sortRule="sortRule" @add="add" @del="delAll" @search="search"></v-input>
     <el-radio-group v-model="isCollapse" style="margin-bottom: 20px;">
-      <el-radio-button :label="0">候选人列表</el-radio-button>
       <el-radio-button :label="1">已通过候选人</el-radio-button>
       <el-radio-button :label="2">已淘汰候选人</el-radio-button>
-      <el-radio-button :label="3">未读简历</el-radio-button>
-      <el-radio-button :label="4">已通过简历</el-radio-button>
-      <el-radio-button :label="5">已通知简历</el-radio-button>
-      <el-radio-button :label="6">已淘汰简历</el-radio-button>
     </el-radio-group>
     <v-table
+      :key="isCollapse"
       :table="table"
       :tableList="tableList"
       :sortType="true"
@@ -53,7 +49,7 @@ export default {
           type: 'select',
           placeholder: '性别',
           props: '',
-          options: []
+          options: [{ label: '男', value: 1 }, { label: '女', value: 0 }]
         },
         {
           type: 'select',
@@ -170,13 +166,7 @@ export default {
     search (form, sortRule) {
       this.queryData(form, sortRule)
     },
-    add (item) {
-      this.type = 0
-      this.info = {}
-      this.openDiaLog()
-    },
     details (row) {
-      // this.$refs.multipleTable.selection
       this.dialogVisible = true
       this.querydetail(row.infoId)
     },

+ 121 - 0
src/views/candidateManage/resume.vue

@@ -0,0 +1,121 @@
+<!--
+ * @Description: create
+ * @Version: 1.0
+ * @Autor: XuTongZhang
+ * @Date: 2020-07-30 10:32:00
+ * @LastEditors: XuTongZhang
+ * @LastEditTime: 2020-07-30 11:55:29
+-->
+<template>
+    <div>
+        <el-dialog :visible.sync="dialogFormVisible" width="1200px" :before-close="close" :show-close="false">
+            <div class="flex">
+                <div class="left">
+                    <div class="top">
+                        <div class="title">小八的面试视频:</div>
+                        <div class="video">
+                            <video width="500" controls src="https://vdept.bdstatic.com/324b4d51474d51685674525a7a397737/424e6c6a6b354875/e4f949c59a0a5afc39446b7e83c8e2893ec5727c25bd8fde06c2adaa08b7cf820228b97312bb8b487ef1f73ac3aaf66af73fd54d4fd6f64d5f280059490670d7.mp4?auth_key=1596084985-0-0-014de3491d14f4f16a570bc972366f96"></video>
+                        </div>
+                        <div class="list">
+                            <div class="is-active">视频第一段</div>
+                            <div>视频第二段</div>
+                            <div>视频第三段</div>
+                        </div>
+                    </div>
+                    <div class="center">
+                        <div class="title">简历备注:</div>
+                        <el-input
+                            type="textarea"
+                            :rows="4"
+                            resize="none"
+                            placeholder="请输入内容"
+                            v-model="positionIntroduce"
+                        ></el-input>
+                    </div>
+                    <div class="footer">
+                        <el-button type="primary" @click="close">提交备注</el-button>
+                        <el-button type="danger" >标记为未通过</el-button>
+                        <el-button type="success" >标记为通过</el-button>
+                    </div>
+                </div>
+                <div class="right">
+                    <div></div>
+                </div>
+            </div>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+export default {
+  data () {
+    return {
+      positionIntroduce: ''
+    }
+  },
+  props: {
+    dialogFormVisible: {
+      type: Boolean,
+      default: false
+    },
+    close: {
+      type: Function,
+      default: () => {}
+    },
+    info: {
+      type: Object,
+      default: () => {}
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+    .flex {
+        display: flex;
+        justify-content: space-between;
+        .left {
+            .top {
+                .title {
+                    font-size: 28px;
+                    margin-bottom: 10px;
+                }
+                .list {
+                    margin-top: 10px;
+                    font-size: 14px;
+                    display: flex;
+                    color: rgb(42, 117, 216);
+                    > div {
+                        cursor: pointer;
+                        margin: 10px;
+                    }
+                    .is-active {
+                        color: #000;
+                    }
+                }
+            }
+            .center {
+                margin-top: 10px;
+                .title {
+                    font-size: 22px;
+                    margin-bottom: 10px;
+                }
+            }
+            .footer {
+                margin-top: 30px;
+                display: flex;
+                justify-content: center;
+            }
+        }
+        .right {
+            margin-left: 30px;
+            flex: 1;
+            overflow: scroll;
+            height: 554px;
+            > div {
+                // background-color:goldenrod;
+                height: 100vh;
+            }
+        }
+    }
+</style>

+ 337 - 0
src/views/candidateManage/resumeList.vue

@@ -0,0 +1,337 @@
+<!--
+ * @Description: create
+ * @Version: 1.0
+ * @Autor: XuTongZhang
+ * @Date: 2020-07-30 09:53:19
+ * @LastEditors: XuTongZhang
+ * @LastEditTime: 2020-07-30 19:08:53
+-->
+<template>
+  <div class="indexPage">
+    <v-input :btn="btn" :list="list" @del="delAll" @search="search"></v-input>
+    <el-radio-group v-model="isCollapse" style="margin-bottom: 20px;">
+      <el-radio-button :label="1">未读简历</el-radio-button>
+      <el-radio-button :label="2">已通过简历</el-radio-button>
+      <el-radio-button :label="3">已通知简历</el-radio-button>
+      <el-radio-button :label="4">已淘汰简历</el-radio-button>
+    </el-radio-group>
+    <v-table
+      :key="isCollapse"
+      :table="isCollapse===3?throughTable:table"
+      :tableList="tableList"
+      :sortType="true"
+      :queryData="queryData"
+      :form="form"
+      @details="details"
+      @notice="notice"
+      @through="through"
+      @eliminate="eliminate"
+      @del="del"
+      @selection-change="selection"
+      id="id"
+    ></v-table>
+    <v-pager @page="callPage" :total="totalrecords"></v-pager>
+  </div>
+</template>
+
+<script>
+export default {
+  data () {
+    return {
+      tableList: [],
+      dialogFormVisible: true,
+      page: 1,
+      sortRule: {},
+      isCollapse: 1,
+      totalrecords: 0,
+      pickList: [],
+      form: {},
+      list: [
+        {
+          placeholder: '请输入关键字查询',
+          props: 'condition'
+        },
+        {
+          type: 'select',
+          placeholder: '性别',
+          props: 'delivererSex',
+          options: [
+            { label: '男', value: 1 },
+            { label: '女', value: 0 }
+          ]
+        },
+        {
+          type: 'select',
+          placeholder: '来源',
+          props: 'resumeFrom',
+          options: [{ label: '51job', value: 0 }, { label: '智联', value: 1 }]
+        },
+        {
+          type: 'select',
+          placeholder: '投递职位',
+          props: 'positionApplied',
+          options: []
+        }
+      ],
+      btn: [
+        {
+          name: '重置',
+          type: 'success',
+          method: ''
+        },
+        {
+          name: '确定',
+          type: 'primary',
+          method: ''
+        },
+        {
+          name: '删除',
+          type: 'danger',
+          method: ''
+        }
+      ],
+      table: {
+        selection: true,
+        column: [
+          {
+            label: '编号',
+            props: ''
+          },
+          {
+            label: '姓名',
+            props: ''
+          },
+          {
+            label: '性别',
+            props: ''
+          },
+          {
+            label: '简历来源',
+            props: ''
+          },
+          {
+            label: '简历投递时间',
+            props: ''
+          },
+          {
+            label: '简历投递职位',
+            props: ''
+          },
+          {
+            label: '工作年限',
+            props: ''
+          },
+          {
+            label: '学历',
+            props: ''
+          },
+          {
+            label: '联系电话',
+            props: ''
+          }
+        ],
+        width: 500,
+        handle: [
+          {
+            title: '查看简历',
+            method: 'details',
+            type: 'info'
+          },
+          {
+            title: '通知面试',
+            method: 'notice',
+            type: 'success'
+          },
+          {
+            title: '标记通过',
+            method: 'through',
+            type: 'primary'
+          },
+          {
+            title: '标记淘汰',
+            method: 'eliminate',
+            type: 'warning'
+          },
+          {
+            title: '删除',
+            method: 'del',
+            type: 'danger'
+          }
+        ]
+      },
+      throughTable: {
+        selection: true,
+        column: [
+          {
+            label: '编号',
+            props: ''
+          },
+          {
+            label: '姓名',
+            props: ''
+          },
+          {
+            label: '性别',
+            props: ''
+          },
+          {
+            label: '简历来源',
+            props: ''
+          },
+          {
+            label: '简历投递时间',
+            props: ''
+          },
+          {
+            label: '当前状态',
+            props: ''
+          },
+          {
+            label: '简历投递职位',
+            props: ''
+          },
+          {
+            label: '工作年限',
+            props: ''
+          },
+          {
+            label: '学历',
+            props: ''
+          },
+          {
+            label: '联系电话',
+            props: ''
+          }
+        ],
+        width: 500,
+        handle: [
+          {
+            title: '查看简历',
+            method: 'details',
+            type: 'info'
+          },
+          {
+            title: '查看视频',
+            method: '',
+            type: 'warning'
+          },
+          {
+            title: '删除',
+            method: 'del',
+            type: 'danger'
+          }
+        ]
+      }
+    }
+  },
+  mounted () {
+    this.queryData()
+  },
+  methods: {
+    queryData (form = {}) {
+      let page = this.page
+      let reqdata = form
+      this.$api
+        .post('/resumeInfo/queryResumeList', {
+          reqdata,
+          page
+        })
+        .then((res) => {
+          this.totalrecords = res.totalrecords
+          this.tableList = res.list
+        })
+    },
+    search (form, sortRule) {
+      this.queryData(form)
+    },
+    details (row) {
+      this.open()
+      this.querydetail(row.id)
+    },
+    notice (row) {
+    },
+    through (row) {
+      this.$api
+        .post('/platform/information/platformGetInformation', {
+          reqdata: {
+            id: row.id
+          }
+        })
+        .then((res) => {
+          this.queryData(this.form)
+        })
+    },
+    eliminate (row) {
+      this.$api
+        .post('/platform/information/platformGetInformation', {
+          reqdata: {
+            id: row.id
+          }
+        })
+        .then((res) => {
+          this.queryData(this.form)
+        })
+    },
+    querydetail (infoId) {
+      this.$api
+        .post('/resumeInfo/queryResumeInfoDetail', {
+          reqdata: {
+            infoId
+          }
+        })
+        .then((res) => {
+          let obj = res.object
+          // obj.createtime = this.$utils.format(res.object.createtime)
+          this.info = obj
+        })
+    },
+    del (row, type = false) {
+      let id = type ? row : [row.infoId]
+      this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          this.$api
+            .post('/platform/information/platformDeleteInformation', {
+              reqdata: {
+                id
+              }
+            })
+            .then((res) => {
+              this.queryData(this.form, this.sortRule)
+              this.$message({
+                type: 'success',
+                message: '删除成功!'
+              })
+            })
+        })
+        .catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          })
+        })
+    },
+    delAll () {
+      this.pickList.length
+        ? this.del(this.pickList, true)
+        : this.$message({ type: 'info', message: '请选择需要删除的内容' })
+    },
+    selection (val) {
+      this.pickList = val
+    },
+    open () {
+      this.dialogFormVisible = true
+    },
+    close () {
+      this.dialogFormVisible = false
+    },
+    callPage (val) {
+      this.page = val
+      this.queryData(this.form)
+    }
+  }
+}
+</script>

+ 32 - 5
src/views/companyManage/basicInfo.vue

@@ -4,23 +4,23 @@
  * @Autor: XuTongZhang
  * @Date: 2020-07-28 17:19:02
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-07-29 09:47:17
+ * @LastEditTime: 2020-07-29 19:38:47
 -->
 <template>
   <div class="basicInfo">
     <el-card class="box-card">
       <el-form ref="form" :model="form" label-width="140px" label-position="left">
         <el-form-item label="公司名称">
-          <el-input v-model.trim="form.name"></el-input>
+          <el-input v-model.trim="form.companyName"></el-input>
         </el-form-item>
         <el-form-item label="公司地址">
-          <el-input v-model.trim="form.name"></el-input>
+          <el-input v-model.trim="form.companyAddress"></el-input>
         </el-form-item>
         <el-form-item label="公司简介">
-          <editor-bar class="editor" v-model.trim="form.supplyProductDetails"></editor-bar>
+          <editor-bar class="editor" v-model.trim="form.companyIntroduce"></editor-bar>
         </el-form-item>
         <el-form-item class="button-grounp">
-          <el-button type="primary">确认修改</el-button>
+          <el-button type="primary" @click="determine">确认修改</el-button>
         </el-form-item>
       </el-form>
     </el-card>
@@ -37,6 +37,33 @@ export default {
   },
   components: {
     EditorBar
+  },
+  created () {
+    this.getDetails()
+  },
+  methods: {
+    getDetails () {
+      let url = '/companyInfo/queryCompanyInfo'
+      let reqdata = {}
+      this.$api
+        .post(url, {
+          reqdata
+        })
+        .then((res) => {
+          this.form = res.object
+        })
+    },
+    determine () {
+      let url = '/companyInfo/updateCompanyInfo'
+      let reqdata = this.form
+      this.$api
+        .post(url, {
+          reqdata
+        })
+        .then((res) => {
+          this.getDetails()
+        })
+    }
   }
 }
 </script>

+ 163 - 25
src/views/companyManage/formManage.vue

@@ -4,30 +4,41 @@
  * @Autor: XuTongZhang
  * @Date: 2020-07-28 16:24:44
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-07-29 09:59:37
+ * @LastEditTime: 2020-07-30 20:36:15
 -->
 <template>
   <div class="indexPage">
-    <v-input :btn="btn" :list="list"></v-input>
+    <v-input :btn="btn" :list="list" @add="add"></v-input>
     <v-table
       :table="table"
       :tableList="tableList"
       :sortType="true"
       :queryData="queryData"
+      @details="details"
+      @editor="editor"
+      @del="del"
     ></v-table>
     <v-pager @page="callPage" :total="totalrecords"></v-pager>
-    <el-dialog :visible.sync="dialogFormVisible">
-      <el-form :model="form" label-width="140px">
-        <el-form-item label="表单名称">
-          <el-input v-model="form.name" autocomplete="off"></el-input>
+    <el-dialog :visible.sync="dialogFormVisible" :before-close="close">
+      <el-form :model="form" ref="form" label-width="140px" :rules="rules" label-position="left">
+        <el-form-item label="表单名称" prop="formName">
+          <el-input v-model="form.formName" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item label="说明">
-          <el-input type="textarea" :rows="4" resize="none" placeholder="请输入内容" v-model="form.textarea"></el-input>
+        <el-form-item label="说明" prop="formIntroduce">
+          <el-input type="textarea" :rows="4" resize="none" placeholder="请输入内容" v-model="form.formIntroduce"></el-input>
+        </el-form-item>
+        <el-form-item label="选择需要的表单项" prop="checkList">
+          勾选需要的表单选项,点击生成表单即可
+          <el-checkbox-group v-model="form.checkList">
+            <div v-for="item in formConfigList" :key="item.id" >
+              <el-checkbox :label="item.id">{{item.configName + ' ' + (item.type === 0 ? '单行输入框' : item.type === 1 ? '多行输入框' : '下拉选择框')}}</el-checkbox>
+            </div>
+          </el-checkbox-group>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="dialogFormVisible = false">取 消</el-button>
-        <el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>
+        <el-button @click="close">取 消</el-button>
+        <el-button type="primary" v-if="state!==2" @click="determine">确 定</el-button>
       </div>
     </el-dialog>
   </div>
@@ -36,57 +47,184 @@
 <script>
 export default {
   data () {
+    let validcodeName = (rule, value, callback) => {
+      if (!value.length) {
+        callback(new Error('请选择需要的表单项'))
+      } else {
+        callback()
+      }
+    }
     return {
       tableList: [],
-      dialogFormVisible: false,
-      form: {},
+      dialogFormVisible: true,
       page: 1,
-      sortRule: {},
+      state: 0,
+      form: {
+        checkList: []
+      },
+      formConfigList: [],
       totalrecords: 0,
       pickList: [],
-      list: [
-      ],
+      rules: {
+        formName: [
+          { required: true, message: '请选择活动区域', trigger: 'change' }
+        ],
+        formIntroduce: [
+          { required: true, message: '请选择活动区域', trigger: 'change' }
+        ],
+        checkList: [
+          { validator: validcodeName, trigger: 'blur' }
+        ]
+      },
+      list: [],
       btn: [
         {
-          name: '添加新视频',
+          name: '添加',
           type: 'success',
-          method: ''
+          method: 'add'
         }
       ],
       table: {
         column: [
           {
             label: '编号',
-            props: ''
+            props: 'id'
           },
           {
             label: '表单名称',
-            props: ''
+            props: 'formName'
           },
           {
             label: '说明',
-            props: ''
+            props: 'formIntroduce'
           }
         ],
         handle: [
           {
             title: '查看',
-            method: '',
+            method: 'details',
             type: 'info'
           },
           {
             title: '编辑',
-            method: '',
-            type: 'info'
+            method: 'editor',
+            type: 'warning'
           },
           {
             title: '删除',
-            method: '',
-            type: 'info'
+            method: 'del',
+            type: 'danger'
           }
         ]
       }
     }
+  },
+  created () {
+    this.queryData()
+    this.queryFormConfigList()
+  },
+  methods: {
+    queryData (form = {}) {
+      let page = this.page
+      let reqdata = form
+      this.$api
+        .post('/form/queryFormList', {
+          reqdata,
+          page
+        })
+        .then((res) => {
+          this.totalrecords = res.totalrecords
+          this.tableList = res.list
+        })
+    },
+    queryFormConfigList () {
+      this.$api
+        .post('/formConfig/queryFormConfigList', {
+          reqdata: {}
+        })
+        .then((res) => {
+          this.formConfigList = res.list
+        })
+    },
+    add () {
+      this.open()
+      this.info = {}
+      this.state = 0
+    },
+    getDetails (row) {
+      let reqdata = { id: row.id }
+      this.$api
+        .post('/form/queryFormDetail', {
+          reqdata
+        })
+        .then((res) => {
+          this.open()
+          this.form = res.object
+          this.form.checkList = JSON.parse(res.object.formConfig).map(item => item.id)
+        })
+    },
+    details (row) {
+      this.getDetails(row)
+      this.state = 2
+    },
+    editor (row) {
+      this.getDetails(row)
+      this.state = 1
+    },
+    del (row) {
+      let reqdata = { id: row.id }
+      this.$api
+        .post('/form/deleteForm', {
+          reqdata
+        })
+        .then((res) => {
+          this.queryData()
+        })
+    },
+    determine () {
+      let a
+      this.$refs['form'].validate((valid) => {
+        a = valid
+      })
+      if (!a) return
+      let array = []
+      this.form.checkList.forEach(item => {
+        array.push(this.formConfigList.find(i => i.id === item))
+      })
+      console.log(this.form)
+      let url = this.state ? '/form/updateForm' : '/form/saveForm'
+      let reqdata = this.form
+      reqdata.formConfig = JSON.stringify(array)
+      this.$api
+        .post(url, {
+          reqdata
+        })
+        .then((res) => {
+          this.close()
+          this.queryData()
+        })
+    },
+    open () {
+      this.dialogFormVisible = true
+    },
+    close () {
+      this.form = {
+        checkList: []
+      }
+      this.dialogFormVisible = false
+    },
+    callPage (val) {
+      this.page = val
+      this.queryData()
+    }
   }
 }
 </script>
+
+<style lang="scss" scoped>
+  .dialog-footer {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+</style>

+ 2 - 2
src/views/companyManage/passwordSettings.vue

@@ -4,12 +4,12 @@
  * @Autor: XuTongZhang
  * @Date: 2020-07-28 17:34:44
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-07-28 17:56:38
+ * @LastEditTime: 2020-07-29 10:13:18
 -->
 <template>
   <div class="passwordSettings">
     <el-card class="box-card">
-      <el-form ref="form" :model="form" rules="rules" label-width="140px" label-position="left">
+      <el-form ref="form" :model="form" :rules="rules" label-width="140px" label-position="left">
         <el-form-item label="输入旧密码">
           <el-input v-model.trim="form.name"></el-input>
         </el-form-item>

+ 136 - 20
src/views/companyManage/positionInfo.vue

@@ -4,22 +4,36 @@
  * @Autor: XuTongZhang
  * @Date: 2020-07-28 17:19:43
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-07-29 09:55:44
+ * @LastEditTime: 2020-07-30 17:38:01
 -->
 <template>
   <div class="indexPage">
-    <v-input :btn="btn" :list="list"></v-input>
-    <v-table :table="table" :tableList="tableList" :sortType="true" :queryData="queryData"></v-table>
+    <v-input :btn="btn" :list="list" @add="add"></v-input>
+    <v-table
+      :table="table"
+      :tableList="tableList"
+      :sortType="true"
+      :queryData="queryData"
+      @details="details"
+      @editor="editor"
+      @del="del"
+    ></v-table>
     <v-pager @page="callPage" :total="totalrecords"></v-pager>
-    <el-dialog :visible.sync="dialogFormVisible">
-      <el-form :model="form" label-width="140px">
-        <el-form-item label="职位名称">
-          <el-input v-model="form.name" autocomplete="off"></el-input>
+    <el-dialog width="600px" :visible.sync="dialogFormVisible" :before-close="close">
+      <el-form :model="form" ref="form" label-width="140px" :rules="rules" label-position="left">
+        <el-form-item label="职位名称" prop="positionName">
+          <el-input v-model="form.positionName" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item label="职位描述">
-          <el-input type="textarea" :rows="4" resize="none" placeholder="请输入内容" v-model="form.textarea"></el-input>
+        <el-form-item label="职位描述" prop="positionIntroduce">
+          <el-input
+            type="textarea"
+            :rows="4"
+            resize="none"
+            placeholder="请输入内容"
+            v-model="form.positionIntroduce"
+          ></el-input>
         </el-form-item>
-        <el-form-item label="职位状态">
+        <el-form-item label="职位状态" prop="status">
           <el-radio-group v-model="form.status">
             <el-radio :label="0">启用</el-radio>
             <el-radio :label="1">禁用</el-radio>
@@ -27,8 +41,8 @@
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="dialogFormVisible = false">取 消</el-button>
-        <el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>
+        <el-button @click="close">取 消</el-button>
+        <el-button type="primary" v-if="state!==2" @click="determine">确 定</el-button>
       </div>
     </el-dialog>
   </div>
@@ -40,32 +54,37 @@ export default {
     return {
       tableList: [],
       dialogFormVisible: false,
-      form: {},
       page: 1,
-      sortRule: {},
+      form: {},
       totalrecords: 0,
+      state: 0,
       pickList: [],
+      rules: {
+        positionName: [{ required: true, message: '请填写职位名称', trigger: 'change' }],
+        positionIntroduce: [{ required: true, message: '请填写职位描述', trigger: 'change' }],
+        status: [{ required: true, message: '请选择职位状态', trigger: 'change' }]
+      },
       list: [],
       btn: [
         {
           name: '添加',
           type: 'success',
-          method: ''
+          method: 'add'
         }
       ],
       table: {
         column: [
           {
             label: '编号',
-            props: ''
+            props: 'companyId'
           },
           {
             label: '职位名称',
-            props: ''
+            props: 'positionName'
           },
           {
             label: '职位描述',
-            props: ''
+            props: 'positionIntroduce'
           },
           {
             label: '职位状态',
@@ -74,13 +93,110 @@ export default {
         ],
         handle: [
           {
-            title: '删除',
-            method: '',
+            title: '查看',
+            method: 'details',
             type: 'info'
+          },
+          {
+            title: '编辑',
+            method: 'editor',
+            type: 'warning'
+          },
+          {
+            title: '删除',
+            method: 'del',
+            type: 'danger'
           }
         ]
       }
     }
+  },
+  created () {
+    this.queryData()
+  },
+  methods: {
+    queryData (form = {}) {
+      let page = this.page
+      let reqdata = {}
+      this.$api
+        .post('/position/queryPositionList', {
+          reqdata,
+          page
+        })
+        .then((res) => {
+          this.totalrecords = res.totalrecords
+          this.tableList = res.list
+        })
+    },
+    add () {
+      this.open()
+      this.info = {}
+      this.state = 0
+    },
+    getDetails (row) {
+      let reqdata = { id: row.id }
+      this.$api
+        .post('/position/queryPositionDetail', {
+          reqdata
+        })
+        .then((res) => {
+          this.open()
+          this.form = res.object
+        })
+    },
+    details (row) {
+      this.getDetails(row)
+      this.state = 1
+    },
+    editor (row) {
+      this.getDetails(row)
+      this.state = 2
+    },
+    del (row) {
+      this.$api
+        .post('/position/deletePosition', {
+          reqdata: { id: row.id }
+        })
+        .then((res) => {
+          this.queryData()
+        })
+    },
+    determine () {
+      let a
+      this.$refs['form'].validate((valid) => {
+        a = valid
+      })
+      if (!a) return
+      let url = this.state ? '/position/updatePosition' : '/position/savePosition'
+      let reqdata = this.form
+      this.$api
+        .post(url, {
+          reqdata
+        })
+        .then((res) => {
+          this.close()
+          this.queryData()
+        })
+    },
+    open () {
+      this.dialogFormVisible = true
+    },
+    close () {
+      this.form = {}
+      this.dialogFormVisible = false
+    },
+    callPage (val) {
+      this.page = val
+      this.queryData()
+    }
   }
 }
 </script>
+
+<style lang="scss" scoped>
+.dialog-footer {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+</style>

+ 221 - 23
src/views/companyManage/procedureManage.vue

@@ -4,30 +4,73 @@
  * @Autor: XuTongZhang
  * @Date: 2020-07-28 16:00:46
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-07-29 09:59:20
+ * @LastEditTime: 2020-07-30 20:33:59
 -->
 <template>
   <div class="indexPage">
-    <v-input :btn="btn" :list="list"></v-input>
+    <v-input :btn="btn" :list="list" @add="add"></v-input>
     <v-table
       :table="table"
       :tableList="tableList"
       :sortType="true"
       :queryData="queryData"
+      @details="details"
+      @editor="editor"
+      @del="del"
     ></v-table>
     <v-pager @page="callPage" :total="totalrecords"></v-pager>
-    <el-dialog :visible.sync="dialogFormVisible">
-      <el-form :model="form" label-width="140px">
-        <el-form-item label="职位名称">
-          <el-input v-model="form.name" autocomplete="off"></el-input>
+    <el-dialog :visible.sync="dialogFormVisible" width="600px" :before-close="close">
+      <el-form :model="form" ref="form" label-width="140px" label-position="left">
+        <el-form-item label="流程名称" prop="processName" :rules="{
+            required: true, message: '问题不能为空', trigger: 'blur'
+          }">
+          <el-input v-model.trim="form.processName" v-if="state!=2" autocomplete="off"></el-input>
+          <div v-else>{{form.processName}}</div>
         </el-form-item>
-        <el-form-item label="职位描述">
-          <el-input type="textarea" :rows="4" resize="none" placeholder="请输入内容" v-model="form.textarea"></el-input>
+        <el-form-item
+          v-for="(item, index) in form.questionList"
+          :label="'面试问题' + (index + 1)"
+          :key="index"
+          :prop="'questionList.' + index + '.questionName'"
+          :rules="{
+            required: true, message: '问题不能为空', trigger: 'blur'
+          }"
+        >
+          <div v-if="state!=2">
+            <div class="flex">
+              <el-input v-model.trim="item.questionName"></el-input>
+              <el-button type="danger" @click.prevent="index === 0 || removeDomain(item)">删除</el-button>
+            </div>
+            <el-select
+              v-model="item.videoIdList"
+              multiple
+              filterable
+              :disabled="state === 2"
+              default-first-option
+              placeholder="请选择面试视频">
+              <el-option
+                v-for="item in downList"
+                :key="item.key || item.id"
+                :label="item.videoName"
+                :value="item.id">
+              </el-option>
+            </el-select>
+          </div>
+          <div v-else>
+            <div>
+              {{item.questionName}}
+            </div>
+            <video v-if="item.videoIdList && item.videoIdList.length" :src="downList.find(i => i.id === item.videoIdList[0]).videoPath" controls></video>
+            <div class="flex">
+               <div v-for="(i, j) in item.videoIdList" :key="j" @click="active = index" class="active===index ? 'is-active' : ''">{{downList.find(k => k.id === i).videoName}}</div>
+            </div>
+          </div>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="dialogFormVisible = false">取 消</el-button>
-        <el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>
+        <el-button @click="close">取 消</el-button>
+        <el-button @click="addDomain" type="success">新增</el-button>
+        <el-button type="primary" v-if="state!==2" @click="determine">确 定</el-button>
       </div>
     </el-dialog>
   </div>
@@ -39,50 +82,205 @@ export default {
     return {
       tableList: [],
       dialogFormVisible: false,
-      form: {},
       page: 1,
-      sortRule: {},
       totalrecords: 0,
+      form: {
+        questionList: [
+          { key: 1 }
+        ]
+      },
+      state: 0,
+      active: 0,
+      downList: [],
       pickList: [],
-      list: [
-      ],
+      list: [],
+      delId: [],
       btn: [
         {
-          name: '添加新面试流程',
+          name: '添加',
           type: 'success',
-          method: ''
+          method: 'add'
         }
       ],
       table: {
         column: [
           {
             label: '编号',
-            props: ''
+            props: 'id'
           },
           {
             label: '流程名称',
-            props: ''
+            props: 'processName'
           }
         ],
         handle: [
           {
             title: '查看',
-            method: '',
+            method: 'details',
             type: 'info'
           },
           {
             title: '编辑',
-            method: '',
-            type: 'info'
+            method: 'editor',
+            type: 'warning'
           },
           {
             title: '删除',
-            method: '',
-            type: 'info'
+            method: 'del',
+            type: 'danger'
           }
         ]
       }
     }
+  },
+  created () {
+    this.queryData()
+    this.queryDownList()
+  },
+  methods: {
+    queryData (form = {}) {
+      let page = this.page
+      let reqdata = form
+      this.$api
+        .post('/process/queryProcessList', {
+          reqdata,
+          page
+        })
+        .then((res) => {
+          this.totalrecords = res.totalrecords
+          this.tableList = res.list
+        })
+    },
+    queryDownList () {
+      this.$api
+        .post('/video/queryVideoList', {
+          reqdata: {}
+        })
+        .then((res) => {
+          this.downList = res.list
+        })
+    },
+    add () {
+      this.open()
+      this.info = {}
+      this.state = 0
+    },
+    getDetails (row) {
+      let reqdata = { id: row.id }
+      this.$api
+        .post('/process/queryProcessDetail', {
+          reqdata
+        })
+        .then((res) => {
+          this.open()
+          this.form = res.object
+        })
+    },
+    details (row) {
+      this.getDetails(row)
+      this.state = 2
+    },
+    editor (row) {
+      this.getDetails(row)
+      this.state = 1
+    },
+    del (row) {
+      this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let reqdata = { id: row.id }
+        this.$api
+          .post('/process/deleteProcess', {
+            reqdata
+          })
+          .then((res) => {
+            this.$message({
+              message: '删除成功',
+              type: 'success'
+            })
+            this.queryData()
+          })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        })
+      })
+    },
+    determine () {
+      let a
+      this.$refs['form'].validate((valid) => {
+        a = valid
+      })
+      if (!a) return
+      let url = this.state ? '/process/updateProcess' : '/process/saveProcess'
+      let reqdata = JSON.parse(JSON.stringify(this.form))
+      if (this.state) {
+        reqdata.questionList.map(item => {
+          item.questionId = item.id
+          return item
+        })
+        this.delId.forEach(item => {
+          reqdata.questionList.push({ questionId: item })
+        })
+      }
+      this.$api
+        .post(url, {
+          reqdata
+        })
+        .then((res) => {
+          this.close()
+          this.queryData()
+          this.delId = []
+        })
+    },
+    removeDomain (item) {
+      var index = this.form.questionList.indexOf(item)
+      if (index !== -1) {
+        this.delId.push(this.form.questionList[index].id)
+        this.form.questionList.splice(index, 1)
+      }
+    },
+    open () {
+      this.dialogFormVisible = true
+    },
+    close () {
+      this.form = {
+        questionList: []
+      }
+      this.dialogFormVisible = false
+    },
+    addDomain () {
+      this.form.questionList.push({
+        key: Date.now()
+      })
+    },
+    callPage (val) {
+      this.page = val
+      this.queryData()
+    }
   }
 }
 </script>
+
+<style lang="scss" scoped>
+.dialog-footer {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+.flex {
+  margin-bottom: 5px;
+  display: flex;
+  > div {
+    cursor: pointer;
+    color: rgb(42, 117, 216);
+    // margin: 10px;
+  }
+  .is-active {
+    color: #000;
+  }
+}
+</style>

+ 116 - 7
src/views/companyManage/sceneManage.vue

@@ -4,19 +4,23 @@
  * @Autor: XuTongZhang
  * @Date: 2020-07-28 16:12:21
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-07-29 09:58:00
+ * @LastEditTime: 2020-07-30 15:24:00
 -->
 <template>
   <div class="indexPage">
+    <v-input :btn="btn" :list="list" @add="add"></v-input>
     <v-table
       :table="table"
       :tableList="tableList"
       :sortType="true"
       :queryData="queryData"
+      @details="details"
+      @editor="editor"
+      @del="del"
     ></v-table>
     <v-pager @page="callPage" :total="totalrecords"></v-pager>
-    <el-dialog :visible.sync="dialogFormVisible">
-      <el-form :model="form" label-width="140px">
+    <el-dialog :visible.sync="dialogFormVisible" :before-close="close">
+      <el-form :model="form" label-width="140px" label-position="left">
         <el-form-item label="场景名称">
           <el-input v-model="form.name" autocomplete="off"></el-input>
         </el-form-item>
@@ -25,8 +29,8 @@
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="dialogFormVisible = false">取 消</el-button>
-        <el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>
+        <el-button @click="close">取 消</el-button>
+        <el-button type="primary" v-if="state!==2" @click="determine">确 定</el-button>
       </div>
     </el-dialog>
   </div>
@@ -38,11 +42,20 @@ export default {
     return {
       tableList: [],
       dialogFormVisible: false,
-      form: {},
       page: 1,
-      sortRule: {},
       totalrecords: 0,
+      form: {},
+      state: 0,
       pickList: [],
+      list: [
+      ],
+      btn: [
+        {
+          name: '添加',
+          type: 'success',
+          method: 'add'
+        }
+      ],
       table: {
         column: [
           {
@@ -59,9 +72,105 @@ export default {
           }
         ],
         handle: [
+          {
+            title: '查看',
+            method: 'details',
+            type: 'info'
+          },
+          {
+            title: '编辑',
+            method: 'editor',
+            type: 'warning'
+          },
+          {
+            title: '删除',
+            method: 'del',
+            type: 'danger'
+          }
         ]
       }
     }
+  },
+  created () {
+    this.queryData()
+  },
+  methods: {
+    queryData (form = {}) {
+      let page = this.page
+      let reqdata = form
+      this.$api
+        .post('/video/queryVideoList', {
+          reqdata,
+          page
+        })
+        .then((res) => {
+          this.totalrecords = res.totalrecords
+          this.tableList = res.list
+        })
+    },
+    add () {
+      this.open()
+      this.info = {}
+      this.state = 0
+    },
+    getDetails (row) {
+      let reqdata = { id: row.id }
+      this.$api
+        .post('/video/queryVideoDetail', {
+          reqdata
+        })
+        .then((res) => {
+          this.open()
+          this.info = res.obj
+        })
+    },
+    details () {
+      this.getDetails()
+      this.state = 1
+    },
+    editor () {
+      this.getDetails()
+      this.state = 2
+    },
+    del () {
+      let reqdata = {}
+      this.$api
+        .post('', {
+          reqdata
+        })
+        .then((res) => {
+          this.queryData()
+        })
+    },
+    determine () {
+      let url = this.state ? '/video/updateVideo' : '/video/saveVideo'
+      let reqdata = {}
+      this.$api
+        .post(url, {
+          reqdata
+        })
+        .then((res) => {
+          this.queryData()
+        })
+    },
+    open () {
+      this.dialogFormVisible = true
+    },
+    close () {
+      this.dialogFormVisible = false
+    },
+    callPage (val) {
+      this.page = val
+      this.queryData()
+    }
   }
 }
 </script>
+
+<style lang="scss" scoped>
+  .dialog-footer {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+</style>

+ 157 - 16
src/views/companyManage/templateManage.vue

@@ -4,18 +4,71 @@
  * @Autor: XuTongZhang
  * @Date: 2020-07-28 16:28:13
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-07-28 17:53:26
+ * @LastEditTime: 2020-07-30 16:11:47
 -->
 <template>
   <div class="indexPage">
-    <v-input :btn="btn" :list="list"></v-input>
+    <v-input :btn="btn" :list="list" @add="add"></v-input>
     <v-table
       :table="table"
       :tableList="tableList"
       :sortType="true"
       :queryData="queryData"
+      @details="details"
+      @editor="editor"
+      @del="del"
     ></v-table>
     <v-pager @page="callPage" :total="totalrecords"></v-pager>
+    <el-dialog :visible.sync="dialogFormVisible" :before-close="close">
+      <el-form :model="form" label-width="140px" :rules="rules" label-position="left">
+        <el-form-item label="模板名称">
+          <el-input v-model="form.name" autocomplete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="模板内容">
+          <el-input
+            type="textarea"
+            :rows="4"
+            resize="none"
+            placeholder="请输入内容"
+            v-model="form.textarea"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="关联场景">
+          <el-select v-model="form.value1" placeholder="请选择">
+            <el-option
+              v-for="item in options1"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="关联流程">
+          <el-select v-model="form.value2" placeholder="请选择">
+            <el-option
+              v-for="item in options2"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="关联表单">
+          <el-select v-model="form.value3" placeholder="请选择">
+            <el-option
+              v-for="item in options3"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="close">取 消</el-button>
+        <el-button type="primary" v-if="state!==2" @click="determine">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -25,51 +78,56 @@ export default {
     return {
       tableList: [],
       page: 1,
-      sortRule: {},
       totalrecords: 0,
+      dialogFormVisible: false,
+      state: 0,
+      form: {},
       pickList: [],
-      list: [
-      ],
+      options1: [],
+      options2: [],
+      options3: [],
+      rules: {},
+      list: [],
       btn: [
         {
-          name: '添加新视频',
+          name: '添加',
           type: 'success',
-          method: ''
+          method: 'add'
         }
       ],
       table: {
         column: [
           {
             label: '编号',
-            props: ''
+            props: 'id'
           },
           {
-            label: '视频名称',
-            props: ''
+            label: '模板名称',
+            props: 'templateName'
           },
           {
             label: '关联场景',
-            props: ''
+            props: 'sceneId'
           },
           {
             label: '关联流程',
-            props: ''
+            props: 'processId'
           },
           {
             label: '关联表单',
-            props: ''
+            props: 'formId'
           }
         ],
         handle: [
           {
             title: '查看',
-            method: '',
+            method: 'details',
             type: 'info'
           },
           {
             title: '删除',
-            method: '',
-            type: 'info'
+            method: 'del',
+            type: 'danger'
           },
           {
             title: '二维码',
@@ -79,6 +137,89 @@ export default {
         ]
       }
     }
+  },
+  created () {
+    this.queryData()
+  },
+  methods: {
+    queryData (form = {}) {
+      let page = this.page
+      let reqdata = form
+      this.$api
+        .post('/template/queryTemplateList', {
+          reqdata,
+          page
+        })
+        .then((res) => {
+          this.totalrecords = res.totalrecords
+          this.tableList = res.list
+        })
+    },
+    add () {
+      this.open()
+      this.form = {}
+      this.state = 0
+    },
+    getDetails (row) {
+      let reqdata = { id: row.id }
+      this.$api
+        .post('/template/queryTemplateDetail', {
+          reqdata
+        })
+        .then((res) => {
+          this.open()
+          this.form = res.object
+        })
+    },
+    details () {
+      this.getDetails()
+      this.state = 1
+    },
+    editor () {
+      this.getDetails()
+      this.state = 2
+    },
+    del () {
+      let reqdata = {}
+      this.$api
+        .post('/template/deleteTemplate', {
+          reqdata
+        })
+        .then((res) => {
+          this.queryData()
+        })
+    },
+    determine () {
+      let url = this.state
+        ? '/template/updateTemplate'
+        : '/template/saveTemplate'
+      let reqdata = {}
+      this.$api
+        .post(url, {
+          reqdata
+        })
+        .then((res) => {
+          this.queryData()
+        })
+    },
+    open () {
+      this.dialogFormVisible = true
+    },
+    close () {
+      this.dialogFormVisible = false
+    },
+    callPage (val) {
+      this.page = val
+      this.queryData()
+    }
   }
 }
 </script>
+
+<style lang="scss" scoped>
+.dialog-footer {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+</style>

+ 150 - 12
src/views/companyManage/videoManage.vue

@@ -4,18 +4,48 @@
  * @Autor: XuTongZhang
  * @Date: 2020-07-28 16:06:20
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-07-28 16:14:54
+ * @LastEditTime: 2020-07-30 15:55:17
 -->
 <template>
   <div class="indexPage">
-    <v-input :btn="btn" :list="list"></v-input>
+    <v-input :btn="btn" :list="list" @add="add"></v-input>
     <v-table
       :table="table"
       :tableList="tableList"
       :sortType="true"
       :queryData="queryData"
+      @details="details"
+      @editor="editor"
+      @del="del"
     ></v-table>
     <v-pager @page="callPage" :total="totalrecords"></v-pager>
+    <el-dialog width="750px" :visible.sync="dialogFormVisible" :before-close="close">
+      <el-form :model="form" label-width="140px" label-position="left">
+        <el-form-item label="视频名称">
+          <el-input v-model="form.videoName" autocomplete="off"></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-upload
+            class="upload-demo"
+            drag
+            :action="$url+'/upload/uploadVideo'"
+            accept=".MP4,.mp4"
+            :show-file-list="false"
+            :on-success="handleAvatarSuccess"
+            :before-upload="beforeAvatarUpload"
+            multiple>
+            <video v-if="url" :src="$img+url" class="avatar"></video>
+            <i class="el-icon-upload"></i>
+            <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em>,限mp4格式</div>
+            <!-- <div class="el-upload__tip" slot="tip"></div> -->
+          </el-upload>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="close">取 消</el-button>
+        <el-button type="primary" v-if="state!==2" @click="determine">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -24,49 +54,157 @@ export default {
   data () {
     return {
       tableList: [],
+      dialogFormVisible: false,
+      form: {},
       page: 1,
-      sortRule: {},
       totalrecords: 0,
+      state: 0,
+      url: '',
       pickList: [],
       list: [
       ],
       btn: [
         {
-          name: '添加新视频',
+          name: '添加',
           type: 'success',
-          method: ''
+          method: 'add'
         }
       ],
       table: {
         column: [
           {
             label: '编号',
-            props: ''
+            props: 'id'
           },
           {
             label: '视频名称',
-            props: ''
+            props: 'videoName'
           }
         ],
         handle: [
           {
             title: '查看',
-            method: '',
+            method: 'details',
             type: 'info'
           },
           {
             title: '编辑',
-            method: '',
-            type: 'info'
+            method: 'editor',
+            type: 'warning'
           },
           {
             title: '删除',
-            method: '',
-            type: 'info'
+            method: 'del',
+            type: 'danger'
           }
         ]
       }
     }
+  },
+  created () {
+    this.queryData()
+  },
+  methods: {
+    queryData (form = {}) {
+      let page = this.page
+      let reqdata = form
+      this.$api
+        .post('/video/queryVideoList', {
+          reqdata,
+          page
+        })
+        .then((res) => {
+          this.totalrecords = res.totalrecords
+          this.tableList = res.list
+        })
+    },
+    add () {
+      this.open()
+      this.info = {}
+      this.state = 0
+    },
+    getDetails (row) {
+      console.log(row)
+      let reqdata = { id: row.id }
+      this.$api
+        .post('/video/queryVideoDetail', {
+          reqdata
+        })
+        .then((res) => {
+          this.open()
+          this.form = res.object
+        })
+    },
+    details (row) {
+      this.getDetails(row)
+      this.state = 1
+    },
+    editor (row) {
+      this.getDetails(row)
+      this.state = 2
+    },
+    del (row) {
+      let reqdata = { id: row.id }
+      this.$api
+        .post('/video/deleteVideo', {
+          reqdata
+        })
+        .then((res) => {
+          this.queryData()
+        })
+    },
+    determine () {
+      let url = this.state ? '/video/updateVideo' : '/video/saveVideo'
+      let reqdata = this.form
+      this.$api
+        .post(url, {
+          reqdata
+        })
+        .then((res) => {
+          this.close()
+          this.queryData()
+        })
+    },
+    handleAvatarSuccess (res, file) {
+      this.url = res
+      this.form.videoPath = res
+    },
+    beforeAvatarUpload (file) {
+      console.log(file)
+      // const isJPG = true || file.type.includes('image')
+      // const isLt10M = file.size / 1024 / 1024 < 10
+      // if (!isJPG) {
+      //   this.$message.error('上传文件只能是图片!')
+      // }
+      // if (!isLt10M) {
+      //   this.$message.error('上传图片大小不能超过 10MB!')
+      // }
+      // return isLt10M && isJPG
+      return file.type === 'video/mp4'
+    },
+    open () {
+      this.dialogFormVisible = true
+    },
+    close () {
+      this.form = {}
+      this.dialogFormVisible = false
+    },
+    callPage (val) {
+      this.page = val
+      this.queryData()
+    }
   }
 }
 </script>
+
+<style lang="scss" scoped>
+  .dialog-footer {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+  .avatar {
+    width: 100%;
+    display: block;
+  }
+</style>

+ 3 - 45
vue.config.js

@@ -1,8 +1,8 @@
 /*
  * @Author       : yuanrunwei
  * @Date         : 2020-06-10 15:38:47
- * @LastEditors  : yuanrunwei
- * @LastEditTime : 2020-06-11 10:20:55
+ * @LastEditors: XuTongZhang
+ * @LastEditTime: 2020-07-29 10:45:35
  * @FilePath     : \batterycloud-admin\vue.config.js
  */
 module.exports = {
@@ -13,48 +13,6 @@ module.exports = {
   devServer: {
     host: '127.0.0.1',
     https: false,
-    open: true,
-    proxy: {
-      '/sys': {
-        target: 'http://47.100.59.52:7782/sys',
-        wx: true,
-        changeOrigin: true,
-        pathRewrite: {
-          '^/sys': ''
-        }
-      },
-      '/platform': {
-        target: 'http://47.100.59.52:7782/platform',
-        wx: true,
-        changeOrigin: true,
-        pathRewrite: {
-          '^/platform': ''
-        }
-      },
-      'http://47.100.59.52:7782/platform': {
-        target: 'http://47.100.59.52:7782/platform',
-        wx: true,
-        changeOrigin: true,
-        pathRewrite: {
-          '^/http://47.100.59.52:7782/platform': ''
-        }
-      },
-      '/dict': {
-        target: 'http://47.100.59.52:7782/dict',
-        wx: true,
-        changeOrigin: true,
-        pathRewrite: {
-          '^/dict': ''
-        }
-      },
-      '/addr': {
-        target: 'http://47.100.59.52:7782/addr',
-        wx: true,
-        changeOrigin: true,
-        pathRewrite: {
-          '^/addr': ''
-        }
-      }
-    }
+    open: true
   }
 }