Pārlūkot izejas kodu

修改教师审核

lrf402788946 5 gadi atpakaļ
vecāks
revīzija
8ab51a2b14
4 mainītis faili ar 85 papildinājumiem un 22 dzēšanām
  1. 2 0
      package.json
  2. 3 7
      src/views/teacher/index.vue
  3. 27 7
      src/views/teacher/verify.vue
  4. 53 8
      src/views/test/detail.vue

+ 2 - 0
package.json

@@ -12,12 +12,14 @@
     "@fullcalendar/daygrid": "^4.3.0",
     "@fullcalendar/interaction": "^4.3.0",
     "@fullcalendar/vue": "^4.3.1",
+    "@stomp/stompjs": "^5.4.3",
     "axios": "^0.19.1",
     "core-js": "^3.4.4",
     "element-ui": "^2.13.0",
     "jsonwebtoken": "^8.5.1",
     "lodash": "^4.17.15",
     "naf-core": "^0.1.2",
+    "qrcode": "^1.4.4",
     "vue": "^2.6.10",
     "vue-meta": "^2.3.1",
     "vue-router": "^3.1.3",

+ 3 - 7
src/views/teacher/index.vue

@@ -71,8 +71,8 @@ export default {
           return item === '0' ? '否' : item === '1' ? '是' : '其他';
         },
       },
-      { label: '资料评分', prop: 'file_score', options: { width: `100px` } },
-      { label: '面试评分', prop: 'interview_score', options: { width: `100px` } },
+      { label: '资料评分', prop: 'zlscore', options: { width: `100px` } },
+      { label: '面试评分', prop: 'msscore', options: { width: `100px` } },
 
       {
         label: '状态',
@@ -123,15 +123,11 @@ export default {
       }
     },
     toEdit({ data }) {
-      console.log(`in toEdit`);
-      console.log(data);
       this.$router.push({ path: '/teacher/detail', query: { id: data.id } });
     },
 
     toSelect({ data }) {
-      console.log(`in Select`);
-      console.log(data);
-      this.$router.push({ path: '/teacher/verify', query: { id: data.id, status: data.status } });
+      this.$router.push({ path: '/teacher/verify', query: { id: data.id } });
     },
     async toDelete(data) {
       const res = await this.delete(data.id);

+ 27 - 7
src/views/teacher/verify.vue

@@ -44,11 +44,31 @@
           </el-tabs>
           <el-row type="flex" justify="center" :gutter="20">
             <el-col :span="4">
-              <el-form-item label="资料评分">
-                <el-input type="number" size="small" v-model="info.zlscore" placeholder="请填写资料评分" :min="0" :max="100"></el-input>
+              <el-form-item :label="info.status === '2' ? '资料评分' : '面试评分'">
+                <el-input
+                  v-if="info.status === '2'"
+                  type="number"
+                  size="small"
+                  v-model="info.zlscore"
+                  placeholder="请填写资料评分"
+                  :min="0"
+                  :max="100"
+                ></el-input>
+                <el-input
+                  v-if="info.status === '3'"
+                  type="number"
+                  size="small"
+                  v-model="info.msscore"
+                  placeholder="请填写面试评分"
+                  :min="0"
+                  :max="100"
+                ></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="5"><el-button size="mini" type="primary" plain @click="handleSave">通知面试</el-button></el-col>
+            <el-col :span="5">
+              <el-button v-if="info.status === '2'" size="mini" type="primary" plain @click="handleSave">通知面试</el-button>
+              <el-button v-if="info.status === '3'" size="mini" type="primary" plain @click="handleSave">确认入库</el-button>
+            </el-col>
           </el-row>
         </el-form>
       </el-card>
@@ -75,9 +95,7 @@ export default {
   },
   data: () => ({
     tabs: '1',
-    info: {
-      zlscore: 0,
-    },
+    info: {},
     fields: [{ label: '状态', required: true, model: 'status', custom: true }],
     rules: {},
   }),
@@ -90,9 +108,11 @@ export default {
       this.loading = false;
     },
     async handleSave() {
+      let object = { status: this.info.status * 1 + 1 };
+      this.info.status === '2' ? (object.zlscore = this.info.zlscore || 0) : (object.msscore = this.info.msscore || 0);
       let res;
       let msg;
-      res = await this.update({ status: '3', id: this.id, zlscore: this.info.zlscore || 0 });
+      res = await this.update({ id: this.id, ...object });
       msg = `${this.keyWord}审核成功`;
       if (this.$checkRes(res, msg)) this.$router.push({ path: '/teacher/index' });
     },

+ 53 - 8
src/views/test/detail.vue

@@ -1,22 +1,67 @@
 <template>
-  <div id="detail">
-    <iframe v-if="url" :src="url" frameborder="0" allow="autoplay;encrypted-media" allowfullscreen style="width:100%;height:500px;"> </iframe>
+  <div id="index">
+    <el-row style="padding:10px;height:100vh">
+      <el-col :span="24" class="icon">
+        <el-image :src="question"></el-image>
+      </el-col>
+      <el-col :span="24" style="height:10vh;text-align:center">
+        您确定将您的微信号与本平台账号绑定吗?
+      </el-col>
+      <el-col :span="24" style="height:4rem">
+        <van-button type="info" style="width:100%" round @click="toUpdate()">确定</van-button>
+      </el-col>
+      <el-col :span="24">
+        <van-button plain style="width:100%" round @click="cancel()">取消</van-button>
+      </el-col>
+    </el-row>
   </div>
 </template>
 
 <script>
+import { createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('doctor');
 export default {
-  metaInfo: { title: '' },
-  name: 'detail',
+  metaInfo: { title: '用户绑定' },
+  name: 'index',
   props: {},
   components: {},
   data: () => ({
-    url: undefined,
+    question: '',
   }),
   created() {},
-  computed: {},
-  methods: {},
+  computed: {
+    openid() {
+      return this.$route.query.openid;
+    },
+    doctorid() {
+      return this.$route.query.doctorid;
+    },
+  },
+  methods: {
+    // ...mapActions(['bind']),
+    async toUpdate() {
+      const res = await this.bind({ id: this.doctorid, openid: this.openid });
+      if (res.errcode === 0) {
+        this.$router.push({ path: '/', query: { openid: this.openid } });
+        this.$toast({ type: 'success', message: '绑定成功' });
+      } else {
+        this.$toast({ type: 'fail', message: res.errmsg });
+      }
+    },
+    cancel() {
+      window.history.go(-1);
+    },
+  },
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.icon {
+  height: 30vh;
+  text-align: center;
+}
+.icon .el-image {
+  width: 100px;
+  margin: 40px 0;
+}
+</style>