Kaynağa Gözat

满意度评价

cyy 1 yıl önce
ebeveyn
işleme
5d558108fa

+ 6 - 0
src/router/routes.js

@@ -317,6 +317,12 @@ const frameCustom = [
         name: 'complaintList',
         meta: { title: '投诉列表' },
         component: _import('/platform/bpmn/complaint/complaintList')
+      },
+      {
+        path: 'satisfaction/satisfaction',
+        name: 'satisfaction',
+        meta: { title: '满意度评价' },
+        component: _import('/platform/bpmn/satisfaction/satisfaction')
       }
     ]
   },

+ 3 - 3
src/utils/common.js

@@ -3,7 +3,7 @@ import { mapValues } from 'lodash'
 import { encryptByAes } from '@/utils/encrypt'
 // import { preview } from '@/business/platform/form/utils/custom/preview'
 import request from './joinCURD'
-// import getRequest from './general'
+import getRequest from './general'
 import pinyin4js from 'pinyin4js'
 // import { snapshoot } from "@/api/platform/file/attachment";
 import { getNextIdByAlias } from '@/api/platform/system/identity'
@@ -234,6 +234,6 @@ export default {
   // removeFormData,
   replaceNullWithEmpty,
   Utils,
-  ActionUtils
-  // getRequest
+  ActionUtils,
+  getRequest
 }

+ 642 - 0
src/views/platform/bpmn/satisfaction/satisfaction.vue

