| | |
| | | }) |
| | | } |
| | | |
| | | export const getPage = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/evaluation/evaluation/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (id) => { |
| | | return request({ |
| | | url: '/api/evaluation/evaluation/detail', |
| | |
| | | }) |
| | | } |
| | | |
| | | export const getPage = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/pass/pass/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (id) => { |
| | | return request({ |
| | | url: '/api/pass/pass/detail', |
| | |
| | | import {mobileValidate} from "@/util/formValidator"; |
| | | |
| | | export default { |
| | | height:'auto', |
| | | calcHeight: 30, |
| | |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | viewBtn: false, |
| | | editBtn:false, |
| | | delBtn:false, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | |
| | | prop: "score", |
| | | type: "rate", |
| | | colors: ['#99A9BF', '#F7BA2A', '#FF9900'], |
| | | rules: [{required: true, trigger: ['blur','change'],message:"请评分"}] |
| | | }, |
| | | { |
| | | label: "评价", |
| | |
| | | hide: true, |
| | | }, |
| | | { |
| | | label: "修改时间", |
| | | label: "评价时间", |
| | | prop: "updateTime", |
| | | type: "input", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | hide: true, |
| | | }, |
| | | { |
| | | label:"差评确认信息", |
| | | prop:"badCommentConfirm", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | slot:true, |
| | | }, |
| | | { |
| | | label: "状态", |
| | | prop: "status", |
| | | type: "input", |
| | | type: "select", |
| | | search:true, |
| | | dicData:[ |
| | | { |
| | | label: "所有", |
| | | value: "", |
| | | }, |
| | | { |
| | | label:"待评价", |
| | | value:1 |
| | | }, |
| | | { |
| | | label:"好评", |
| | | value:2 |
| | | }, |
| | | { |
| | | label:"差评", |
| | | value:3 |
| | | }, |
| | | ], |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | hide: true, |
| | | }, |
| | | { |
| | | label: "是否已删除", |
| | |
| | | hide: true, |
| | | }, |
| | | { |
| | | label: "名字", |
| | | prop: "name", |
| | | type: "input", |
| | | }, |
| | | { |
| | | label: "编号", |
| | | prop: "no", |
| | | type: "input", |
| | |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{row}" slot="badCommentConfirm"> |
| | | <span v-if="row.status == 3 && !row.badCommentConfirm" style="color: red">差评类型未确认</span> |
| | | </template> |
| | | |
| | | |
| | | |
| | | <template slot-scope="{type,size,row,index}" slot="menu"> |
| | | <el-button v-if="row.status == 1" icon="el-icon-edit" :size="size" :type="type" @click="$refs.crud.rowEdit(row,index)">评 价</el-button> |
| | | <el-button v-if="row.status == 3 && !row.badCommentConfirm" icon="el-icon-warning-outline" :size="size" :type="type" @click="badCommentConfirm(row)">差评确认</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, getDetail, add, update, remove} from "@/api/evaluation/evaluation"; |
| | | import {getPage, getDetail, add, update, remove} from "@/api/evaluation/evaluation"; |
| | | import option from "@/const/evaluation/evaluation"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | |
| | | }, |
| | | selectionList: [], |
| | | option: option, |
| | | badConfirmOption:{ |
| | | height:'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | border: true, |
| | | index: true, |
| | | dialogClickModal: false, |
| | | group:[ |
| | | { |
| | | label: '评价信息', |
| | | collapse: true, |
| | | prop: 'info', |
| | | arrow:false, |
| | | column:[ |
| | | { |
| | | label: "申请单号", |
| | | prop: "no", |
| | | type: "input", |
| | | readonly:true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | }, |
| | | { |
| | | label: "评分", |
| | | prop: "score", |
| | | type: "rate", |
| | | disabled:true, |
| | | colors: ['#99A9BF', '#F7BA2A', '#FF9900'], |
| | | rules: [{required: true, trigger: ['blur','change'],message:"请评分"}] |
| | | }, |
| | | { |
| | | label: "评价", |
| | | prop: "comment", |
| | | readonly:true, |
| | | disabled:true, |
| | | span:24, |
| | | type: "select", |
| | | multiple:true, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=evaluation_comment", |
| | | props:{ |
| | | label:"dictValue", |
| | | value:"dictKey" |
| | | }, |
| | | }, |
| | | { |
| | | label: "建议与反馈", |
| | | prop: "feedback", |
| | | readonly:true, |
| | | span:24, |
| | | type: "textarea", |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: '确认评价内容', |
| | | collapse: true, |
| | | prop: 'confirm', |
| | | arrow:false, |
| | | column:[ |
| | | { |
| | | label:'', |
| | | span:24, |
| | | gutter:18, |
| | | prop:'badCommentConfirm', |
| | | type:'radio', |
| | | props:{ |
| | | label:"dictValue", |
| | | value:"dictKey" |
| | | }, |
| | | dicUrl: '/api/blade-system/dict-biz/dictionary?code=evaluation_bad_comment_confirm', |
| | | rules: [{required: true, trigger: ['blur','change'],message:"请确认评价内容"}] |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | }, |
| | | data: [] |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | ...mapGetters(["permission","userInfo"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.evaluation_add, true), |
| | |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | permit(){ |
| | | return this.userInfo.role_name == 'admin' || this.userInfo.role_name == 'administrator' ? true:false |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | }); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | |
| | | if (row.score<3){ |
| | | //评分小于3 差评 |
| | | row.status = 3 |
| | | }else { |
| | | row.status = 2 |
| | | } |
| | | |
| | | update(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | |
| | | if (!this.permit){ |
| | | params.userId = this.userInfo.user_id |
| | | } |
| | | |
| | | getPage(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | } |
| | | }, |
| | | //差评确认 |
| | | badCommentConfirm(row){ |
| | | this.$DialogForm.show({ |
| | | title: '差评确认', |
| | | width: '70%', |
| | | data:row, |
| | | option: this.badConfirmOption, |
| | | callback:(res)=>{ |
| | | update(res.data).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | res.close() |
| | | }) |
| | | this.option.group.forEach(group=>{ |
| | | group.column.forEach(item=>{ |
| | | item.disabled = false |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, getDetail, add, update, remove} from "@/api/pass/pass"; |
| | | import {getPage, getDetail, add, update, remove} from "@/api/pass/pass"; |
| | | import option from "@/const/pass/pass"; |
| | | import {mapGetters} from "vuex"; |
| | | import QRCode from 'qrcodejs2'; |
| | |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | ...mapGetters(["permission","userInfo"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.pass_add, true), |
| | |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | permit(){ |
| | | return this.userInfo.role_name == 'admin' || this.userInfo.role_name == 'administrator' ? true:false |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | |
| | | if (!this.permit){ |
| | | params.userId = this.userInfo.user_id |
| | | } |
| | | |
| | | getPage(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |