lrf402788946 4 年之前
父節點
當前提交
9602203b56

+ 2 - 13
src/views/userCenter/userScore/detail.vue

@@ -6,7 +6,7 @@
           <el-button type="primary" size="mini" @click="back">返回</el-button>
         </el-col>
         <el-col :span="24" class="down">
-          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @view="toView" @expertView="toExpertView"></data-table>
+          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @view="toView"></data-table>
         </el-col>
       </el-col>
     </el-row>
@@ -37,13 +37,6 @@ export default {
           label: '意见查看',
           method: 'view',
         },
-        {
-          label: '专家意见查看',
-          method: 'expertView',
-          display: item => {
-            return item.status == '-2' ? true : false;
-          },
-        },
       ],
       fields: [
         { label: '审核类型', prop: 'step', showTip: true },
@@ -82,7 +75,7 @@ export default {
     ...verifyRecord(['query']),
     // 查询列表
     async search({ skip = 0, limit = 10, ...info } = {}) {
-      const res = await this.query({ skip, limit, apply_id: this.id, ...info });
+      const res = await this.query({ skip, limit, apply_id: this.id, ...info, step: '评分' });
       if (this.$checkRes(res)) {
         this.$set(this, 'list', res.data);
         this.$set(this, `total`, res.total);
@@ -98,10 +91,6 @@ export default {
       this.form = {};
       this.dialog = false;
     },
-    // 专家意见查看
-    toExpertView({ data }) {
-      this.$router.push({ path: '/userScore/expertOpinion', query: { id: data.apply_id } });
-    },
     // 返回
     back() {
       this.$router.push({ path: '/noExpertScore' });

+ 76 - 13
src/views/userCenter/userScore/expertOpinion.vue

@@ -2,37 +2,100 @@
   <div id="expertOpinion">
     <el-row>
       <el-col :span="24" class="main">
-        test
+        <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @view="toView"></data-table>
       </el-col>
     </el-row>
+    <el-dialog class="dialog" title="意见详情" center width="40%" :visible.sync="dialog" @closed="handleClose" :destroy-on-close="true">
+      <el-col :span="24" class="one">
+        <el-col :span="24" class="info">
+          {{ form.content }}
+        </el-col>
+      </el-col>
+    </el-dialog>
   </div>
 </template>
 
 <script>
+import dataTable from '@common/src/components/frame/filter-page-table.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: achieveExpert } = createNamespacedHelpers('achieveExpert');
 export default {
   name: 'expertOpinion',
   props: {},
-  components: {},
+  components: { dataTable },
   data: function() {
-    return {};
+    return {
+      list: [],
+      total: 0,
+      opera: [
+        {
+          label: '意见详情',
+          method: 'view',
+          display: i => i.verify && i.verify.content,
+        },
+      ],
+      fields: [
+        { label: '专家姓名', prop: 'expert_name', showTip: true },
+        { label: '专家电话', prop: 'phone', showTip: true },
+        { label: '专家评分', prop: 'verify.score', showTip: true },
+      ],
+      dialog: false,
+      form: {},
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...achieveExpert(['query']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      const res = await this.query({ skip, limit, ...info, apply_id: this.id });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    toView({ data }) {
+      this.$set(this, `form`, data.verify);
+      this.dialog = true;
+    },
+    // 取消查看
+    handleClose() {
+      this.form = {};
+      this.dialog = false;
+    },
   },
-  created() {},
-  methods: {},
+
   computed: {
     ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
+    },
   },
   metaInfo() {
     return { title: this.$route.meta.title };
   },
-  watch: {
-    test: {
-      deep: true,
-      immediate: true,
-      handler(val) {},
-    },
-  },
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.dialog {
+  /deep/.el-dialog__body {
+    min-height: 330px;
+    padding: 0px 0px 10px 20px;
+  }
+  .one {
+    .text {
+      font-size: 18px;
+      font-weight: bold;
+      margin: 0 0 5px 0;
+    }
+    .info {
+      font-size: 16px;
+      height: 325px;
+      overflow-y: auto;
+      line-height: 30px;
+    }
+  }
+}
+</style>

+ 18 - 1
src/views/userCenter/userScore/noExpertScore.vue

@@ -3,7 +3,17 @@
     <el-row>
       <el-col :span="24" class="main">
         <el-col :span="24" class="down">
-          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @view="toView" @edit="toEdit"></data-table>
+          <data-table
+            :fields="fields"
+            :opera="opera"
+            :data="list"
+            :total="total"
+            @query="search"
+            @view="toView"
+            @edit="toEdit"
+            @expert="toExpert"
+            :operaWidth="350"
+          ></data-table>
         </el-col>
       </el-col>
     </el-row>
@@ -25,6 +35,10 @@ export default {
           label: '评分意见查看',
           method: 'view',
         },
+        {
+          label: '专家意见查看',
+          method: 'expert',
+        },
         {
           label: '申请书修改',
           method: 'edit',
@@ -67,6 +81,9 @@ export default {
     toEdit({ data }) {
       this.$router.push({ path: '/userScore/update', query: { id: data.id } });
     },
+    toExpert({ data }) {
+      this.$router.push({ path: '/userScore/expertOpinion', query: { id: data._id } });
+    },
   },
   computed: {
     ...mapState(['user']),