@@ -0,0 +1,642 @@
+<template>
+  <div class="container">
+    <div style="height:5%">
+      <van-sticky>
+        <van-nav-bar
+          :title="
+            generateTitle($route.name, $route.params.title || $route.meta.title)
+          "
+          :left-text="$t('common.button.back')"
+          left-arrow
+          @click-left="$router.push({ name: 'dashboard' })"
+        />
+      </van-sticky>
+    </div>
+    <!-- <u-alert-tips type="success" :title="descriptionTitle" :description="description" style="margin:10px"></u-alert-tips> -->
+    <div class="flexWrap">
+      <van-form @submit="onSubmit">
+        <van-field
+          name="radio"
+          required
+          label="用户类型:"
+          placeholder="请选择用户类型"
+          label-width="6em"
+          :value="fuWuXiangMu"
+        >
+          <template #input>
+            <van-radio-group v-model="fuWuXiangMu" direction="horizontal">
+              <van-radio
+                v-for="(it, index) in fuWuXiangMuList"
+                :key="index"
+                :name="it.name"
+                shape="round"
+                class="lineSty"
+              >
+                {{ it.name }}
+              </van-radio>
+            </van-radio-group>
+          </template>
+        </van-field>
+        <van-field
+          v-model="fuWuLeiXing"
+          required
+          label="调查来源:"
+          placeholder="请输入调查来源"
+          label-width="6em"
+          clearable
+          readonly
+        />
+        <van-field
+          v-model="keHuLianXiRen"
+          required
+          label="用户姓名:"
+          placeholder="请输入用户姓名"
+          label-width="6em"
+          clearable
+        />
+        <van-field
+          v-model="keHu"
+          required
+          label="用户单位:"
+          placeholder="请输入用户单位"
+          label-width="6em"
+          clearable
+        />
+        <van-field
+          v-model="lianxidianhua"
+          required
+          label="用户电话:"
+          placeholder="请输入用户电话"
+          label-width="6em"
+          clearable
+          :rules="[
+            {
+              validator: $common.getRequest.checkPhone,
+              message: '手机号格式错误'
+            }
+          ]"
+        />
+        <van-field
+          v-model="keHuLianXiYouXian"
+          required
+          label="用户邮箱:"
+          placeholder="请输入用户邮箱"
+          label-width="6em"
+          clearable
+          :rules="[
+            {
+              validator: $common.getRequest.checkEmail,
+              message: '邮箱格式错误'
+            }
+          ]"
+        />
+      </van-form>
+    </div>
+    <van-cell-group class="marginF">
+      <div
+        class="verticalLine"
+        style="width:100%;text-align:left;padding: 1em 0 1em 0.5em;margin: 0;"
+      >
+        {{ peiZhi1 }}
+      </div>
+      <div class="scoreLine">
+        <van-rate
+          v-model="wenTiYiDaAn"
+          color="#67c23a"
+          void-icon="star"
+          void-color="rgb(236, 236, 236)"
+        />
+        <div v-if="wenTiYiDaAn != ''" class="score">
+          {{ getRote(wenTiYiDaAn) }}
+        </div>
+      </div>
+    </van-cell-group>
+    <van-cell-group class="marginF">
+      <div
+        class="verticalLine"
+        style="width:100%;text-align:left;padding: 1em 0 1em 0.5em;margin: 0;"
+      >
+        {{ peiZhi2 }}
+      </div>
+      <div class="scoreLine">
+        <van-rate
+          v-model="wenTiErDaAn"
+          color="#67c23a"
+          void-icon="star"
+          void-color="rgb(236, 236, 236)"
+        />
+        <div v-if="wenTiErDaAn != ''" class="score">
+          {{ getRote(wenTiErDaAn) }}
+        </div>
+      </div>
+    </van-cell-group>
+    <van-cell-group class="marginF">
+      <div
+        class="verticalLine"
+        style="width:100%;text-align:left;padding: 1em 0 1em 0.5em;margin: 0;"
+      >
+        {{ peiZhi3 }}
+      </div>
+      <div class="scoreLine">
+        <van-rate
+          v-model="wenTiSanDaAn"
+          color="#67c23a"
+          void-icon="star"
+          void-color="rgb(236, 236, 236)"
+        />
+        <div v-if="wenTiSanDaAn != ''" class="score">
+          {{ getRote(wenTiSanDaAn) }}
+        </div>
+      </div>
+    </van-cell-group>
+    <van-cell-group class="marginF">
+      <div
+        class="verticalLine"
+        style="width:100%;text-align:left;padding: 1em 0 1em 0.5em;margin: 0;"
+      >
+        {{ peiZhi4 }}
+      </div>
+      <div class="scoreLine">
+        <van-rate
+          v-model="wenTiSiDaAn"
+          color="#67c23a"
+          void-icon="star"
+          void-color="rgb(236, 236, 236)"
+        />
+        <div v-if="wenTiSiDaAn != ''" class="score">
+          {{ getRote(wenTiSiDaAn) }}
+        </div>
+      </div>
+    </van-cell-group>
+    <van-cell-group class="marginF">
+      <div
+        class="verticalLine"
+        style="width:100%;text-align:left;padding: 1em 0 1em 0.5em;margin: 0;"
+      >
+        {{ peiZhi5 }}
+      </div>
+      <div class="scoreLine">
+        <van-rate
+          v-model="wenTiWuDaAn"
+          color="#67c23a"
+          void-icon="star"
+          void-color="rgb(236, 236, 236)"
+        />
+        <div v-if="wenTiWuDaAn != ''" class="score">
+          {{ getRote(wenTiWuDaAn) }}
+        </div>
+      </div>
+    </van-cell-group>
+    <ibps-uploader
+      v-model="fuJianShangChuanArray"
+      class="paddingNone marginF"
+      label="上传附件"
+      download
+      :have-padding="false"
+      multiple
+      clearable
+    />
+    <van-cell-group class="marginF">
+      <div
+        class="verticalLine"
+        style="width:100%;text-align:left;padding: 1em 0 1em 0.5em;margin: 0;"
+      >
+        对检验科意见与建议
+      </div>
+
+      <van-radio-group
+        v-model="touSu"
+        style="padding-left:0.5em"
+        direction="horizontal"
+      >
+        <van-radio
+          v-for="(it, index) in tousuList"
+          :key="index"
+          :name="it.name"
+          shape="square"
+          class="lineSty"
+        >
+          {{ it.name }}
+        </van-radio>
+      </van-radio-group>
+
+      <van-field
+        :value="qingNinTianXie"
+        autosize
+        class="typeStyle"
+        type="textarea"
+        placeholder="请填写对检验科意见与建议"
+        label-width="0"
+        clearable
+      />
+    </van-cell-group>
+    <div class="padding flex flex-direction">
+      <van-button
+type="success"
+class="btn btn-back-color"
+@click="onSubmit"
+        >提交</van-button
+      >
+    </div>
+  </div>
+</template>
+<script>
+// import {
+// 	ACCESS_TOKEN,
+// 	USER_NAME,
+// 	USER_INFO
+// } from "@/common/util/constants" // 拉取登录token,userName,userInfo
+// import appSelect from '@/components/my-componets/appSelect.vue'
+// import myDate from '@/components/my-componets/my-date.vue'
+// import md5 from "@/common/util/md5.js"
+import meth from './satisfactionJson.json'
+import i18n from '@/utils/i18n'
+import { findFormJsonByBo } from '@/api/platform/form/transfer'
+export default {
+  components: {
+    // myDate,
+    // appSelect
+  },
+  data() {
+    return {
+      popupShow: false,
+      description: `感谢您对检验科的信任与支持,为了帮助检验科更好的发展,为用户提供更优质的服务,请您抽出宝贵时间帮忙填写调查问卷,非常感谢!`,
+      descriptionTitle: '尊敬的客户:您好!',
+      buMenList: [],
+      pingJiaShiJian: null,
+      buMenId: '',
+      wenTiYiDaAn: '',
+      wenTiErDaAn: '',
+      wenTiSanDaAn: '',
+      wenTiSiDaAn: '',
+      wenTiWuDaAn: '',
+      qingNinTianXie: '',
+      kehuXinXinList: [],
+      lianxidianhua: '',
+      fuWuLeiXing: '手机客户端',
+      fuWuLeiXingCheck: [],
+      keHuLianXiYouXian: '',
+      fuWuXiangMu: '门诊患者',
+      keHuLianXiRen: '',
+      mobile: '',
+      keHu: '',
+      shiWuShuoMing: '',
+      qianMing: '',
+      fuWuLeiXingList: meth.fuWuLeiXingList,
+      fuWuXiangMuList: meth.fuWuXiangMuList,
+      tousuList: meth.tousuList,
+      keHuBianHao: '',
+      touSu: '无',
+      opinionList: [
+        '很不满意',
+        '不满意',
+        '基本满意',
+        '较满意',
+        '满意',
+        '非常满意'
+      ],
+      level: null,
+      peiZhi1: '服务态度',
+      peiZhi2: '检验服务能力',
+      peiZhi3: '检验报告及时性',
+      peiZhi4: '检验结果准确率',
+      peiZhi5: '工作规范性',
+      mainPosition: {
+        id: ''
+      },
+      fuJianShangChuanArray: ''
+    }
+  },
+  created() {
+    const mainPosition = this.$store.getters.mainPosition
+    this.mainPosition = mainPosition
+    this.wenTiYiDaAn = 6
+    this.wenTiErDaAn = 6
+    this.wenTiSanDaAn = 6
+    this.wenTiSiDaAn = 6
+    this.wenTiWuDaAn = 6
+    this.getKehu()
+  },
+  methods: {
+    generateTitle(name, title) {
+      // generateTitle by vue-i18n
+      return i18n.generateTitle(name, title)
+    },
+    // 对应选择分数显示
+    getRote(index) {
+      if (index) {
+        // const data = ''
+        const dataItem = this.setRote(index) + '分'
+        return '(' + this.opinionList[index - 1] + ':' + dataItem + ')'
+      } else {
+        return ''
+      }
+    },
+    // 对应分数编译
+    setRote(index) {
+      let data = ''
+      switch (index) {
+        case 1:
+          data = '0'
+          break
+        case 2:
+          data = '2'
+          break
+        case 3:
+          data = '5'
+          break
+        case 4:
+          data = '7'
+          break
+        case 5:
+          data = '9'
+          break
+        case 6:
+          data = '10'
+          break
+      }
+      return data
+    },
+    getKehu() {
+      const info = this.$store.getters.userInfo
+      this.level = this.$store.getters.level
+      if (info) {
+        this.keHuBianHao = info.user.id || ''
+        this.keHu = info.user.qq || ''
+        this.lianxidianhua = info.user.mobile || ''
+        this.keHuLianXiRen = info.user.name || ''
+        this.keHuLianXiYouXian = info.user.email || ''
+        this.shiWuShuoMing = info.user.qq || ''
+      }
+      this.getMu()
+    },
+    onSubmit() {
+      const info = this.$store.getters.userInfo
+      const useId = info.user.id
+      const detpId = info.employee.positions
+
+      const list1 = [
+        'keHuLianXiRen',
+        'keHu',
+        'lianxidianhua',
+        'keHuLianXiYouXian'
+      ]
+      const list2 = ['用户姓名', '用户单位', '用户电话', '用户邮箱']
+      for (const item in list1) {
+        if (!this[list1[item]]) {
+          return this.$toast({
+            duration: 2000, // 持续展示 toast
+            message: '请输入' + list2[item]
+          })
+        }
+      }
+
+      // const tmpArray = this.fuJianShangChuanArray
+      // this.fuJianShangChuanArray.forEach(item => {
+      //   tmpArray.push(item.id)
+      // })
+      const para = {
+        parameters: [
+          {
+            key: 'defId',
+            value: '1022834234382876672'
+          },
+          {
+            key: 'version',
+            value: '0'
+          },
+          {
+            key: 'data',
+            value: ''
+          }
+        ]
+      }
+      const paraValue = {
+        nianFen: this.$methCommon.time(4),
+        // guanLianKeHu: this.buMenName,
+        keHu: this.keHu,
+        lianXiDianHua: this.lianxidianhua,
+        keHuLianXiRen: this.keHuLianXiRen,
+        keHuLianXiYouXian: this.keHuLianXiYouXian,
+        fuWuXiangMu: this.fuWuXiangMu,
+        fuWuLeiXing: this.fuWuLeiXing,
+        pingFen1: this.setRote(this.wenTiYiDaAn),
+        pingFen2: this.setRote(this.wenTiErDaAn),
+        pingFen3: this.setRote(this.wenTiSanDaAn),
+        pingFen4: this.setRote(this.wenTiSiDaAn),
+        pingFen5: this.setRote(this.wenTiWuDaAn),
+        yiJianHeJianYi: this.qingNinTianXie,
+        bianZhiRen: useId,
+        bianZhiShiJian: this.$methCommon.time(16),
+        // bianZhiBuMen: this.mainPosition.id || detpId,
+        bianZhiBuMen: detpId,
+
+        shiFouGuoShen: '已编制',
+        shiWuShuoMing: this.shiWuShuoMing,
+        qianMing: this.qianMing,
+        touSu: this.touSu,
+        diDian: this.level.second || this.level.first,
+        peiZhi1: this.peiZhi1,
+        peiZhi2: this.peiZhi2,
+        peiZhi3: this.peiZhi3,
+        peiZhi4: this.peiZhi4,
+        peiZhi5: this.peiZhi5,
+        fuJian: this.fuJianShangChuanArray
+      }
+      paraValue.zongFen =
+        parseInt(paraValue.pingFen1) +
+        parseInt(paraValue.pingFen2) +
+        parseInt(paraValue.pingFen3) +
+        parseInt(paraValue.pingFen4) +
+        parseInt(paraValue.pingFen5)
+      para.parameters[2].value = JSON.stringify(paraValue)
+      // const that = this
+      findFormJsonByBo(para).then(res => {
+        const result = res
+        if (result.state === 200) {
+          this.$toast({
+            duration: 2000, // 持续展示 toast
+            message: '提交成功!'
+          })
+          setTimeout(() => {
+            this.$router.push({ name: 'dashboard' })
+          }, 2000)
+        } else {
+          this.$toast({
+            duration: 2000, // 持续展示 toast
+            message: '请求出现错误!'
+          })
+        }
+      })
+    },
+    getMu() {
+      const second = this.level.second
+      const sql = `select * from t_myddcpzb where di_dian_ = '${second}' order by create_time_ desc LIMIT 1`
+      this.$common.request('sql', sql).then(res => {
+        const { data = [] } = res.variables || {}
+        if (data.length > 0) {
+          this.peiZhi1 = data[0].pei_zhi_1_
+          this.peiZhi2 = data[0].pei_zhi_2_
+          this.peiZhi3 = data[0].pei_zhi_3_
+          this.peiZhi4 = data[0].pei_zhi_4_
+          this.peiZhi5 = data[0].pei_zhi_5_
+        } else {
+          this.peiZhi1 = '服务态度'
+          this.peiZhi2 = '检验服务能力'
+          this.peiZhi3 = '检验报告及时性'
+          this.peiZhi4 = '检验结果准确率'
+          this.peiZhi5 = '工作规范性'
+        }
+      })
+    },
+    // 获取上传状态
+    select(file) {
+      this.$uploades.selectUpload(file).then(res => {
+        res.forEach(item => {
+          this.fuJianShangChuanArray.push(item)
+        })
+      })
+    },
+    uploadClick(item) {
+      if (/^(pdf|png|jpg|jpeg|gif)$/.test(item.ext)) {
+        uni.navigateTo({
+          url: `/pages/filediv/filediv?id=${item.id}&ext=${item.ext}`
+        })
+      } else {
+        this.$uploades.download(item.id, item.name, this)
+      }
+    },
+    // 删除
+    deleteMe(id) {
+      this.fuJianShangChuanArray = this.fuJianShangChuanArray.filter(
+        item => item.id !== id
+      )
+    },
+    // 获取上传进度
+    progress(e) {},
+    // 上传成功
+    success(file) {},
+    // 上传失败
+    fail(e) {}
+  }
+}
+</script>
+<style lang="scss" scoped>
+.cu-form-group .title {
+  display: flex;
+  min-width: 200px;
+}
+
+.titleRed {
+  margin-right: 5px;
+  color: red;
+}
+
+.btn {
+  margin: 15px;
+  width: 90%;
+  padding: 15px;
+  border-radius: 5px;
+}
+
+.scoreLine {
+  display: flex;
+  align-items: flex-end;
+  padding: 0 0px 1em 0.5em;
+}
+
+.score {
+  display: inline-block;
+  font-size: 12px;
+  color: grey;
+}
+
+.fileBox {
+  line-height: 50px;
+  color: #888888;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  border: 1px solid #dddddd;
+  border-radius: 8px;
+  padding: 5px;
+  margin-top: 10px;
+}
+.verticalLine {
+  display: flex;
+  align-items: center;
+  // justify-content: center;
+  font-size: 14px;
+  color: rgb(51, 51, 51);
+}
+.verticalLine::before {
+  content: '';
+  width: 5px;
+  height: 14px;
+  background-color: #2979ff;
+  border-radius: 2px;
+  margin-right: 5px;
+}
+::v-deep .u-alert-tips--border--success-disabled {
+  border-color: rgba(255, 255, 255, 0.6);
+}
+
+::v-deep .u-alert-tips--bg--success-light {
+  background-color: #f0f9eb;
+}
+
+::v-deep .u-alert-title {
+  color: #67c23a;
+}
+
+::v-deep .u-alert-desc {
+  color: #67c23a;
+}
+.typeStyle {
+  padding-left: 0.5em;
+}
+.marginF {
+  margin-top: 5px;
+}
+.paddingNone {
+  padding: 0;
+}
+::v-deep .paddingNone .ibps-uploader {
+  padding-left: 0.5em;
+}
+::v-deep .typeStyle.van-cell::after {
+  border-bottom: 0px solid #fff;
+}
+::v-deep .yonghu .van-cell--borderless {
+  padding-left: 8px;
+}
+::v-deep .yonghu .van-cell .van-field__label {
+  display: flex;
+  align-items: center;
+  justify-content: left;
+  font-size: 14px;
+  color: rgb(51, 51, 51);
+}
+::v-deep .yonghu .van-cell .van-field__label::before {
+  content: '';
+  width: 5px;
+  height: 14px;
+  background-color: #2979ff;
+  border-radius: 2px;
+  margin-right: 5px;
+}
+.lineSty {
+  margin-top: 3px;
+  margin-bottom: 3px;
+}
+::v-deep .spei .van-cell-group {
+  margin-bottom: 10px;
+}
+.container {
+  background-color: #f8f8f8;
+}
+.btn-back-color {
+  background-color: #1989fa !important;
+  border: none;
+}
+</style>

