xtz 4 年之前
父節點
當前提交
0b7e64faba
共有 2 個文件被更改,包括 146 次插入109 次删除
  1. 75 82
      src/views/candidateManage/statistics.vue
  2. 71 27
      src/views/companyManage/passwordSettings.vue

+ 75 - 82
src/views/candidateManage/statistics.vue

@@ -8,23 +8,27 @@
 -->
 <template>
 <div>
-    <div class="flex">
-        <div ref="mychart1" :style="{width: '75%', height: '500px'}"></div>
-        <div class="flex1">
-            <div>
-                <div class="num">校招投递简历总数 {{schoolTotal||0}}条</div>
-                <div class="num">社招投递简历总数 {{clubTotal||0}}条</div>
-            </div>
-            <div>
-                <div class="title">本周</div>
-                <div class="num">校招投递简历数 {{schoolWeek||0}}条</div>
-                <div class="num">社招投递简历数 {{clubWeek||0}}条</div>
+    <el-card class="box-card">
+        <div class="flex">
+            <div ref="mychart1" :style="{width: '75%', height: '500px'}"></div>
+            <div class="flex1">
+                <div>
+                    <div class="num">校招投递简历总数 {{schoolTotal||0}}条</div>
+                    <div class="num">社招投递简历总数 {{clubTotal||0}}条</div>
+                </div>
+                <div>
+                    <div class="title">本周</div>
+                    <div class="num">校招投递简历数 {{schoolWeek||0}}条</div>
+                    <div class="num">社招投递简历数 {{clubWeek||0}}条</div>
+                </div>
             </div>
         </div>
-    </div>
-    <div class="flex">
-        <div ref="mychart2" :style="{width: '100%', height: '600px', marginTop: '30px'}"></div>
-    </div>
+    </el-card>
+    <el-card class="box-card">
+        <div class="flex">
+            <div ref="mychart2" :style="{width: '100%', height: '600px', marginTop: '30px'}"></div>
+        </div>
+    </el-card>
     <el-table :data="resumeTable" border style="width: 100%">
         <el-table-column prop="name" label="渠道名称">
         </el-table-column>
@@ -50,20 +54,9 @@
         </el-table-column>
     </el-table>
     <div class="title">简历状态统计</div>
-    <el-table :data="tableData" border style="width: 100%">
-        <el-table-column prop="address" label="职位">
-        </el-table-column>
-        <el-table-column prop="0" label="51job">
-        </el-table-column>
-        <el-table-column prop="1" label="智联">
-        </el-table-column>
-        <el-table-column prop="2" label="58同城">
-        </el-table-column>
-        <el-table-column prop="3" label="平台">
-        </el-table-column>
-    </el-table>
-    <div class="title">简历投递职位统计</div>
-    <div ref="mychart3" :style="{width: '100%', height: '600px', marginTop: '30px'}"></div>
+    <el-card class="box-card">
+        <div ref="mychart3" :style="{width: '100%', height: '600px', marginTop: '30px'}"></div>
+    </el-card>
     <el-table :data="interviewTable" border style="width: 100%">
         <el-table-column prop="name" label="渠道名称">
         </el-table-column>
@@ -88,20 +81,7 @@
             </template>
         </el-table-column>
     </el-table>
-    <div class="title">简历状态统计</div>
-    <el-table :data="tableData" border style="width: 100%">
-        <el-table-column prop="address" label="职位">
-        </el-table-column>
-        <el-table-column prop="date" label="51job">
-        </el-table-column>
-        <el-table-column prop="date" label="智联">
-        </el-table-column>
-        <el-table-column prop="name" label="58同城">
-        </el-table-column>
-        <el-table-column prop="address" label="平台">
-        </el-table-column>
-    </el-table>
-    <div class="title">简历投递职位统计</div>
+    <div class="title">面试状态统计</div>
 </div>
 </template>
 
@@ -129,6 +109,7 @@ export default {
     this.queryData()
     this.queryData2()
     this.queryData3()
+    this.getPositionTotal()
   },
   methods: {
     queryData () {
@@ -188,6 +169,14 @@ export default {
           this.initChart3()
         })
     },
