coys il y a 2 ans
Parent
commit
b8874e8729

+ 12 - 0
src/router/router.config.js

@@ -91,6 +91,12 @@ export let routers = [
     meta: { title: '演练参与人员签名', keepAlive: false }
   },
   {
+    path: '/evaluate/:id',
+    name: 'evaluate',
+    component: () => import('@/views/menu/resumptionEvaluate/evaluate.vue'),
+    meta: { title: '评价', keepAlive: false }
+  },
+  {
     path: '/commentSign/:id',
     name: 'commentSign',
     component: () => import('@/views/menu/rehearsalTask/components/rehearsalTaskSign.vue'),
@@ -155,6 +161,12 @@ export let routers = [
         meta: { title: '监控调阅', keepAlive: false }
       },
       {
+        path: '/resumptionEvaluate',
+        name: 'resumptionEvaluate',
+        component: () => import('@/views/menu/resumptionEvaluate/index'),
+        meta: { title: '外包履职评价', keepAlive: false }
+      },
+      {
         path: '/rehearsalTask',
         name: 'rehearsalTask',
         component: () => import('@/views/menu/rehearsalTask/index'),

+ 100 - 0
src/views/menu/resumptionEvaluate/evaluate.vue

@@ -0,0 +1,100 @@
+<template>
+  <div>
+    <NavBar :go="{ type: 'push', path: '/resumptionEvaluate' }" />
+    <div class="evaluate">
+      <van-row class="cell_cls">
+        <van-col span="24"> 三季度对押运公司的评价 </van-col>
+      </van-row>
+      <van-row class="cell_cls">
+        <van-col span="24">
+          <span class="evaluteTime">评价周期:</span>
+          <span>{{ '2023-09-01-2023-10-01' }}</span>
+        </van-col>
+      </van-row>
+      <van-row>
+        <van-col span="24" class="evaluteMain">
+          <span class="titleLeft"></span>
+          <span class="text">评价内容</span>
+        </van-col>
+      </van-row>
+      <van-cell title="1-被评价外包公司名称">
+        <!-- 使用 title 插槽来自定义标题 -->
+        <template #label>
+          <van-field v-model="text" required placeholder="请输入" />
+        </template>
+      </van-cell>
+      <van-cell title="2-外包公司在提供服务过程中的质量">
+        <!-- 使用 title 插槽来自定义标题 -->
+        <template #label>
+          <span style="font-size: 14px">评分:</span
+          ><van-rate count="10" v-model="value" :size="20" color="#ffd21e" void-icon="star" void-color="#eee" />
+        </template>
+      </van-cell>
+    </div>
+    <van-row class="cell-btutton">
+      <van-col span="24">
+        <van-button type="info" class="infoBtn">评价</van-button>
+      </van-col>
+    </van-row>
+  </div>
+</template>
+<script>
+import NavBar from '@/components/NavBar'
+export default {
+  name: 'SocAppEvaluate',
+  components: {
+    NavBar
+  },
+  data() {
+    return {
+      text: '',
+      value: 0
+    }
+  },
+
+  mounted() {},
+
+  methods: {}
+}
+</script>
+<style lang="scss" scoped>
+.evaluate {
+  background-color: #fff;
+  padding: 20px;
+  margin: 20px;
+  height: 100%;
+  font-size: 30px;
+}
+.cell_cls {
+  font-size: 30px;
+  height: 40px;
+  line-height: 40px;
+  margin: 20px;
+  .evaluteTime {
+    color: #ccc;
+  }
+}
+.evaluteMain {
+  margin-top: 30px;
+  margin-bottom: 30px;
+  .titleLeft {
+    display: inline-block;
+    width: 8px;
+    height: 40px;
+    background-color: #1989fa;
+    vertical-align: middle;
+    margin-right: 10px;
+  }
+  .text {
+    vertical-align: middle;
+  }
+}
+.infoBtn{
+    width: 100%;
+}
+.cell-btutton{
+    position: absolute;
+    bottom: 0%;
+    width: 100%;
+}
+</style>

+ 383 - 0
src/views/menu/resumptionEvaluate/index.vue

@@ -0,0 +1,383 @@
+<template>
+  <div>
+    <div class="topBox">
+      <NavBar :go="{ type: 'push', path: '/menu' }" />
+      <van-row>
+        <van-col span="24"> <van-search v-model="value" placeholder="请输入搜索关键词" @search="onSearch" /></van-col>
+      </van-row>
+      <van-row>
+        <van-col span="24">
+          <org-tree v-model="cascaderValue" :name="'sss'" @changeItem="getDataList"></org-tree>
+        </van-col>
+      </van-row>
+      <van-row>
+        <van-col span="12"
+          ><van-field
+            v-model="fieldValue"
+            label-width="3em"
+            clearable
+            :disabled="showStatus"
+            label="状态"
+            placeholder=""
+            @click="showStatus = true"
+            ><van-icon name="arrow-down" slot="button"
+          /></van-field>
+          <van-popup v-model="showStatus" round position="bottom">
+            <van-picker
+              title="状态"
+              show-toolbar
+              :columns="columns"
+              @confirm="onConfirm"
+              @cancel="onCancel"
+              :close-on-click-overlay="false"
+            />
+          </van-popup>
+        </van-col>
+        <van-col span="12">
+          <van-field
+            v-model="currentDate"
+            clearable
+            label-width="3em"
+            label="年份"
+            placeholder=""
+            :disabled="showDate"
+            @click="showDate = true"
+          >
+            <van-icon name="arrow-down" slot="button"
+          /></van-field>
+          <van-popup v-model="showDate" round position="bottom">
+            <van-picker
+              v-model="presentDate"
+              show-toolbar
+              @cancel="onCancel"
+              :columns="yearColumns"
+              @confirm="onDateConfirm"
+              :default-index="yearSelect"
+              title="年份"
+            />
+          </van-popup>
+        </van-col>
+      </van-row>
+    </div>
+
+    <!-- //卡片内容区域 -->
+    <div class="navBarclas">
+      <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
+        <van-panel :title="item.title" v-for="item in taskList" :key="item.id" class="card" status="状态">
+          <template #header>
+            <div class="titleClass">
+              <div class="title">{{ item.title }}</div>
+              <div>
+                <van-button type="info" v-if="evaluateTure(item)" size="mini" @click="evaluate(item.id)"
+                  >评价</van-button
+                >
+              </div>
+            </div>
+          </template>
+          <div>
+            <div class="mainItem" @click="goInfo(item.id)">
+              <div>评价状态</div>
+              <div>{{ item.orgName }}</div>
+            </div>
+            <div class="mainItem" @click="goInfo(item.id)">
+              <div>评价周期</div>
+              <div>{{ item.statusText }}</div>
+            </div>
+          </div>
+        </van-panel>
+      </van-list>
+    </div>
+  </div>
+</template>
+<script>
+import NavBar from '@/components/NavBar'
+import { Col, Row, Cascader, Dialog, DatetimePicker, Icon, Picker } from 'vant'
+import { getdrillTask } from '@/api/drillTask.js'
+import { deptTreeList } from '@/api/toConsult.js'
+import { Toast } from 'vant'
+import OrgTree from '@/components/orgTree'
+import { newDateMonth, newDateYear } from '@/utils/date.js'
+export default {
+  data() {
+    return {
+      orgName: '',
+      orgShow: false,
+      presentDate: '', //默认时间
+      pageNum: 1,
+      loading: false, //加载状态
+      finished: false, //是否全部加载完毕
+      value:'',
+      yearColumns: [],
+
+      orgName: JSON.parse(sessionStorage.getItem('SET_USER_ORGNAME')) || '', //机构名称
+      cascaderValue: '', //机构ID
+      show: false, //机构弹框显示隐藏
+
+      fieldNames: {
+        text: 'name',
+        value: 'id',
+        children: 'children'
+      },
+      taskList: [{}], //列表数据
+      typeValue: ' ', //类型值
+      yearSelect: null,
+      value1: JSON.parse(sessionStorage.getItem('SET_USER_ID')) || '', //输入框model
+
+      showStatus: false, //状态显示隐藏
+      showDate: false, //月份显示隐藏
+      fieldValue: '全部', //状态名称
+      statusValue: ' ', //状态值
+      columns: ['全部'], //状态数组
+      columnsList: [], //状态数组
+      currentDate: newDateYear(), //年份
+      conditionShow: false //机构弹框显示隐藏
+    }
+  },
+  components: {
+    NavBar,
+    OrgTree,
+    Dialog,
+    Icon,
+    DatetimePicker,
+    Picker,
+    Col,
+    Row,
+    Cascader
+  },
+
+  created() {
+    this.presentDate = new Date(newDateYear())
+
+    this.yearData()
+  },
+  mounted() {
+    this.init()
+    this.cascaderValue = JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + ''
+  },
+  methods: {
+    //机构搜索
+    getDataList(val) {
+      this.cascaderValue = val.id
+      this.orgName = val.name
+      this.selectListAppHandler()
+    },
+
+    //判断评价按钮是否展示
+    evaluateTure(item) {
+        return true
+      if (item.status == 2 && window.sessionStorage.getItem('SET_USER_ORGTYPE') != 4) {
+        return true
+      }
+    },
+
+    //初始化
+    init() {
+      //获取数据字典
+      this.getDictHandler('drill_task_status', res => {
+        this.columnsList = res
+        this.columns = res.map(item => item.dictLabel)
+        this.columns.unshift('全部')
+      })
+      //获取分页列表
+      this.selectListAppHandler()
+    },
+    selectListAppHandler(type = 0, callback = () => {}) {
+      let obj = {
+        isAppSelect: 1,
+        pageNum: this.pageNum,
+        pageSize: 10
+      }
+      if (!type) {
+        obj.pageNum = 1
+        this.pageNum = 1
+      }
+      if (this.statusValue) {
+        obj.status = this.statusValue
+      }
+
+      obj.orgId = this.cascaderValue || JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + '' || ''
+
+      if (this.currentDate) {
+        obj.date = this.currentDate + '-' + this.active
+      }
+      if (this.typeValue) {
+        obj.type = this.typeValue
+      }
+
+      //获取任务列表
+      getdrillTask(obj).then(res => {
+        let { code, rows, msg } = res
+        if (code == 200) {
+          if (type) {
+            this.taskList.push(...rows)
+            if (rows.length == 0 || rows.length < 10) {
+              //已加载完全部数据
+              this.finished = true
+            }
+            callback()
+          } else {
+            this.finished = false
+            this.taskList = rows
+          }
+        }
+      })
+    },
+
+    //搜索选择状态时触发
+    onConfirm(value, index) {
+      this.fieldValue = value
+      this.columnsList.forEach(item => {
+        if (value == item.dictLabel) {
+          this.statusValue = item.dictValue
+        }
+      })
+      if (value == '全部') {
+        this.statusValue = ' '
+      }
+
+      this.selectListAppHandler()
+      this.showStatus = false
+    },
+
+    //月份选中触发
+    onDateConfirm(val) {
+      this.currentDate = this.newDate(val + '')
+
+      this.showDate = false
+      this.selectListAppHandler()
+    },
+    yearData() {
+      // 获取默认显示的时间
+      var nowTime = new Date()
+      let year = nowTime.getFullYear()
+      let month = nowTime.getMonth()
+      let day = nowTime.getDate()
+      // 循环数组 填写最小时间和最大时间范围
+      for (let i = 1980; i < 2099; i++) {
+        this.yearColumns.push(i)
+      }
+      // 格式化时间并截取
+      var years = this.formatDate(new Date(year, month, day))
+      var Year = years.slice(0, 4)
+      // 将截取的年份赋值给绑定值 用于点击弹出日期窗口后显示当前的时间
+      this.yearSelect = this.yearColumns.indexOf(Number(Year))
+    }, //日期转换
+    newDate(time) {
+      var date = new Date(time)
+      var y = date.getFullYear()
+      var m = date.getMonth() + 1
+      m = m < 10 ? '0' + m : m
+      var d = date.getDate()
+      d = d < 10 ? '0' + d : d
+      return y
+    },
+    //日期格式
+    formatDate(date) {
+      return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`
+    },
+
+    //onLoad下拉刷新
+    onLoad() {
+      if (this.pageNum == 1) {
+        this.pageNum = 2
+      }
+      this.loading = true
+      this.selectListAppHandler(1, () => {
+        this.pageNum++
+        this.loading = false
+        console.log(1)
+      })
+    },
+    onSearch(){
+
+    },
+    //评价
+    evaluate(id) {
+      this.$router.push('/evaluate/' + id )
+    },
+
+    //跳转详情
+    goInfo(id) {
+      this.$router.push('/rehearsalTasinfo/' + id + '_info')
+    },
+
+    onCancel() {
+      this.show = false
+      this.typeStatus = false
+      this.showDate = false
+      this.showStatus = false
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.popup {
+  height: 40vh;
+}
+.navBarclas {
+  height: calc(100vh - 380px);
+  overflow: scroll;
+}
+.btnf_box {
+  background-color: #fff;
+}
+.card {
+  margin: 20px;
+  margin-bottom: 0px;
+  box-shadow: 0 8px 12px #ebedf0;
+}
+.btn {
+  float: right;
+  margin-top: 24px;
+  margin-right: 20px;
+  box-sizing: border-box;
+}
+.titleClass {
+  display: flex;
+  align-items: center;
+  height: 100%;
+  padding: 20px;
+  border-bottom: 1px solid #ccc;
+
+  .title {
+    font-size: 30px;
+    flex: 1;
+    line-height: 50px;
+  }
+}
+.mainItem {
+  display: flex;
+  font-size: 28px;
+  padding: 20px;
+  justify-content: space-between;
+  .condition {
+    color: #1989fa;
+    text-decoration: underline;
+  }
+}
+.conditionCls {
+  .title {
+    color: #1989fa;
+    margin-left: 30px;
+    // margin-top: 30px;
+  }
+  .people {
+    margin-left: 80px;
+    margin-bottom: 30px;
+    margin-top: 30px;
+  }
+}
+.topBox {
+  overflow: hidden;
+}
+:deep.van-field--disabled {
+  color: #323233;
+}
+:deep.van-field--disabled .van-field__label {
+  color: #323233;
+}
+:deep .van-field__control[disabled] {
+  color: #323233;
+  -webkit-text-fill-color: #323233;
+}
+</style>

+ 2 - 2
vue.config.js

@@ -109,8 +109,8 @@ module.exports = defineConfig({
         }
       },
       '/dev': {
-        // target: "http://10.87.10.55:8080",
-        target: "http://47.92.229.224:9002",
+        target: "http://10.87.10.55:8080",
+        // target: "http://47.92.229.224:9002",
         // ws:true,
         changOrigin:true,
         pathRewrite:{