+ 23 - 0
src/views/platform/bpmn/satisfaction/satisfactionJson.json

@@ -0,0 +1,23 @@
+{
+	"fuWuXiangMuList": [{
+		"name": "门诊患者"
+	}, {
+		"name": "住院患者"
+	}, {
+		"name": "医务人员"
+	}, {
+		"name": "员工"
+	}],
+	"fuWuLeiXingList": [{
+		"name": "纸质调查表"
+	}, {
+		"name": "电话"
+	}, {
+		"name": "手机客户端"
+	}],
+	"tousuList": [{
+		"name": "有"
+	}, {
+		"name": "无"
+	}]
+}

+ 32 - 0
src/views/system/dashboard/index.vue

@@ -256,6 +256,38 @@ export default {
               tenantId: '-999',
               updateBy: null,
               updateTime: null
+            },
+            {
+              alias: 'Satisfaction',
+              checked: 'false',
+              children: [],
+              createBy: null,
+              createTime: '2016-08-26 09:48:29',
+              dataStatus: null,
+              dbType: null,
+              defaultUrl: '/bpmn/satisfaction/satisfaction',
+              desc: '',
+              displayInMenu: '1',
+              dsAlias: null,
+              icon: 'completed',
+              iconBgColor: '#e7505a',
+              iconFontColor: '#ffffff',
+              iconType: 'icon',
+              id: '4',
+              ip: null,
+              isCommon: 'N',
+              isFolder: 'Y',
+              isOpen: 'N',
+              name: '满意度评价',
+              parentId: '1',
+              path: '1.1.2.1.1.4',
+              pk: '',
+              resourceType: 'menu',
+              sn: 1,
+              systemId: 'app',
+              tenantId: '-999',
+              updateBy: null,
+              updateTime: null
             }
           ],
           createBy: null,