+    getPositionTotal () {
+      this.$api
+        .post('/chart/getPositionTotal', {
+          reqdata: {}
+        }).then(res => {
+          this.tableData = res.list
+        })
+    },
     initChart () {
       let myChart = echarts.init(this.$refs.mychart1)
       myChart.setOption({
@@ -289,7 +278,7 @@ export default {
         position: 'insideBottom',
         distance: 15,
         onChange: function () {
-          var labelOption = {
+          let labelOption = {
             normal: {
               rotate: app.config.rotate,
               align: app.config.align,
@@ -312,21 +301,21 @@ export default {
         }
       }
 
-      let labelOption = {
-        show: true,
-        position: app.config.position,
-        distance: app.config.distance,
-        align: app.config.align,
-        verticalAlign: app.config.verticalAlign,
-        rotate: app.config.rotate,
-        formatter: '{c}  {name|{a}}',
-        fontSize: 16,
-        rich: {
-          name: {
-            textBorderColor: '#fff'
-          }
-        }
-      }
+      // let labelOption = {
+      //     show: true,
+      //     position: app.config.position,
+      //     distance: app.config.distance,
+      //     align: app.config.align,
+      //     verticalAlign: app.config.verticalAlign,
+      //     rotate: app.config.rotate,
+      //     formatter: '{c}  {name|{a}}',
+      //     fontSize: 16,
+      //     rich: {
+      //         name: {
+      //             textBorderColor: '#fff'
+      //         }
+      //     }
+      // }
 
       let option = {
         title: {
@@ -381,25 +370,25 @@ export default {
           name: '已收到',
           type: 'bar',
           barGap: 0,
-          label: labelOption,
+          // label: labelOption,
           data: [this.resumeList[0]['0'] || 0, this.resumeList[1]['0'] || 0, this.resumeList[2]['0'] || 0, this.resumeList[3]['0'] || 0]
         },
         {
           name: '已通过',
           type: 'bar',
-          label: labelOption,
+          // label: labelOption,
           data: [this.resumeList[0]['1'] || 0, this.resumeList[1]['1'] || 0, this.resumeList[2]['1'] || 0, this.resumeList[3]['1'] || 0]
         },
         {
           name: '已淘汰',
           type: 'bar',
-          label: labelOption,
+          // label: labelOption,
           data: [this.resumeList[0]['2'] || 0, this.resumeList[1]['2'] || 0, this.resumeList[2]['2'] || 0, this.resumeList[3]['2'] || 0]
         },
         {
           name: '待定',
           type: 'bar',
-          label: labelOption,
+          // label: labelOption,
           data: [this.resumeList[0]['3'] || 0, this.resumeList[1]['3'] || 0, this.resumeList[2]['3'] || 0, this.resumeList[3]['3'] || 0]
         }
         ]
@@ -483,21 +472,21 @@ export default {
         }
       }
 
-      let labelOption = {
-        show: true,
-        position: app.config.position,
-        distance: app.config.distance,
-        align: app.config.align,
-        verticalAlign: app.config.verticalAlign,
-        rotate: app.config.rotate,
-        formatter: '{c}  {name|{a}}',
-        fontSize: 16,
-        rich: {
-          name: {
-            textBorderColor: '#fff'
-          }
-        }
-      }
+      // let labelOption = {
+      //   show: true,
+      //   position: app.config.position,
+      //   distance: app.config.distance,
+      //   align: app.config.align,
+      //   verticalAlign: app.config.verticalAlign,
+      //   rotate: app.config.rotate,
+      //   formatter: '{c}  {name|{a}}',
+      //   fontSize: 16,
+      //   rich: {
+      //     name: {
+      //       textBorderColor: '#fff'
+      //     }
+      //   }
+      // }
 
       let {
         interviewList
@@ -556,25 +545,25 @@ export default {
           name: '已通知',
           type: 'bar',
           barGap: 0,
-          label: labelOption,
+          // label: labelOption,
           data: [interviewList[0]['0'] || 0, interviewList[1]['0'] || 0, interviewList[2]['0'] || 0, interviewList[3]['0'] || 0]
         },
         {
           name: '已通过',
           type: 'bar',
-          label: labelOption,
+          // label: labelOption,
           data: [interviewList[0]['1'] || 0, interviewList[1]['1'] || 0, interviewList[2]['1'] || 0, interviewList[3]['1'] || 0]
         },
         {
           name: '已淘汰',
           type: 'bar',
-          label: labelOption,
+          // label: labelOption,
           data: [interviewList[0]['2'] || 0, interviewList[1]['2'] || 0, interviewList[2]['2'] || 0, interviewList[3]['2'] || 0]
         },
         {
           name: '待定',
           type: 'bar',
-          label: labelOption,
+          // label: labelOption,
           data: [interviewList[0]['3'] || 0, interviewList[1]['3'] || 0, interviewList[2]['3'] || 0, interviewList[3]['3'] || 0]
         }
         ]
@@ -613,4 +602,8 @@ export default {
     margin: 20px;
     font-size: 14px;
 }
+
+.box-card {
+    margin: 10px;
+}
 </style>

+ 71 - 27
src/views/companyManage/passwordSettings.vue

@@ -7,32 +7,76 @@
  * @LastEditTime: 2020-07-31 16:09:08
 -->
 <template>
-  <div class="passwordSettings">
+<div class="passwordSettings">
     <el-card class="box-card">
-      <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>
-        <el-form-item label="输入新密码">
-          <el-input v-model.trim="form.name"></el-input>
-        </el-form-item>
-        <el-form-item label="确认新密码">
-          <el-input v-model.trim="form.name"></el-input>
-        </el-form-item>
-        <el-form-item class="button-grounp">
-          <el-button type="primary">确认修改</el-button>
-        </el-form-item>
-      </el-form>
+        <el-form ref="form" :model="form" :rules="rules" label-width="140px" label-position="left">
+            <el-form-item label="输入旧密码" prop="oldPassword">
+                <el-input v-model.trim="form.oldPassword" show-password></el-input>
+            </el-form-item>
+            <el-form-item label="输入新密码" prop="newPassword">
+                <el-input v-model.trim="form.newPassword" show-password></el-input>
+            </el-form-item>
+            <el-form-item label="确认新密码" prop="confirmPassword">
+                <el-input v-model.trim="form.confirmPassword" show-password></el-input>
+            </el-form-item>
+            <el-form-item class="button-grounp">
+                <el-button type="primary" @click="update">确认修改</el-button>
+            </el-form-item>
+        </el-form>
     </el-card>
-  </div>
+</div>
 </template>
 
 <script>
 export default {
   data () {
+    let update = () => {
+      let reqdata = {
+        companyName: localStorage.getItem('companyName'),
+        oldPassword: this.form.oldPassword,
+        newPassword: this.form.newPassword
+      }
+      this.$api
+        .post('/companyInfo/changePassword', {
+          reqdata
+        })
+        .then((res) => {
+          this.$message({
+            type: 'success',
+            message: '修改成功!'
+          })
+        })
+    }
+    let validator = (rule, value, callback) => {
+      if (value === '') {
+        callback(new Error('请再次输入新密码'))
+      } else {
+        if (value !== this.form.newPassword) {
+          callback(new Error('密码输入不一致,请重新输入'))
+        }
+        callback()
+      }
+    }
     return {
       form: {},
-      rules: {}
+      rules: {
+        oldPassword: [{
+          required: true,
+          message: '请输入旧密码',
+          trigger: 'blur'
+        }],
+        newPassword: [{
+          required: true,
+          message: '请输入新密码',
+          trigger: 'blur'
+        }],
+        confirmPassword: [{
+          required: true,
+          validator,
+          trigger: 'blur'
+        }]
+      },
+      update
     }
   }
 }
@@ -40,24 +84,24 @@ export default {
 
 <style lang="scss" scoped>
 .passwordSettings {
-  display: flex;
-  justify-content: center;
-  align-content: center;
+    display: flex;
+    justify-content: center;
+    align-content: center;
 }
+
 .box-card {
-  width: 800rpx;
-  padding: 18px 0;
+    width: 800rpx;
+    padding: 18px 0;
 }
+
 .button-grounp {
     display: flex;
     justify-content: flex-end;
 }
-</style>
-
-<style lang="scss">
+</style><style lang="scss">
 .passwordSettings {
-    .el-input__inner{
-      width: 400px!important;
+    .el-input__inner {
+        width: 400px !important;
     }
 }
 </style>