3 changed files with 891 additions and 2 deletions
@ -0,0 +1,440 @@ |
|||
<template> |
|||
<div> |
|||
<div class="dialog-h-content scroll-h"> |
|||
<el-tag type="info" |
|||
class="eltag" |
|||
size="medium" |
|||
style="width: 100%; margin-top: 10px">建议详情</el-tag> |
|||
<div class="m-row"> |
|||
|
|||
<div class="m-row-2"> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">客户名:</span> |
|||
<span>{{ adviceData.customerName }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">组织名:</span> |
|||
<span>{{ adviceData.agencyName}}</span> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="m-row-2"> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">网格名:</span> |
|||
<span>{{ adviceData.gridName}}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">注册手机:</span> |
|||
<span>{{ adviceData.regPhone}}</span> |
|||
</div> |
|||
</div> |
|||
<div class="m-row-2"> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">问题分类:</span> |
|||
<span>{{ adviceData.adviceType}}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">提出时间:</span> |
|||
<span>{{ adviceData.adviceTime}}</span> |
|||
</div> |
|||
</div> |
|||
<div class="m-row-2"> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">提出者:</span> |
|||
<span>{{ adviceData.userName}}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">联系方式:</span> |
|||
<span>{{ adviceData.phone}}</span> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="m-info"> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">建议内容:</span> |
|||
<span>{{ adviceData.adviceContent}}</span> |
|||
|
|||
</div> |
|||
|
|||
<div v-if="adviceData.imgList.length>0" |
|||
class="info-prop"> |
|||
<span class="info-title-2">建议图片:</span> |
|||
|
|||
<div style="display:flex" |
|||
v-for="(item,index) in adviceData.imgList" |
|||
:key="index"> |
|||
|
|||
<img class="img_icon" |
|||
:src="item"> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<el-tag type="info" |
|||
class="eltag" |
|||
size="medium" |
|||
style="width: 100%; margin-top: 10px">回复详情</el-tag> |
|||
<div v-if="!showConfirm" |
|||
class="m-row"> |
|||
|
|||
<div class="m-row-2"> |
|||
<div class="info-prop"> |
|||
<span class="info-title-3">回复者:</span> |
|||
<span>{{ adviceData.replyUserName }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-3">回复时间:</span> |
|||
<span>{{ adviceData.replyTime}}</span> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="m-info"> |
|||
<div class="info-prop"> |
|||
<span class="info-title-3">回复内容:</span> |
|||
<span>{{ adviceData.replyContent}}</span> |
|||
|
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-3">政府回复文本:</span> |
|||
<span>{{ adviceData.govContent}}</span> |
|||
|
|||
</div> |
|||
<div v-if="adviceData.govImgList.length>0" |
|||
class="info-prop"> |
|||
<span class="info-title-3">政府回复取证:</span> |
|||
|
|||
<div style="display:flex" |
|||
v-for="(item,index) in adviceData.govImgList" |
|||
:key="index"> |
|||
|
|||
<img class="img_icon" |
|||
:src="item"> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
<div v-if="showConfirm" |
|||
class="m-row"> |
|||
|
|||
<div class="m-info"> |
|||
<div class="info-prop"> |
|||
<span class="info-title-3">回复内容:</span> |
|||
<div> |
|||
<el-input type="textarea" |
|||
:rows="4" |
|||
resize="none" |
|||
maxlength="500" |
|||
show-word-limit |
|||
style="width: 600px" |
|||
placeholder="请输入回复内容" |
|||
v-model="adviceData.replyContent"></el-input> |
|||
<div class="input_tip">建议只可回复一次,请谨慎回复</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-3">政府回复文本:</span> |
|||
<el-input type="textarea" |
|||
:rows="4" |
|||
resize="none" |
|||
maxlength="500" |
|||
style="width: 600px" |
|||
show-word-limit |
|||
placeholder="请输入政府回复文本" |
|||
v-model="adviceData.govContent"></el-input> |
|||
|
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-3">政府回复取证:</span> |
|||
|
|||
<div> |
|||
<el-upload :headers="$getElUploadHeaders()" |
|||
ref="uploadPic" |
|||
:action="uploadUlr" |
|||
:data="{ customerId: adviceData.customerId }" |
|||
list-type="picture-card" |
|||
:on-exceed="exceedPic" |
|||
:on-remove="removePic" |
|||
:file-list="replayImgList" |
|||
:on-success="handleSuccess" |
|||
:limit="3"> |
|||
<span class="font-14">选择图片</span> |
|||
<div slot="tip" |
|||
class="upload_tip"> |
|||
最多上传3张图片,图片支持jpg、jpeg、bmp、git或png格式 |
|||
</div> |
|||
</el-upload> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="div-btn"> |
|||
<el-button size="small" |
|||
@click="handleCancle">关 闭</el-button> |
|||
<el-button v-if="showConfirm" |
|||
size="small" |
|||
type="primary" |
|||
:disabled="btnDisable" |
|||
@click="handleComfirm">回 复</el-button> |
|||
|
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapGetters } from 'vuex' |
|||
import { Loading } from 'element-ui' // 引入Loading服务 |
|||
import { requestPost } from '@/js/dai/request' |
|||
import daiMap from "@/utils/dai-map"; |
|||
|
|||
|
|||
let loading // 加载动画 |
|||
|
|||
export default { |
|||
data () { |
|||
|
|||
|
|||
return { |
|||
initLoading: false, |
|||
btnDisable: false, |
|||
|
|||
adviceId: '', |
|||
srcList: [], |
|||
adviceData: { |
|||
customerId: '', //客户id |
|||
customerName: '', //客户名 |
|||
agencyName: '', //组织名 |
|||
gridName: '', //网格名 |
|||
userName: '', //提出人名字 |
|||
regPhone: '', //注册时的联系电话 |
|||
adviceType: '', //问题分类,后台拼接 |
|||
phone: '', //填写的联系电话 |
|||
adviceTime: '', //建议时间 |
|||
adviceContent: '', //建议内容 |
|||
imgList: [], //建议图片列表 |
|||
replyContent: '', //回复内容 无为空字符串 |
|||
replyTime: '', //回复时间 无为空字符串 |
|||
replyUserName: '', //回复人 |
|||
govContent: '', //政府回复文本 |
|||
govImgList: [] //政府回复取证 |
|||
}, |
|||
|
|||
showConfirm: true, |
|||
replayImgList: [], |
|||
|
|||
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2', |
|||
// upload_url: '', // 上传URL |
|||
upload_name: '' // 图片或视频名称 |
|||
|
|||
} |
|||
}, |
|||
|
|||
mounted () { |
|||
|
|||
|
|||
}, |
|||
|
|||
methods: { |
|||
diaDestroy () { |
|||
|
|||
}, |
|||
|
|||
async initForm (adviceId) { |
|||
|
|||
this.adviceId = adviceId |
|||
await this.loadFormData() |
|||
this.initLoading = true |
|||
|
|||
}, |
|||
|
|||
|
|||
//加载form |
|||
async loadFormData () { |
|||
this.startLoading() |
|||
//const url = "https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/epmetuser/useradvice/advicedetail" |
|||
const url = '/epmetuser/useradvice/advicedetail' |
|||
|
|||
const params = { |
|||
adviceId: this.adviceId |
|||
} |
|||
const { data, code, msg } = await requestPost(url, params) |
|||
if (code === 0) { |
|||
// this.endLoading() |
|||
if (data) { |
|||
this.adviceData = data |
|||
if ( |
|||
this.adviceData.replyContent === '' || |
|||
this.adviceData.replyContent === null |
|||
) { |
|||
this.showConfirm = true |
|||
} else { |
|||
this.showConfirm = false |
|||
} |
|||
} |
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
this.endLoading() |
|||
}, |
|||
|
|||
|
|||
async handleComfirm () { |
|||
if ( |
|||
this.adviceData.replyContent === '' || |
|||
this.adviceData.replyContent === null |
|||
) { |
|||
this.$message.warning('请填写回复内容') |
|||
return |
|||
} |
|||
|
|||
this.startLoading() |
|||
// let url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/epmetuser/useradvice/replyadvice' |
|||
let url = '/epmetuser/useradvice/replyadvice' |
|||
// 表单对象 |
|||
|
|||
let params = { |
|||
adviceId: this.adviceData.adviceId, |
|||
replyContent: this.adviceData.replyContent, |
|||
govContent: this.adviceData.govContent, |
|||
govImgList: this.adviceData.govImgList |
|||
} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
this.endLoading() |
|||
if (code === 0) { |
|||
|
|||
if (data) { |
|||
|
|||
this.$message.success('回复成功') |
|||
|
|||
this.$emit('replayOk') |
|||
} |
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
|
|||
// window.app.ajax.post( |
|||
// url, |
|||
// _data, |
|||
// (data, rspMsg) => { |
|||
// this.endLoading() |
|||
// this.$message.success('回复成功') |
|||
// this.diaCancel() |
|||
// this.$emit('refresh') |
|||
// }, |
|||
// (rspMsg, data) => { |
|||
// this.endLoading() |
|||
// this.$message.error(rspMsg) |
|||
// } |
|||
// ) |
|||
}, |
|||
|
|||
removePic (file, fileList) { |
|||
this.adviceData.govImgList.splice( |
|||
this.adviceData.govImgList.findIndex((item) => item === file.url), |
|||
1 |
|||
) |
|||
this.replayImgList.splice( |
|||
this.replayImgList.findIndex((item) => item.uid === file.uid), |
|||
1 |
|||
) |
|||
}, |
|||
exceedPic () { |
|||
this.$message.warning('最多上传3张预览图片') |
|||
}, |
|||
handleSuccess (response, file, fileList) { |
|||
this.replayImgList.push(file) |
|||
this.adviceData.govImgList.push(response.data.url) |
|||
}, |
|||
|
|||
handleCancle () { |
|||
this.$emit('diaDetailClose') |
|||
|
|||
}, |
|||
|
|||
|
|||
// 开启加载动画 |
|||
startLoading () { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: '正在加载……', // 加载中需要显示的文字 |
|||
background: 'rgba(0,0,0,.7)' // 背景颜色 |
|||
}) |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading () { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close() |
|||
} |
|||
} |
|||
}, |
|||
computed: { |
|||
|
|||
|
|||
}, |
|||
props: { |
|||
|
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped > |
|||
@import "@/assets/scss/modules/management/detail-main.scss"; |
|||
</style> |
|||
<style lang="scss" scoped > |
|||
.m-info { |
|||
padding-left: 0px; |
|||
} |
|||
.upload_tip { |
|||
color: #7a7a7a; |
|||
margin: 10px 0 0 0; |
|||
} |
|||
.div-tooltip { |
|||
margin-left: 10px; |
|||
color: red; |
|||
} |
|||
.input_tip { |
|||
color: #e60000; |
|||
margin: 10px 0 0 0; |
|||
} |
|||
|
|||
.img_icon { |
|||
margin-right: 10px; |
|||
width: 70px; |
|||
height: 70px; |
|||
} |
|||
</style> |
|||
|
|||
<style lang="scss"> |
|||
.el-dialog__body { |
|||
padding: 0 10px 20px !important; |
|||
} |
|||
|
|||
.hide { |
|||
.el-upload--picture-card { |
|||
display: none !important; |
|||
} |
|||
} |
|||
</style> |
|||
|
|||
@ -0,0 +1,449 @@ |
|||
<template> |
|||
<div class="div_main"> |
|||
|
|||
<div class="div_search"> |
|||
<el-form :inline="true" |
|||
:model="formData" |
|||
ref="ref_searchform" |
|||
:label-width="'80px'"> |
|||
<div> |
|||
|
|||
<el-form-item label="所属组织" |
|||
prop="gridId"> |
|||
|
|||
<el-cascader class="customer_cascader" |
|||
size="small" |
|||
ref="myCascader" |
|||
v-model="agencyIdArray" |
|||
:options="orgOptions" |
|||
:props="orgOptionProps" |
|||
:show-all-levels="false" |
|||
@change="handleChangeAgency"></el-cascader> |
|||
|
|||
</el-form-item> |
|||
<el-form-item label="问题分类" |
|||
prop="adviceType"> |
|||
<el-select v-model="formData.adviceType" |
|||
placeholder="请选择" |
|||
size="small" |
|||
clearable |
|||
class="item_width_2"> |
|||
<el-option v-for="item in adviceTypeArray" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="回复状态" |
|||
prop="isReply"> |
|||
<el-select class="item_width_2" |
|||
v-model="formData.isReply" |
|||
placeholder="全部" |
|||
size="small" |
|||
clearable> |
|||
<el-option v-for="item in statusArray" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
|
|||
</el-form-item> |
|||
|
|||
<el-form-item label="发生时间" |
|||
prop="startTime"> |
|||
<el-date-picker v-model="formData.startTime" |
|||
:picker-options="startPickerOptions" |
|||
class="item_width_2" |
|||
size="small" |
|||
type="datetime" |
|||
value-format="yyyy-MM-dd HH:mm:ss" |
|||
placeholder="开始时间"> |
|||
</el-date-picker> |
|||
<span class="data-tag">至</span> |
|||
<el-date-picker v-model="formData.endTime" |
|||
:picker-options="endPickerOptions" |
|||
class="item_width_2 data-tag" |
|||
size="small" |
|||
type="datetime" |
|||
value-format="yyyy-MM-dd HH:mm:ss" |
|||
placeholder="结束时间"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
|
|||
<el-button style="margin-left:30px" |
|||
size="small" |
|||
class="diy-button--search" |
|||
@click="handleSearch">查询</el-button> |
|||
<el-button style="margin-left:10px" |
|||
size="small" |
|||
class="diy-button--reset" |
|||
@click="resetSearch">重置</el-button> |
|||
</div> |
|||
</el-form> |
|||
</div> |
|||
|
|||
<div class="div_table"> |
|||
|
|||
<el-table :data="tableData" |
|||
border |
|||
v-loading="tableLoading" |
|||
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}" |
|||
class="table" |
|||
style="width: 100%" |
|||
:height="maxTableHeight"> |
|||
|
|||
<el-table-column label="序号" |
|||
fixed="left" |
|||
type="index" |
|||
align="center" |
|||
width="50" /> |
|||
|
|||
<el-table-column prop="gridName" |
|||
min-width="100" |
|||
align="center" |
|||
label="所属网格" |
|||
:show-overflow-tooltip="true"> |
|||
</el-table-column> |
|||
<el-table-column prop="adviceType" |
|||
label="建议分类" |
|||
min-width="140" |
|||
align="center" |
|||
:show-overflow-tooltip="true"> |
|||
<template slot-scope="scope"> |
|||
<p style="text-align:center" |
|||
v-for="(item,index) in scope.row.adviceTypeArray" |
|||
:key="index">{{item}}</p> |
|||
|
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="phone" |
|||
label="联系电话" |
|||
width="120" |
|||
align="center" |
|||
:show-overflow-tooltip="true"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="adviceTime" |
|||
align="center" |
|||
width="170" |
|||
label="建议时间" |
|||
:show-overflow-tooltip="true"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="adviceContent" |
|||
align="center" |
|||
min-width="200" |
|||
:show-overflow-tooltip="true" |
|||
label="建议内容"> |
|||
<template slot-scope="scope"> |
|||
<div class="myNote">{{scope.row.adviceContent}}</div> |
|||
|
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<el-table-column fixed="right" |
|||
label="操作" |
|||
align="center" |
|||
width="100"> |
|||
<template slot-scope="scope"> |
|||
|
|||
<el-button @click="handleWatch(scope.row)" |
|||
type="text" |
|||
size="small">查看</el-button> |
|||
|
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<div> |
|||
<el-pagination @size-change="handleSizeChange" |
|||
@current-change="handleCurrentChange" |
|||
:current-page.sync="pageNo" |
|||
:page-sizes="[20, 50, 100, 200]" |
|||
:page-size="parseInt(pageSize)" |
|||
layout="sizes, prev, pager, next, total" |
|||
:total="total"> |
|||
</el-pagination> |
|||
</div> |
|||
|
|||
</div> |
|||
<!-- 修改弹出框 --> |
|||
<el-dialog :visible.sync="detailShow" |
|||
:close-on-click-modal="false" |
|||
:close-on-press-escape="false" |
|||
:title="'建议详情'" |
|||
width="1150px" |
|||
top="5vh" |
|||
class="dialog-h" |
|||
@closed="detailFormCancle"> |
|||
<feedback-detail ref="ref_form_detail" |
|||
@replayOk="replayOk" |
|||
@diaDetailClose="detailFormCancle"></feedback-detail> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import nextTick from "dai-js/tools/nextTick"; |
|||
import { mapGetters } from "vuex"; |
|||
import feedbackDetail from './feedbackDetail' |
|||
|
|||
import axios from "axios"; |
|||
|
|||
export default { |
|||
components: { feedbackDetail }, |
|||
|
|||
data () { |
|||
let endDisabledDate = (time) => {//这个关键属性我们一定要写在data的里面并且return的外面,这是动态改变区间的关键 |
|||
let nowData = Date.now() |
|||
if (this.formData.startTime) { |
|||
let startTime = new Date(this.formData.startTime) |
|||
return time.getTime() > nowData || time.getTime() < startTime || time.getTime() === startTime |
|||
} else { |
|||
return time.getTime() > nowData |
|||
} |
|||
|
|||
} |
|||
let startDisabledDate = (time) => {//这个关键属性我们一定要写在data的里面并且return的外面,这是动态改变区间的关键 |
|||
let nowData = Date.now() |
|||
return time.getTime() > nowData |
|||
} |
|||
|
|||
return { |
|||
tableLoading: false, |
|||
|
|||
user: {}, |
|||
|
|||
agencyIdArray: [], |
|||
orgOptions: [], |
|||
orgOptionProps: { |
|||
multiple: false, |
|||
value: 'agencyId', |
|||
label: 'agencyName', |
|||
children: 'subAgencyList', |
|||
checkStrictly: true |
|||
}, |
|||
tableData: [], |
|||
|
|||
statusArray: [ |
|||
{ |
|||
value: '0', |
|||
label: '未回复' |
|||
}, |
|||
{ |
|||
value: '1', |
|||
label: '已回复' |
|||
} |
|||
], |
|||
adviceTypeArray: [ |
|||
{ |
|||
value: 'gov', |
|||
label: '政府业务建议' |
|||
}, |
|||
{ |
|||
value: 'software', |
|||
label: '软件功能及体验问题' |
|||
} |
|||
], |
|||
|
|||
formData: { |
|||
customerId: '',//客户id 不填查询所有 |
|||
agencyId: '',//组织id 不填查询所有 |
|||
gridId: '', |
|||
isReply: '',//是否被回复,0未回复,1回复, 传空查询所有 |
|||
adviceType: '',//问题类型 gov政府,software软件 ,传空查询全部,单选 |
|||
startTime: '',//开始时间 可不填 |
|||
endTime: '',//结束时间 可不填 |
|||
|
|||
}, |
|||
|
|||
pageNo: 1, |
|||
pageSize: window.localStorage.getItem("pageSize") || 20, |
|||
total: 1, |
|||
endPickerOptions: { |
|||
disabledDate: endDisabledDate |
|||
}, |
|||
startPickerOptions: { |
|||
disabledDate: startDisabledDate |
|||
}, |
|||
eventId: '', |
|||
|
|||
eventDetailData: {}, |
|||
detailShow: false, |
|||
|
|||
}; |
|||
}, |
|||
computed: { |
|||
maxTableHeight () { |
|||
return this.$store.state.inIframe |
|||
? this.clientHeight - 320 + this.iframeHeigh |
|||
: this.clientHeight - 320; |
|||
}, |
|||
...mapGetters(["clientHeight", "iframeHeight"]), |
|||
}, |
|||
watch: { |
|||
// "formData.endTime": function (val) { |
|||
// if (val && val != '') { |
|||
// let arrayTemp = val.split(' ') |
|||
// this.formData.endTime = arrayTemp[0] + ' 23:59:59' |
|||
// } |
|||
|
|||
// }, |
|||
}, |
|||
mounted () { |
|||
console.log(this.$store.state) |
|||
this.user = this.$store.state.user |
|||
|
|||
this.formData.customerId = this.user.customerId |
|||
this.formData.agencyId = this.user.agencyId |
|||
|
|||
this.getOrgTreeList(); |
|||
this.getTableData(); |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
handleChangeAgency (val) { |
|||
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data |
|||
if (obj) { |
|||
if (obj.level === 'grid') { |
|||
this.formData.gridId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; |
|||
this.formData.agencyId = '' |
|||
} else { |
|||
this.formData.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; |
|||
this.formData.gridId = '' |
|||
} |
|||
|
|||
} else { |
|||
this.formData.agencyId = this.user.agencyId |
|||
this.formData.gridId = '' |
|||
} |
|||
|
|||
}, |
|||
|
|||
handleSearch (val) { |
|||
console.log(this.formData); |
|||
this.pageNo = 1; |
|||
this.getTableData(); |
|||
}, |
|||
|
|||
getOrgTreeList () { |
|||
const { user } = this.$store.state |
|||
this.$http |
|||
.post('/gov/org/customeragency/agencygridtree', {}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg) |
|||
} else { |
|||
console.log('获取组织树成功', res.data) |
|||
this.orgOptions = [] |
|||
this.orgOptions.push(res.data) |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error('网络错误') |
|||
}) |
|||
}, |
|||
|
|||
async handleWatch (row) { |
|||
this.detailShow = true |
|||
|
|||
this.$nextTick(() => { |
|||
this.$refs.ref_form_detail.initForm(row.id) |
|||
}) |
|||
}, |
|||
|
|||
replayOk () { |
|||
this.detailShow = false |
|||
this.getTableData() |
|||
|
|||
}, |
|||
detailFormCancle () { |
|||
|
|||
this.detailShow = false |
|||
}, |
|||
|
|||
async getTableData () { |
|||
this.tableLoading = true |
|||
const url = "/epmetuser/useradvice/advicelist"; |
|||
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/list"; |
|||
const { pageSize, pageNo, formData } = this; |
|||
const { data, code, msg } = await requestPost(url, { |
|||
pageSize, |
|||
pageNo, |
|||
...formData, |
|||
}); |
|||
|
|||
this.tableLoading = false |
|||
if (code === 0) { |
|||
|
|||
this.total = data.total || 0; |
|||
this.tableData = data.list |
|||
|
|||
this.tableData.forEach(element => { |
|||
element.adviceTypeArray = element.adviceType.split("\\n") |
|||
|
|||
}) |
|||
|
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
|
|||
handleSizeChange (val) { |
|||
|
|||
this.pageSize = val; |
|||
window.localStorage.setItem("pageSize", val); |
|||
this.getTableData(); |
|||
}, |
|||
handleCurrentChange (val) { |
|||
|
|||
this.pageNo = val; |
|||
this.getTableData(); |
|||
}, |
|||
|
|||
resetSearch () { |
|||
this.agencyIdArray = [] |
|||
this.formData = { |
|||
customerId: this.user.customerId, |
|||
agencyId: this.user.agencyId,//组织id 不填默认工作人员所属组织id |
|||
gridId: '', |
|||
isReply: '',//是否被回复,0未回复,1回复, 传空查询所有 |
|||
adviceType: '',//问题类型 gov政府,software软件 ,传空查询全部,单选 |
|||
startTime: '',//开始时间 可不填 |
|||
endTime: '',//结束时间 可不填 |
|||
} |
|||
|
|||
|
|||
this.pageNo = 1 |
|||
this.getTableData(); |
|||
|
|||
}, |
|||
|
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/buttonstyle.scss"; |
|||
@import "@/assets/scss/modules/management/list-main.scss"; |
|||
@import "@/assets/scss/modules/shequzhili/event-info.scss"; |
|||
.div_search { |
|||
.item_width_2 { |
|||
width: 200px; |
|||
} |
|||
} |
|||
.myNote { |
|||
display: -webkit-box; |
|||
text-overflow: ellipsis; |
|||
overflow: hidden; |
|||
-webkit-line-clamp: 3; |
|||
-webkit-box-orient: vertical; |
|||
} |
|||
</style> |
|||
Loading…
Reference in new issue