|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 575 B |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
@ -0,0 +1,86 @@ |
|||
.g-main{ |
|||
width: 100%; |
|||
height: 100%; |
|||
display: flex; |
|||
flex-direction: column; |
|||
padding:25px 16px; |
|||
box-sizing: border-box; |
|||
.top{ |
|||
display: flex; |
|||
height: calc(50vh - 104px); |
|||
.left{ |
|||
width: 320px; |
|||
height: 100%; |
|||
margin-right:16px; |
|||
overflow-y: scroll; |
|||
} |
|||
.right{ |
|||
flex: 1; |
|||
overflow-y: scroll; |
|||
} |
|||
} |
|||
.bottom{ |
|||
height: calc(50vh - 104px); |
|||
margin-top: 16px; |
|||
display: flex; |
|||
.left{ |
|||
width: 320px; |
|||
height: 100%; |
|||
margin-right:16px; |
|||
overflow-y: scroll; |
|||
|
|||
} |
|||
.right{ |
|||
flex: 1; |
|||
overflow-y: scroll; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
} |
|||
} |
|||
|
|||
} |
|||
.card{ |
|||
background-color: #fff; |
|||
padding: 10px 16px 16px; |
|||
overflow: hidden; |
|||
height: 100%; |
|||
display: flex; |
|||
flex-direction: column; |
|||
.title{ |
|||
font-family: PingFang SC; |
|||
font-weight: bold; |
|||
color: #333333; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
img{ |
|||
width: 24px; |
|||
height: 24px; |
|||
} |
|||
} |
|||
.bgC{ |
|||
flex: 1; |
|||
background-color: #f5f7fa; |
|||
border-radius: 2px; |
|||
overflow-y: scroll; |
|||
display: flex; |
|||
flex-direction: column; |
|||
padding: 0 16px; |
|||
.item{ |
|||
margin-top: 19px; |
|||
.value{ |
|||
color: #333333; |
|||
font-family: PingFang SC; |
|||
font-weight: 400; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.gray{ |
|||
color: #000000; |
|||
opacity: 0.65; |
|||
} |
|||
.bgf{ |
|||
background-color: #fff ; |
|||
margin-top: 0 !important; |
|||
} |
|||
@ -0,0 +1,20 @@ |
|||
|
|||
const huaXiang ={ |
|||
state: { |
|||
userInfo:null || JSON.parse(localStorage.getItem('huaX')) |
|||
}, |
|||
mutations: { |
|||
setData(state, payload) { |
|||
state.userInfo = payload; |
|||
} |
|||
}, |
|||
actions: { |
|||
saveData({ commit }, payload) { |
|||
console.log(payload,'vueX接参'); |
|||
commit('setData', payload); |
|||
localStorage.setItem('huaX', JSON.stringify(payload)); |
|||
} |
|||
} |
|||
}; |
|||
|
|||
export default huaXiang; |
|||
@ -0,0 +1,99 @@ |
|||
<template> |
|||
<div class=""> |
|||
<div v-for="(item, index) in familyList" :key="index" class="familylist"> |
|||
<div :class="['item', {'bgf':index== 0 }] "> |
|||
<div> |
|||
<img v-if="index == 0 && userInfo.gender == '1'" src="../../../../assets/images/index/nan.png" alt="" |
|||
width="56px"> |
|||
<img v-if="index == 0 && userInfo.gender == '2'" src="../../../../assets/images/index/nv.png" alt="" |
|||
width="56px"> |
|||
<span class="name">{{ item.name }}</span>({{ item.houseHolderRel == "本人" ? "户主" : item.houseHolderRel ? item.houseHolderRel : '--' |
|||
}}) |
|||
</div> |
|||
<div> |
|||
<span>人户状况:</span>{{item.householdSituation||'--'}} |
|||
</div> |
|||
<div> |
|||
<span>居民分类:</span>{{item.resiCategory||'--'}} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { requestPost, requestGet } from '@/js/dai/request' |
|||
export default { |
|||
//数据 |
|||
data() { |
|||
return { |
|||
familyList: [] |
|||
}; |
|||
}, |
|||
//创建前 |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
console.log(this.userInfo); |
|||
this.getFamilyRelationshipList() |
|||
}, |
|||
props: { |
|||
userInfo: { |
|||
type: Object, |
|||
default: () => { } |
|||
} |
|||
}, |
|||
//方法 |
|||
methods: { |
|||
async getFamilyRelationshipList() { |
|||
let url = `/actual/base/peopleRoomOverview/getFamilyRelationshipList?type=0&resid=` + this.userInfo.resiId |
|||
let { code, data, msg } = await requestPost(url) |
|||
if (code == 0) { |
|||
// 找到符合条件的对象的索引 |
|||
const index = data.findIndex(item => item.name == this.userInfo.name); |
|||
// 如果找到符合条件的对象 |
|||
if (index !== -1) { |
|||
// 移除这个对象并将其放到数组的第一个位置 |
|||
const [item] = data.splice(index, 1); |
|||
data.unshift(item); |
|||
} |
|||
for(let i in data){ |
|||
if(data[i].classificationOfInhabitantsList){ |
|||
data[i].resiCategory = data[i].classificationOfInhabitantsList.join(',') |
|||
} |
|||
} |
|||
this.familyList = data |
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
} |
|||
}, |
|||
//子组件注册 |
|||
components: {}, |
|||
//计算 |
|||
computed: {}, |
|||
//监听 |
|||
watch: {}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/pages/huaxiang"; |
|||
@import "@/assets/scss/modules/management/list-main.scss"; |
|||
.item{ |
|||
padding: 0 15px; |
|||
&>div{ |
|||
margin-top: 18px; |
|||
.name{ |
|||
font-family: PingFang SC; |
|||
font-weight: bold; |
|||
color: #000000; |
|||
} |
|||
} |
|||
} |
|||
.bgf>:nth-child(1){ |
|||
margin: 0!important; |
|||
padding-top: 16px; |
|||
box-sizing: border-box; |
|||
} |
|||
</style> |
|||
@ -0,0 +1,79 @@ |
|||
<template> |
|||
<div class=''> |
|||
<div class="item f-font14"> |
|||
<span class="label gray">居住地址:</span><span class="value">{{ resiInfo.fullName||"--" }}</span> |
|||
</div> |
|||
<div class="item f-font14"> |
|||
<span class="label gray">联系电话:</span><span class="value">{{ resiInfo.mobile||"--" }}</span> |
|||
</div> |
|||
<div class="item f-font14"> |
|||
<span class="label gray">所属网格:</span><span class="value">{{ resiInfo.gridName||"--" }}</span> |
|||
</div> |
|||
<div class="item f-font14"> |
|||
<span class="label gray">入户状况:</span><span class="value">{{ resiInfo.householdSituation||"--" }}</span> |
|||
</div> |
|||
<div class="item f-font14"> |
|||
<!-- 居住类型,与子女同住,空巢,独居,其他 字段没有返回--> |
|||
<span class="label gray">居住类型:</span><span class="value">{{ resiInfo.resideSituation || "--" }}</span> |
|||
</div> |
|||
<div class="item f-font14"> |
|||
<span class="label gray">家庭预警:</span> |
|||
<span class="value">{{resiInfo.riskyFlag === '1' ? '满意度风险家庭' : '--'}}</span> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { requestPost, requestGet } from '@/js/dai/request' |
|||
export default { |
|||
//数据 |
|||
data() { |
|||
return { |
|||
resiInfo: {} |
|||
}; |
|||
}, |
|||
//创建前 |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
this.getPersonalFile() |
|||
}, |
|||
props: { |
|||
resiId: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
}, |
|||
watch: { |
|||
resiId: { |
|||
handler(newVal, oldVal) { |
|||
this.getPersonalFile() |
|||
} |
|||
} |
|||
}, |
|||
//方法 |
|||
methods: { |
|||
async getPersonalFile() { |
|||
let url = `/actual/base/peopleRoomOverview/getPersonalFile?resid=` + this.resiId |
|||
let { code, data, msg } = await requestPost(url) |
|||
if (code == 0) { |
|||
this.resiInfo = data |
|||
console.log(this.resiInfo); |
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
} |
|||
}, |
|||
//子组件注册 |
|||
components: {}, |
|||
//计算 |
|||
computed: {}, |
|||
//监听 |
|||
watch: {}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/pages/huaxiang"; |
|||
@import "@/assets/scss/modules/management/list-main.scss"; |
|||
</style> |
|||
@ -0,0 +1,104 @@ |
|||
<template> |
|||
<div class="enjoy-service"> |
|||
<div class="enjoy-service-item" v-for="(item, index) in data"> |
|||
<div class="num">+{{ item.classificationNum }}</div> |
|||
<div class="info"> |
|||
<div class="title">{{ item.classification }}</div> |
|||
<div class="time">{{ item.recordTime }}</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
//数据 |
|||
data() { |
|||
return { |
|||
data: [], |
|||
}; |
|||
}, |
|||
//创建前 |
|||
created() { |
|||
this.getData(); |
|||
}, |
|||
props: { |
|||
resiId: { |
|||
type: String, |
|||
default: '' |
|||
} |
|||
}, |
|||
//方法 |
|||
methods: { |
|||
getData() { |
|||
this.data = []; |
|||
this.$http |
|||
.get("/actual/base/peopleRoomOverview/recorHistory") |
|||
.then(({ data: res }) => { |
|||
if (res.code == 0) { |
|||
this.data = res.data; |
|||
} |
|||
}); |
|||
}, |
|||
}, |
|||
//子组件注册 |
|||
components: {}, |
|||
//计算 |
|||
computed: {}, |
|||
//监听 |
|||
watch: {}, |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
.enjoy-service { |
|||
padding-left: 26px; |
|||
margin-top: 12px; |
|||
height: 100%; |
|||
overflow-y: scroll; |
|||
} |
|||
|
|||
.enjoy-service-item { |
|||
color: #333333; |
|||
display: flex; |
|||
padding: 14px 16px 14px; |
|||
margin-bottom: 8px; |
|||
background: #fff; |
|||
|
|||
&:hover { |
|||
background: #f5f7fa !important; |
|||
color: #0056D6 !important; |
|||
|
|||
*, |
|||
*::before, |
|||
*::after { |
|||
// 这将会选择所有子元素和伪元素 |
|||
color: #0056D6 !important; |
|||
} |
|||
} |
|||
|
|||
.num { |
|||
font-size: 24px; |
|||
font-weight: 500; |
|||
line-height: 22px; |
|||
color: #000000; |
|||
display: flex; |
|||
align-items: center; |
|||
} |
|||
|
|||
.info { |
|||
font-size: 14px; |
|||
margin-left: 40px; |
|||
|
|||
.title { |
|||
font-weight: 500; |
|||
margin-bottom: 10px; |
|||
} |
|||
|
|||
.time { |
|||
font-weight: 400; |
|||
color: #000000; |
|||
opacity: 0.65; |
|||
} |
|||
} |
|||
} |
|||
</style> |
|||
@ -0,0 +1,26 @@ |
|||
<!-- 房屋模块用 --> |
|||
<template> |
|||
<div class=''> |
|||
|
|||
</div> |
|||
</template> |
|||
<!-- --> |
|||
<script> |
|||
export default{ |
|||
data(){ |
|||
return{}; |
|||
}, |
|||
//创建前 |
|||
created(){}, |
|||
//方法 |
|||
methods:{}, |
|||
//子组件注册 |
|||
components:{}, |
|||
//计算 |
|||
computed:{}, |
|||
//监听 |
|||
watch:{}, |
|||
} |
|||
</script> |
|||
<style lang="less" scoped> |
|||
</style> |
|||
@ -0,0 +1,286 @@ |
|||
<template> |
|||
<div class=''> |
|||
<el-tabs v-model="topTabs" @tab-click="tabClick"> |
|||
<el-tab-pane :label="complainLabel" name="12345"> |
|||
<complain :tableData="complainList" /> |
|||
<el-row type="flex"> |
|||
<el-col :span="12" align="left"> |
|||
<div style="margin-top: 25px;">共{{ complainTotal }}条</div> |
|||
</el-col> |
|||
<el-col :span="12" align="right"> |
|||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" |
|||
:current-page.sync="pageNo" :page-size="pageSize" layout="prev, pager, next, jumper" |
|||
:total="complainTotal"> |
|||
</el-pagination></el-col> |
|||
</el-row> |
|||
</el-tab-pane> |
|||
<el-tab-pane :label="shengLabel" name="sheng"> |
|||
<sheng :tableData="shengList" /> |
|||
<el-row type="flex"> |
|||
<el-col :span="12" align="left"> |
|||
<div style="margin-top: 25px;">共{{ shengTotal }}条</div> |
|||
</el-col> |
|||
<el-col :span="12" align="right"> |
|||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" |
|||
:current-page.sync="pageNo" :page-size="pageSize" layout="prev, pager, next, jumper" |
|||
:total="shengTotal"> |
|||
</el-pagination></el-col> |
|||
</el-row> |
|||
</el-tab-pane> |
|||
<el-tab-pane :label="shequLabel" name="shequ"> |
|||
<shequ :tableData="shequList" /> |
|||
<el-row type="flex"> |
|||
<el-col :span="12" align="left"> |
|||
<div style="margin-top: 25px;">共{{ shequTotal }}条</div> |
|||
</el-col> |
|||
<el-col :span="12" align="right"> |
|||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" |
|||
:current-page.sync="pageNo" :page-size="pageSize" layout="prev, pager, next, jumper" |
|||
:total="shequTotal"> |
|||
</el-pagination></el-col> |
|||
</el-row> |
|||
</el-tab-pane> |
|||
<el-tab-pane :label="shijianLabel" name="shijian"> |
|||
<shijian :tableData="shijianList" /> |
|||
<el-row type="flex"> |
|||
<el-col :span="12" align="left"> |
|||
<div style="margin-top: 25px;">共{{ shijianTotal }}条</div> |
|||
</el-col> |
|||
<el-col :span="12" align="right"> |
|||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" |
|||
:current-page.sync="pageNo" :page-size="pageSize" layout="prev, pager, next, jumper" |
|||
:total="shijianTotal"> |
|||
</el-pagination></el-col> |
|||
</el-row> |
|||
</el-tab-pane> |
|||
<el-tab-pane :label="xuqiuLabel" name="xuqiu"> |
|||
<xuqiu :tableData="xuqiuList" /> |
|||
<el-row type="flex"> |
|||
<el-col :span="12" align="left"> |
|||
<div style="margin-top: 25px;">共{{ xuqiuTotal }}条</div> |
|||
</el-col> |
|||
<el-col :span="12" align="right"> |
|||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" |
|||
:current-page.sync="pageNo" :page-size="pageSize" layout="prev, pager, next, jumper" |
|||
:total="xuqiuTotal"> |
|||
</el-pagination></el-col> |
|||
</el-row> |
|||
</el-tab-pane> |
|||
<el-tab-pane :label="fuwuLabel" name="fuwu"> |
|||
<div style="display: flex; flex-direction: column; height: 100%;"> |
|||
<!-- 你的表格组件将填充所有可用空间 --> |
|||
<fuwu :tableData="fuwuList" style="flex: 1; overflow: auto;" /> |
|||
<!-- 你的页码部分保持恒定的高度 --> |
|||
<el-row type="flex"> |
|||
<el-col :span="12" align="left"> |
|||
<div style="margin-top: 25px;">共{{ fuwuTotal }}条</div> |
|||
</el-col> |
|||
<el-col :span="12" align="right"> |
|||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" |
|||
:current-page.sync="pageNo" :page-size="pageSize" layout="prev, pager, next, jumper" |
|||
:total="fuwuTotal"> |
|||
</el-pagination> |
|||
</el-col> |
|||
</el-row> |
|||
</div> |
|||
</el-tab-pane> |
|||
|
|||
</el-tabs> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import complain from "./table/complain"; |
|||
import sheng from "./table/sheng"; |
|||
import shequ from "./table/shequ"; |
|||
import shijian from "./table/shijian"; |
|||
import xuqiu from "./table/xuqiu"; |
|||
import fuwu from "./table/fuwu"; |
|||
export default { |
|||
//数据 |
|||
data() { |
|||
return { |
|||
topTabs: '12345', |
|||
|
|||
complainTotal: 0, |
|||
complainList: [], |
|||
complainLabel: '', |
|||
|
|||
shengLabel: '', |
|||
shengList: [], |
|||
shengTotal: 0, |
|||
|
|||
shequLabel: '', |
|||
shequList: [], |
|||
shequTotal: 0, |
|||
|
|||
shijianLabel: '', |
|||
shijianList: [], |
|||
shijianTotal: 0, |
|||
|
|||
xuqiuLabel: '', |
|||
xuqiuList: [], |
|||
xuqiuTotal: 0, |
|||
|
|||
fuwuLabel: '', |
|||
fuwuList: [], |
|||
fuwuTotal: 0, |
|||
|
|||
pageNo: 1, |
|||
pageSize: 20 |
|||
}; |
|||
}, |
|||
//创建前 |
|||
created() { }, |
|||
mounted() { |
|||
this.getComplainList() |
|||
this.getShengList() |
|||
this.getShequList() |
|||
this.getshijianList() |
|||
this.getxuqiuList() |
|||
this.getfuwuList() |
|||
}, |
|||
props: { |
|||
userInfo: { |
|||
type: Object, |
|||
default: { |
|||
resiId: '' |
|||
} |
|||
} |
|||
}, |
|||
//方法 |
|||
methods: { |
|||
tabClick(index) { |
|||
|
|||
}, |
|||
handleSizeChange() { |
|||
|
|||
}, |
|||
handleCurrentChange() { |
|||
|
|||
}, |
|||
getComplainList() { |
|||
let parm = { |
|||
residList: [this.userInfo.resiId], |
|||
pageNo: this.pageNo, |
|||
pageSize: this.pageSize |
|||
} |
|||
const statusArr = { |
|||
processing: "处理中", |
|||
closed_case: "已办结", |
|||
}; |
|||
const marktypes = ["普通事件", "难点读点", "矛盾纠纷", "自身问题"]; |
|||
|
|||
// 省满意度列表 |
|||
this.$http.post("/actual/base/peopleRoomOverview/eventPageList", parm).then(({ data: res }) => { |
|||
this.complainList = res.data.list.map((item) => { |
|||
return { |
|||
...item, |
|||
status: item.status ? statusArr[item.status] : null, |
|||
marktype: marktypes[item.marktype], |
|||
}; |
|||
}); |
|||
this.complainTotal = res.data.total; |
|||
|
|||
this.complainLabel = `12345投诉(${this.complainTotal})` |
|||
}); |
|||
}, |
|||
getShengList() { |
|||
let parm = { |
|||
residList: [this.userInfo.resiId], |
|||
pageNo: this.pageNo, |
|||
pageSize: this.pageSize |
|||
} |
|||
// 省满意度列表 |
|||
this.$http.post("/actual/base/peopleRoomOverview/provincialSatisfactionPageList", parm).then(({ data: res }) => { |
|||
this.shengList = res.data; |
|||
this.shengTotal = res.data.length; |
|||
this.shengLabel = `省满意度调查(${this.shengTotal})` |
|||
}); |
|||
}, |
|||
getShequList() { |
|||
let parm = { |
|||
residList: [this.userInfo.resiId], |
|||
pageNo: this.pageNo, |
|||
pageSize: this.pageSize |
|||
} |
|||
const completeFlags = { |
|||
"-2": "未知", |
|||
"-1": "不接受回访", |
|||
0: "接受回访/待回访", |
|||
1: "已回访", |
|||
}; |
|||
this.$http.post("/actual/base/peopleRoomOverview/communitySatisfactionPageList", parm).then(({ data: res }) => { |
|||
this.shequList = res.data.map((item) => { |
|||
return { |
|||
...item, |
|||
completeFlag: completeFlags[item.completeFlag], |
|||
}; |
|||
}); |
|||
this.shequTotal = this.shequList.length; |
|||
this.shequLabel = `社区满意度自查(${this.shequTotal})` |
|||
}); |
|||
}, |
|||
getshijianList() { |
|||
let parm = { |
|||
residList: [this.userInfo.resiId], |
|||
pageNo: this.pageNo, |
|||
pageSize: this.pageSize |
|||
} |
|||
const marktypes = ["普通事件", "难点读点", "矛盾纠纷", "自身问题"]; |
|||
this.$http.post("/actual/base/peopleRoomOverview/eventPageList", parm).then(({ data: res }) => { |
|||
this.shijianList = res.data.list.map((item) => { |
|||
return { |
|||
...item, |
|||
status: item.status ? statusArr[item.status] : null, |
|||
marktype: marktypes[item.marktype], |
|||
}; |
|||
}); |
|||
this.shijianTotal = this.shijianList.length; |
|||
this.shijianLabel = `上报事件(${this.shijianTotal})` |
|||
}); |
|||
}, |
|||
getxuqiuList() { |
|||
let parm = { |
|||
residList: [this.userInfo.resiId], |
|||
pageNo: this.pageNo, |
|||
pageSize: this.pageSize |
|||
} |
|||
// 省满意度列表 |
|||
this.$http.post("/actual/base/peopleRoomOverview/demandOfResidentsPageList", parm).then(({ data: res }) => { |
|||
this.xuqiuList = res.data.map((item) => { |
|||
return { |
|||
...item, |
|||
}; |
|||
}); |
|||
this.xuqiuTotal = this.xuqiuList.length; |
|||
this.xuqiuLabel = `居民需求(${this.xuqiuTotal})` |
|||
}); |
|||
}, |
|||
getfuwuList() { |
|||
let parm = { |
|||
residList: [this.userInfo.resiId], |
|||
pageNo: this.pageNo, |
|||
pageSize: this.pageSize |
|||
} |
|||
this.$http.post("/actual/base/peopleRoomOverview/communityServicePageList", parm).then(({ data: res }) => { |
|||
this.fuwuList = res.data.map((item) => { |
|||
return { |
|||
...item, |
|||
}; |
|||
}); |
|||
this.fuwuTotal = this.fuwuList.length; |
|||
this.fuwuLabel = `社区服务(${this.fuwuTotal})` |
|||
}); |
|||
}, |
|||
}, |
|||
//子组件注册 |
|||
components: { complain, sheng, fuwu, shijian, xuqiu, shequ }, |
|||
//计算 |
|||
computed: {}, |
|||
//监听 |
|||
watch: {}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang="less" scoped></style> |
|||
@ -0,0 +1,154 @@ |
|||
<template> |
|||
<div class="table"> |
|||
<el-table v-if="tableData.length > 0" :data="tableData" max-height="214px" height="214px"> |
|||
<el-table-column label="序号" type="index" width="80" /> |
|||
<el-table-column label="事件类型" prop="categorycode" width="" /> |
|||
<el-table-column label="事件描述" prop="eventcontent" width="" /> |
|||
<el-table-column label="办理状态" prop="status" width="" /> |
|||
<el-table-column label="接收时间" prop="happentime" width="180" /> |
|||
<el-table-column label="标记" prop="marktype" width="" /> |
|||
<el-table-column label="操作" width="90" align="center"> |
|||
<template slot-scope="data"> |
|||
<el-button type="text" @click="handleView(data.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<div v-else style="width: 100%; height: 363px; text-align: center; padding-top: 120px"> |
|||
<img width="268px" height="128px" src="~@/assets/images/overview/zanwu.png" /> |
|||
<div style="color: #fff">暂无数据</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: "community", |
|||
components: { |
|||
}, |
|||
data() { |
|||
return { |
|||
queryParams: { |
|||
residList: [], |
|||
}, |
|||
list: [], |
|||
total: 0, |
|||
rowId: null, |
|||
showDialog: false, |
|||
pageNo: 1, |
|||
pageSize: 20 |
|||
}; |
|||
}, |
|||
activated() { |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
mounted() { }, |
|||
props: { |
|||
|
|||
tableData: { |
|||
type: Array, |
|||
default: [] |
|||
} |
|||
}, |
|||
methods: { |
|||
getList() { |
|||
let parm = { |
|||
residList: [this.resiId], |
|||
pageNo: this.pageNo, |
|||
pageSize: this.pageSize |
|||
} |
|||
this.list = []; |
|||
this.total = 0; |
|||
// this.$emit("changeTotal", { name: 2, total: 0 }); |
|||
// 办理状态(-2:未知,-1:不接受回访,0:接受回访/待回访,1已回访) |
|||
const completeFlags = { |
|||
"-2": "未知", |
|||
"-1": "不接受回访", |
|||
0: "接受回访/待回访", |
|||
1: "已回访", |
|||
}; |
|||
// 省满意度列表 |
|||
this.$http.post("/actual/base/peopleRoomOverview/communitySatisfactionPageList", parm).then(({ data: res }) => { |
|||
this.list = [{ |
|||
scope: "服务态度", |
|||
problemDesc: "服务人员态度不好", |
|||
completeFlag: "未办理", |
|||
isReturn: "否" |
|||
}, |
|||
{ |
|||
scope: "处理速度", |
|||
problemDesc: "等待时间过长", |
|||
completeFlag: "已办理", |
|||
isReturn: "是" |
|||
}, |
|||
{ |
|||
scope: "设备问题", |
|||
problemDesc: "使用的机器经常故障", |
|||
completeFlag: "办理中", |
|||
isReturn: "否" |
|||
}, |
|||
{ |
|||
scope: "其他", |
|||
problemDesc: "场地不够干净", |
|||
completeFlag: "已办理", |
|||
isReturn: "是" |
|||
}, { |
|||
scope: "服务态度", |
|||
problemDesc: "服务人员态度不好", |
|||
completeFlag: "未办理", |
|||
isReturn: "否" |
|||
}, |
|||
{ |
|||
scope: "处理速度", |
|||
problemDesc: "等待时间过长", |
|||
completeFlag: "已办理", |
|||
isReturn: "是" |
|||
}, |
|||
{ |
|||
scope: "设备问题", |
|||
problemDesc: "使用的机器经常故障", |
|||
completeFlag: "办理中", |
|||
isReturn: "否" |
|||
}, |
|||
{ |
|||
scope: "其他", |
|||
problemDesc: "场地不够干净", |
|||
completeFlag: "已办理", |
|||
isReturn: "是" |
|||
}] |
|||
// this.list = res.data.list.map((item) => { |
|||
// return { |
|||
// ...item, |
|||
// status: item.status ? statusArr[item.status] : null, |
|||
// marktype: marktypes[item.marktype], |
|||
// }; |
|||
// }); |
|||
this.total = this.list.length; |
|||
this.$emit("changeTotal", { name: 2, total: this.total }); |
|||
}); |
|||
}, |
|||
handleView(item) { |
|||
this.rowId = item.id; |
|||
this.showDialog = true; |
|||
}, |
|||
close() { |
|||
this.showDialog = false; |
|||
}, |
|||
handleSizeChange(val) { |
|||
this.pageSize = val; |
|||
this.pageNo = 1; |
|||
this.getList(); |
|||
}, |
|||
handleCurrentChange(val) { |
|||
this.pageNo = val; |
|||
this.getList(); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped lang="scss"></style> |
|||
|
|||
@ -0,0 +1,64 @@ |
|||
<template> |
|||
<div class="table"> |
|||
<el-table v-if="tableData.length > 0" :data="tableData" max-height="214px" height="214px"> |
|||
<el-table-column label="序号" type="index" width="80" /> |
|||
<el-table-column label="需求类型" prop="serviceCategoryKey" width="" /> |
|||
<el-table-column label="事件描述" prop="serviceName" width="" /> |
|||
<el-table-column label="服务情况" prop="state" width="" /> |
|||
<el-table-column label="创建时间" prop="serviceTimeStart" width="180" /> |
|||
<el-table-column label="操作" width="90" align="center"> |
|||
<template slot-scope="data"> |
|||
<el-button type="text" @click="handleView(data.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div v-else style="width: 100%; height: 100%; text-align: center; padding-top: 120px"> |
|||
<img width="268px" height="128px" src="~@/assets/images/overview/zanwu.png" /> |
|||
<div style="color: #fff">暂无数据</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: "community", |
|||
components: { |
|||
}, |
|||
data() { |
|||
return { |
|||
queryParams: { |
|||
residList: [], |
|||
}, |
|||
list: [], |
|||
total: 0, |
|||
rowId: null, |
|||
showDialog: false, |
|||
}; |
|||
}, |
|||
activated() { |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
mounted() { }, |
|||
props: { |
|||
tableData: { |
|||
type: Array, |
|||
default: [] |
|||
} |
|||
}, |
|||
methods: { |
|||
|
|||
handleView(item) { |
|||
this.rowId = item.id; |
|||
this.showDialog = true; |
|||
}, |
|||
close() { |
|||
this.showDialog = false; |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped lang="scss"></style> |
|||
|
|||
@ -0,0 +1,62 @@ |
|||
<template> |
|||
<div class="table"> |
|||
<el-table v-if="tableData.length > 0" :data="tableData" max-height="214px" height="214px"> |
|||
<el-table-column label="序号" type="index" width="80" /> |
|||
<el-table-column label="不满意事项类型" prop="scope" width="190" /> |
|||
<el-table-column label="不满意事项描述" prop="problemDesc" width="" /> |
|||
<el-table-column label="办理状态" prop="completeFlag" width="120" /> |
|||
<el-table-column label="是否回访" prop="isReturn" width="120" /> |
|||
<el-table-column label="操作" width="90" align="center"> |
|||
<template slot-scope="data"> |
|||
<el-button type="text" @click="handleView(data.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div v-else style="width: 100%; height: 100%; text-align: center; padding-top: 120px"> |
|||
<img width="268px" height="128px" src="~@/assets/images/overview/zanwu.png" /> |
|||
<div style="color: #fff">暂无数据</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: "community", |
|||
components: { |
|||
}, |
|||
data() { |
|||
return { |
|||
queryParams: { |
|||
residList: [], |
|||
}, |
|||
list: [], |
|||
total: 0, |
|||
rowId: null, |
|||
showDialog: false, |
|||
}; |
|||
}, |
|||
activated() { |
|||
}, |
|||
watch: { |
|||
}, |
|||
mounted() { }, |
|||
props: { |
|||
tableData: { |
|||
type: Array, |
|||
default: [] |
|||
} |
|||
}, |
|||
methods: { |
|||
handleView(item) { |
|||
this.rowId = item.id; |
|||
this.showDialog = true; |
|||
}, |
|||
close() { |
|||
this.showDialog = false; |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped lang="scss"></style> |
|||
|
|||
@ -0,0 +1,60 @@ |
|||
<template> |
|||
<div class="table"> |
|||
<el-table v-if="tableData.length > 0" :data="tableData" max-height="214px" height="214px"> |
|||
<el-table-column label="序号" type="index" width="80" /> |
|||
<el-table-column label="不满意事项类型" prop="scope" width="190" /> |
|||
<el-table-column label="不满意事项描述" prop="problemDesc" width="" /> |
|||
<el-table-column label="办理状态" prop="completeFlag" width="120" /> |
|||
<el-table-column label="是否回访" prop="isReturn" width="120" /> |
|||
<el-table-column label="操作" width="90" align="center"> |
|||
<template slot-scope="data"> |
|||
<el-button type="text" @click="handleView(data.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div v-else style="width: 100%; height: 100%; text-align: center; padding-top: 120px"> |
|||
<img width="268px" height="128px" src="~@/assets/images/overview/zanwu.png" /> |
|||
<div style="color: #fff">暂无数据</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: "community", |
|||
components: { |
|||
}, |
|||
data() { |
|||
return { |
|||
list: [], |
|||
total: 0, |
|||
rowId: null, |
|||
showDialog: false, |
|||
}; |
|||
}, |
|||
activated() { |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
mounted() { }, |
|||
props: { |
|||
tableData: { |
|||
type: Array, |
|||
default: [] |
|||
} |
|||
}, |
|||
methods: { |
|||
handleView(item) { |
|||
this.rowId = item.id; |
|||
this.showDialog = true; |
|||
}, |
|||
close() { |
|||
this.showDialog = false; |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped lang="scss"></style> |
|||
|
|||
@ -0,0 +1,106 @@ |
|||
<template> |
|||
<div class="table"> |
|||
<el-table v-if="tableData.length > 0" :data="tableData" max-height="214px" height="214px"> |
|||
<el-table-column label="序号" type="index" width="80" /> |
|||
<el-table-column label="事件类型" prop="categorycode" width="" /> |
|||
<el-table-column label="事件描述" prop="eventcontent" width="" /> |
|||
<el-table-column label="办理状态" prop="status" width="" /> |
|||
<el-table-column label="接收时间" prop="happentime" width="180" /> |
|||
<el-table-column label="操作" width="90" align="center"> |
|||
<template slot-scope="data"> |
|||
<el-button type="text" @click="handleView(data.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div v-else style="width: 100%; height: 100%; text-align: center; padding-top: 120px"> |
|||
<img width="268px" height="128px" src="~@/assets/images/overview/zanwu.png" /> |
|||
<div style="color: #fff">暂无数据</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: "community", |
|||
components: { |
|||
}, |
|||
data() { |
|||
return { |
|||
queryParams: { |
|||
residList: [], |
|||
}, |
|||
list: [], |
|||
total: 0, |
|||
rowId: null, |
|||
showDialog: false, |
|||
}; |
|||
}, |
|||
activated() { |
|||
}, |
|||
mounted() { }, |
|||
props: { |
|||
resiId: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
tableData: { |
|||
type: Array, |
|||
default: [] |
|||
} |
|||
}, |
|||
methods: { |
|||
getList() { |
|||
let residList = [this.resiId] |
|||
this.list = []; |
|||
this.total = 0; |
|||
// this.$emit("changeTotal", { name: 2, total: 0 }); |
|||
// 办理状态(-2:未知,-1:不接受回访,0:接受回访/待回访,1已回访) |
|||
const completeFlags = { |
|||
"-2": "未知", |
|||
"-1": "不接受回访", |
|||
0: "接受回访/待回访", |
|||
1: "已回访", |
|||
}; |
|||
// 省满意度列表 |
|||
this.$http.post("/actual/base/peopleRoomOverview/communitySatisfactionPageList", { residList }).then(({ data: res }) => { |
|||
this.list = [{ |
|||
scope: "服务态度", |
|||
problemDesc: "服务人员态度不好", |
|||
completeFlag: "未办理", |
|||
isReturn: "否" |
|||
}, |
|||
{ |
|||
scope: "处理速度", |
|||
problemDesc: "等待时间过长", |
|||
completeFlag: "已办理", |
|||
isReturn: "是" |
|||
}, |
|||
{ |
|||
scope: "设备问题", |
|||
problemDesc: "使用的机器经常故障", |
|||
completeFlag: "办理中", |
|||
isReturn: "否" |
|||
}, |
|||
{ |
|||
scope: "其他", |
|||
problemDesc: "场地不够干净", |
|||
completeFlag: "已办理", |
|||
isReturn: "是" |
|||
}] |
|||
this.total = res.data.length; |
|||
// this.$emit("changeTotal", { name: 2, total: this.total }); |
|||
}); |
|||
}, |
|||
handleView(item) { |
|||
this.rowId = item.id; |
|||
this.showDialog = true; |
|||
}, |
|||
close() { |
|||
this.showDialog = false; |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped lang="scss"></style> |
|||
|
|||
@ -0,0 +1,103 @@ |
|||
<template> |
|||
<div class="table"> |
|||
<el-table v-if="tableData.length > 0" :data="tableData" max-height="214px" height="214px"> |
|||
<el-table-column label="序号" type="index" width="80" /> |
|||
<el-table-column label="需求类型" prop="categoryName" width="" /> |
|||
<el-table-column label="需求描述" prop="content" width="" /> |
|||
<el-table-column label="办理情况" prop="status" width="" /> |
|||
<el-table-column label="上报时间" prop="reportTime" width="180" /> |
|||
<el-table-column label="操作" width="90" align="center"> |
|||
<template slot-scope="data"> |
|||
<el-button type="text" @click="handleView(data.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div v-else style="width: 100%; height: 100%; text-align: center; padding-top: 120px"> |
|||
<img width="268px" height="128px" src="~@/assets/images/overview/zanwu.png" /> |
|||
<div style="color: #fff">暂无数据</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: "community", |
|||
components: { |
|||
}, |
|||
data() { |
|||
return { |
|||
queryParams: { |
|||
residList: [], |
|||
}, |
|||
list: [], |
|||
total: 0, |
|||
rowId: null, |
|||
showDialog: false, |
|||
}; |
|||
}, |
|||
activated() { |
|||
}, |
|||
|
|||
mounted() { }, |
|||
props: { |
|||
tableData: { |
|||
type: Array, |
|||
default: [] |
|||
} |
|||
}, |
|||
methods: { |
|||
getList() { |
|||
let residList = [this.resiId] |
|||
this.list = []; |
|||
this.total = 0; |
|||
// this.$emit("changeTotal", { name: 2, total: 0 }); |
|||
// 办理状态(-2:未知,-1:不接受回访,0:接受回访/待回访,1已回访) |
|||
const completeFlags = { |
|||
"-2": "未知", |
|||
"-1": "不接受回访", |
|||
0: "接受回访/待回访", |
|||
1: "已回访", |
|||
}; |
|||
// 省满意度列表 |
|||
this.$http.post("/actual/base/peopleRoomOverview/communitySatisfactionPageList", { residList }).then(({ data: res }) => { |
|||
this.list = [{ |
|||
scope: "服务态度", |
|||
problemDesc: "服务人员态度不好", |
|||
completeFlag: "未办理", |
|||
isReturn: "否" |
|||
}, |
|||
{ |
|||
scope: "处理速度", |
|||
problemDesc: "等待时间过长", |
|||
completeFlag: "已办理", |
|||
isReturn: "是" |
|||
}, |
|||
{ |
|||
scope: "设备问题", |
|||
problemDesc: "使用的机器经常故障", |
|||
completeFlag: "办理中", |
|||
isReturn: "否" |
|||
}, |
|||
{ |
|||
scope: "其他", |
|||
problemDesc: "场地不够干净", |
|||
completeFlag: "已办理", |
|||
isReturn: "是" |
|||
}] |
|||
this.total = res.data.length; |
|||
// this.$emit("changeTotal", { name: 2, total: this.total }); |
|||
}); |
|||
}, |
|||
handleView(item) { |
|||
this.rowId = item.id; |
|||
this.showDialog = true; |
|||
}, |
|||
close() { |
|||
this.showDialog = false; |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped lang="scss"></style> |
|||
|
|||
@ -0,0 +1,139 @@ |
|||
<template> |
|||
<div class="cnt-right"> |
|||
<div class="list"> |
|||
<div class="item f-hflex" :key="index" v-for="(item, index) in list"> |
|||
<el-row type="flex" class="row"> |
|||
<el-col :span="12" align="left">{{item.classification}}</el-col> |
|||
<el-col :span="12" align="right">{{item.classificationNum || 0}}</el-col> |
|||
</el-row> |
|||
<div class="item-progress"> |
|||
<b :style="{ |
|||
width: item.per + '%', |
|||
}"></b> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
//数据 |
|||
data() { |
|||
return { |
|||
list: [], |
|||
}; |
|||
}, |
|||
//创建前 |
|||
created() { |
|||
this.getData(); |
|||
}, |
|||
props: { |
|||
resiId: { |
|||
type: String, |
|||
default: '' |
|||
} |
|||
}, |
|||
//方法 |
|||
methods: { |
|||
getData() { |
|||
this.$http |
|||
.get("/actual/base/peopleRoomOverview/serviceNumber?resid=" + this.resiId) |
|||
.then(({ data: res }) => { |
|||
// res.data = [ |
|||
// { |
|||
// "classification": "服务找人", |
|||
// "classificationNum": '12' |
|||
// }, |
|||
// { |
|||
// "classification": "温暖找人", |
|||
// "classificationNum": '15' |
|||
// }, |
|||
// { |
|||
// "classification": "技能找人", |
|||
// "classificationNum": '20' |
|||
// }, |
|||
// { |
|||
// "classification": "岗位找人", |
|||
// "classificationNum": '40' |
|||
// } |
|||
// ] |
|||
let total = res.data.reduce((sum, item) => sum + Number(item.classificationNum), 0); |
|||
res.data = res.data.map(item => ({ |
|||
...item, |
|||
per: (Number(item.classificationNum) / total * 100).toFixed(2) // 保留两位小数 |
|||
})); |
|||
this.list = res.data |
|||
console.log( res.data); |
|||
|
|||
}); |
|||
}, |
|||
}, |
|||
//子组件注册 |
|||
components: {}, |
|||
//计算 |
|||
computed: {}, |
|||
//监听 |
|||
watch: {}, |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/modules/management/list-main.scss"; |
|||
|
|||
.cnt-right { |
|||
.list { |
|||
.item { |
|||
margin-top: 20px; |
|||
display: flex; |
|||
align-items: center; |
|||
font-size: 14px; |
|||
font-family: PingFangSC-Medium, PingFang SC; |
|||
font-weight: 500; |
|||
color: rgba(44, 53, 66, 0.85); |
|||
line-height: 24px; |
|||
cursor: pointer; |
|||
.row{ |
|||
width: 100%; |
|||
margin: 0 0 10px; |
|||
padding: 0 10px 0 0; |
|||
} |
|||
.item-name { |
|||
margin-left: 5px; |
|||
width: 80px; |
|||
flex-shrink: 0; |
|||
} |
|||
|
|||
.item-div { |
|||
width: 1px; |
|||
height: 12px; |
|||
background: #d8d8d8; |
|||
border-radius: 1px; |
|||
} |
|||
|
|||
.item-count { |
|||
width: 90px; |
|||
flex-shrink: 0; |
|||
} |
|||
|
|||
.item-per { |
|||
min-width: 70px; |
|||
} |
|||
|
|||
.item-progress { |
|||
margin-right: 15px; |
|||
width: 100%; |
|||
height: 24px; |
|||
background: #e6f0ff; |
|||
border-radius: 1px; |
|||
overflow: hidden; |
|||
|
|||
b { |
|||
display: block; |
|||
height: 24px; |
|||
background: #7ba6e6; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
|||
@ -0,0 +1,122 @@ |
|||
<template> |
|||
<div class='g-main'> |
|||
<div class="top"> |
|||
<div class="left"> |
|||
<div class="card"> |
|||
<div class="title"> |
|||
<div><img src="../../../assets/images/index/title-icon-sqzl.png" alt="">居民档案</div> |
|||
<span class="title f-font14 gray" style="cursor: pointer;" @click="handlerUserInfo">详情 ></span> |
|||
</div> |
|||
<div class="f-top12"> |
|||
<img src="../../../assets/images/index/resi.png" alt="" width="56px"> {{ userInfo.name }} |
|||
</div> |
|||
<section class="bgC"> |
|||
<left-top :resiId="userInfo.resiId" :key="userInfo.resiId"></left-top> |
|||
</section> |
|||
</div> |
|||
</div> |
|||
<div class="right"> |
|||
<div class="card"> |
|||
<div class="title"> |
|||
<div><img src="../../../assets/images/index/title-icon-ywjl.png" alt="">各项业务记录</div> |
|||
</div> |
|||
<right-top :userInfo="userInfo" :key="userInfo.resiId"></right-top> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="bottom"> |
|||
<div class="left"> |
|||
<div class="card"> |
|||
<div class="title"> |
|||
<div><img src="../../../assets/images/index/title-icon-jtgx.png" alt="">家庭关系</div> |
|||
</div> |
|||
<section class="bgC" style="padding: 0;"> |
|||
<left-bto :userInfo="userInfo" :key="userInfo.resiId"></left-bto> |
|||
</section> |
|||
</div> |
|||
</div> |
|||
<div class="right"> |
|||
<div class="card f-w50 right16"> |
|||
<div class="title"> |
|||
<div><img src="../../../assets/images/index/title-icon-xsfw.png" alt="">享受服务次数统计</div> |
|||
</div> |
|||
<div> |
|||
<xiangshoufuwu :key="userInfo.resiId"/> |
|||
</div> |
|||
</div> |
|||
<div class="card" style="width: calc(50% - 16px);"> |
|||
<div class="title"> |
|||
<div><img src="../../../assets/images/index/title-icon-jfjl.png" alt="">积分记录</div> |
|||
</div> |
|||
<div class="card"> |
|||
<pointsRecord :resiId="userInfo.resiId" :key="userInfo.resiId" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<resi-info v-if="showedResiInfo && userInfo.resiId" :resi-id="userInfo.resiId" @close="showedResiInfo = false" /> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import { requestPost, requestGet } from '@/js/dai/request' |
|||
import leftTop from "./cpts/leftTop"; |
|||
import leftBto from "./cpts/leftBto"; |
|||
import rightTop from "./cpts/rightTop"; |
|||
import rightBto from "./cpts/rightBto"; |
|||
import resiInfo from "@/views/modules/cpts/resi/info"; |
|||
import nextTick from "dai-js/tools/nextTick"; |
|||
import pointsRecord from "./cpts/pointsRecord"; |
|||
import xiangshoufuwu from "./cpts/xiangshoufuwu"; |
|||
|
|||
|
|||
export default { |
|||
//数据 |
|||
data() { |
|||
return { |
|||
userInfo: {}, |
|||
showedResiInfo: false, |
|||
|
|||
}; |
|||
}, |
|||
//创建前 |
|||
async created() { |
|||
this.userInfo = this.$store.state.huaXiang.userInfo |
|||
await this.getFamilyRelationshipList() |
|||
}, |
|||
mounted() { |
|||
}, |
|||
activated() { |
|||
this.userInfo = this.$store.state.huaXiang.userInfo |
|||
}, |
|||
//方法 |
|||
methods: { |
|||
async getFamilyRelationshipList() { |
|||
let url = `/actual/base/peopleRoomOverview/getFamilyRelationshipList?type=0&resid=` + this.userInfo.resiId |
|||
let { code, data, msg } = await requestPost(url) |
|||
if (code == 0) { |
|||
this.familyList = data |
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
async handlerUserInfo() { |
|||
await nextTick(); |
|||
this.showedResiInfo = true; |
|||
}, |
|||
changeTotal(val) { |
|||
this.total = val.total |
|||
}, |
|||
}, |
|||
//子组件注册 |
|||
components: { leftTop, leftBto, resiInfo, rightTop, pointsRecord, rightBto, xiangshoufuwu }, |
|||
//计算 |
|||
computed: {}, |
|||
//监听 |
|||
watch: {}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/pages/huaxiang"; |
|||
@import "@/assets/scss/modules/management/list-main.scss"; |
|||
</style> |
|||
@ -1,283 +1,496 @@ |
|||
<template> |
|||
<div class=""> |
|||
<el-card :style="containerStyle" :class="{ 'box-card': source === 'visiual' }" v-if="showType == ''"> |
|||
<h3 v-if="source === 'manage'" class="h3-title"> |
|||
<img src="../../../../../assets/images/index/title-icon-sqzl.png" width="30px" height="30px" alt="" /> |
|||
事件详情 |
|||
</h3> |
|||
<div class="m-detail-main"> |
|||
<div class="m-info"> |
|||
<div :class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]"> |
|||
<span class="u-info-title-2">所属组织:</span> |
|||
<span>{{ info.gridName }}</span> |
|||
</div> |
|||
<div :class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]"> |
|||
<span class="u-info-title-2">接收时间:</span> |
|||
<span>{{ info.happenTime }}</span> |
|||
</div> |
|||
<div :class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]"> |
|||
<span class="u-info-title-2">工单号:</span> |
|||
<span>{{ info.workOrderNum }}</span> |
|||
</div> |
|||
<div :class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]"> |
|||
<span class="u-info-title-2">事件内容:</span> |
|||
<span>{{ info.eventContent }}</span> |
|||
</div> |
|||
|
|||
<div v-if="info.imageList && info.imageList.length > 0" |
|||
:class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]"> |
|||
<span class="u-info-title-2">图片:</span> |
|||
<img :src="src" :key="src" style="width: 150px; height: 150px; padding-right: 10px" |
|||
v-for="src in info.imageList" @click="watchImg(src)" /> |
|||
</div> |
|||
<div v-if="info.voiceList && info.voiceList.length > 0" |
|||
:class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]"> |
|||
<span class="u-info-title-2">语音:</span> |
|||
<audio controls> |
|||
<source :src="item.url" type="" :key="item.url" v-for="item in info.voiceList" /> |
|||
</audio> |
|||
</div> |
|||
|
|||
<div :class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]"> |
|||
<span class="u-info-title-2">上报渠道:</span> |
|||
<span>{{ info.sourceTypeName }}</span> |
|||
</div> |
|||
<div :class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]"> |
|||
<span class="u-info-title-2">详细地址</span> |
|||
<span>{{ info.address }}</span> |
|||
</div> |
|||
<div :class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]"> |
|||
<span class="u-info-title-2">联系人:</span> |
|||
<span>{{ info.name }}</span> |
|||
</div> |
|||
<div :class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]"> |
|||
<span class="u-info-title-2">联系电话:</span> |
|||
<span>{{ info.mobile }}</span> |
|||
</div> |
|||
<div :class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]"> |
|||
<span class="u-info-title-2">标记:</span> |
|||
<span>{{ info.markTypeName || "--" }}</span> |
|||
</div> |
|||
<div v-if="info.satisfactionName" |
|||
:class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]"> |
|||
<span class="u-info-title-2">满意度:</span> |
|||
<div>{{ info.satisfactionName }}</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- |
|||
显示关闭: |
|||
1、状态=完成 (已评价)||(没评价&&不是本人) |
|||
2、状态=未完成 (有操作id) |
|||
--> |
|||
<div v-if="(info.status === 'processing' && info.operationId) || (info.status === 'closed_case' && |
|||
(info.satisfactionName || (!info.satisfactionName && user.id != info.createdUserId)))" |
|||
class="div-btn-info"> |
|||
<el-button size="small" @click="handleCloseEvent">关闭</el-button> |
|||
<div class=""> |
|||
<el-card |
|||
:style="containerStyle" |
|||
:class="{ 'box-card': source === 'visiual' }" |
|||
v-if="showType == ''" |
|||
> |
|||
<h3 v-if="source === 'manage'" class="h3-title"> |
|||
<img |
|||
src="../../../../../assets/images/index/title-icon-sqzl.png" |
|||
width="30px" |
|||
height="30px" |
|||
alt="" |
|||
/> |
|||
事件详情 |
|||
</h3> |
|||
<div class="m-detail-main"> |
|||
<div class="m-info"> |
|||
<div |
|||
:class="[ |
|||
'm-info-prop', |
|||
{ 'm-info-prop-vis': source === 'visiual' }, |
|||
]" |
|||
> |
|||
<span class="u-info-title-2">所属网格:</span> |
|||
<span>{{ info.gridName }}</span> |
|||
</div> |
|||
<div |
|||
:class="[ |
|||
'm-info-prop', |
|||
{ 'm-info-prop-vis': source === 'visiual' }, |
|||
]" |
|||
> |
|||
<span class="u-info-title-2">上报时间:</span> |
|||
<span>{{ info.happenTime }}</span> |
|||
</div> |
|||
<div |
|||
:class="[ |
|||
'm-info-prop', |
|||
{ 'm-info-prop-vis': source === 'visiual' }, |
|||
]" |
|||
> |
|||
<span class="u-info-title-2">事件内容:</span> |
|||
<span>{{ info.eventContent }}</span> |
|||
</div> |
|||
|
|||
<div |
|||
v-if="info.imageList && info.imageList.length > 0" |
|||
:class="[ |
|||
'm-info-prop', |
|||
{ 'm-info-prop-vis': source === 'visiual' }, |
|||
]" |
|||
> |
|||
<span class="u-info-title-2">图片:</span> |
|||
<img |
|||
:src="src" |
|||
:key="src" |
|||
style="width: 150px; height: 150px; padding-right: 10px" |
|||
v-for="src in info.imageList" |
|||
@click="watchImg(src)" |
|||
/> |
|||
</div> |
|||
<div |
|||
v-if="info.voiceList && info.voiceList.length > 0" |
|||
:class="[ |
|||
'm-info-prop', |
|||
{ 'm-info-prop-vis': source === 'visiual' }, |
|||
]" |
|||
> |
|||
<span class="u-info-title-2">语音:</span> |
|||
<audio controls> |
|||
<source |
|||
:src="item.url" |
|||
type="" |
|||
:key="item.url" |
|||
v-for="item in info.voiceList" |
|||
/> |
|||
</audio> |
|||
</div> |
|||
|
|||
<div |
|||
:class="[ |
|||
'm-info-prop', |
|||
{ 'm-info-prop-vis': source === 'visiual' }, |
|||
]" |
|||
> |
|||
<span class="u-info-title-2">反映渠道:</span> |
|||
<span>{{ info.sourceTypeName }}</span> |
|||
</div> |
|||
<div |
|||
:class="[ |
|||
'm-info-prop', |
|||
{ 'm-info-prop-vis': source === 'visiual' }, |
|||
]" |
|||
> |
|||
<span class="u-info-title-2">地址:</span> |
|||
<span>{{ info.address }}</span> |
|||
</div> |
|||
<div |
|||
:class="[ |
|||
'm-info-prop', |
|||
{ 'm-info-prop-vis': source === 'visiual' }, |
|||
]" |
|||
> |
|||
<span class="u-info-title-2">上报人:</span> |
|||
<span>{{ info.name }}</span> |
|||
</div> |
|||
<div |
|||
:class="[ |
|||
'm-info-prop', |
|||
{ 'm-info-prop-vis': source === 'visiual' }, |
|||
]" |
|||
> |
|||
<span class="u-info-title-2">联系电话:</span> |
|||
<span>{{ info.mobile }}</span> |
|||
</div> |
|||
<div |
|||
:class="[ |
|||
'm-info-prop', |
|||
{ 'm-info-prop-vis': source === 'visiual' }, |
|||
]" |
|||
> |
|||
<span class="u-info-title-2">证件号:</span> |
|||
<span>{{ info.idCard ? info.idCard : "--" }}</span> |
|||
</div> |
|||
<div |
|||
:class="[ |
|||
'm-info-prop', |
|||
{ 'm-info-prop-vis': source === 'visiual' }, |
|||
]" |
|||
> |
|||
<span class="u-info-title-2">标记:</span> |
|||
<span>{{ info.markTypeName || "--" }}</span> |
|||
</div> |
|||
<div |
|||
v-if="info.operationType === '1'" |
|||
:class="[ |
|||
'm-info-prop', |
|||
{ 'm-info-prop-vis': source === 'visiual' }, |
|||
]" |
|||
> |
|||
<span class="u-info-title-2">已立项:</span> |
|||
<div class="line" @click="handleToProject"><i class="el-icon-view"></i> 查看项目</div> |
|||
</div> |
|||
<div |
|||
v-if="info.operationType === '2'" |
|||
:class="[ |
|||
'm-info-prop', |
|||
{ 'm-info-prop-vis': source === 'visiual' }, |
|||
]" |
|||
> |
|||
<span class="u-info-title-2">已转需求:</span> |
|||
<div class="line" @click="handleToDemand"><i class="el-icon-view"></i>查看需求</div> |
|||
</div> |
|||
<div |
|||
v-if="info.operationType === '3'" |
|||
:class="[ |
|||
'm-info-prop', |
|||
{ 'm-info-prop-vis': source === 'visiual' }, |
|||
]" |
|||
> |
|||
<span class="u-info-title-2">已转议题:</span> |
|||
<div class="line" @click="handleToIssue"> |
|||
<i class="el-icon-view"></i> 查看议题 |
|||
</div> |
|||
</el-card> |
|||
<el-card :class="{ 'box-card': source === 'visiual' }" v-if="info.status === 'closed_case' && !info.satisfactionName |
|||
&& user.id === info.createdUserId" style="width: 184%;"> |
|||
<h3>满意度评价</h3> |
|||
<div class="m-detail-main"> |
|||
<div class="m-info"> |
|||
<div class="div-satisfy"> |
|||
<el-radio-group :class="{ 'form-item': source === 'visiual' }" v-model="satisfyLevel" |
|||
@change="clickSatisfy"> |
|||
<el-radio label="good">满意</el-radio> |
|||
<el-radio label="perfect">基本满意</el-radio> |
|||
<el-radio label="bad">不满意</el-radio> |
|||
</el-radio-group> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div |
|||
v-if="info.satisfactionName" |
|||
:class="[ |
|||
'm-info-prop', |
|||
{ 'm-info-prop-vis': source === 'visiual' }, |
|||
]" |
|||
> |
|||
<span class="u-info-title-2">满意度:</span> |
|||
<div>{{ info.satisfactionName }}</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- |
|||
显示关闭: |
|||
1、状态=完成 (已评价)||(没评价&&不是本人) |
|||
|
|||
2、状态=未完成 (有操作id) --> |
|||
<div |
|||
v-if=" |
|||
(info.status === 'processing' && info.operationId) || |
|||
(info.status === 'closed_case' && |
|||
(info.satisfactionName || |
|||
(!info.satisfactionName && user.id != info.createdUserId))) |
|||
" |
|||
class="div-btn-info" |
|||
> |
|||
<el-button size="small" @click="handleCloseEvent">关闭</el-button> |
|||
</div> |
|||
</el-card> |
|||
|
|||
<el-card |
|||
:class="{ 'box-card': source === 'visiual' }" |
|||
v-if=" |
|||
info.status === 'closed_case' && |
|||
!info.satisfactionName && |
|||
user.id === info.createdUserId |
|||
" |
|||
> |
|||
<h3>满意度评价</h3> |
|||
<div class="m-detail-main"> |
|||
<div class="m-info"> |
|||
<div class="div-satisfy"> |
|||
<div> |
|||
<img |
|||
:src="selBad ? badurl_light : badurl" |
|||
@click="clickSatisfy('bad')" |
|||
/> |
|||
<div class="tip-satisfy">不满意</div> |
|||
</div> |
|||
<div class="div-btn"> |
|||
<el-button size="small" @click="handleCloseEvent">关闭</el-button> |
|||
<el-button style="margin-left: 20px" type="primary" size="small" |
|||
@click="handleComfirmSatisfy">确定</el-button> |
|||
<div> |
|||
<img |
|||
:src="selGood ? goodurl_light : goodurl" |
|||
@click="clickSatisfy('good')" |
|||
/> |
|||
<div class="tip-satisfy">满意</div> |
|||
</div> |
|||
</el-card> |
|||
<el-dialog :visible.sync="showSatisfy" :close-on-click-modal="false" :close-on-press-escape="false" title="满意度评价" |
|||
width="550px" top="15vh" class="dialog-h" @closed="showSatisfy = false"> |
|||
<div class="div-btn"> |
|||
<el-button size="small" @click="showSatisfy = false">关闭</el-button> |
|||
<el-button style="margin-left: 20px" type="primary" size="small" |
|||
@click="handleComfirmSatisfy">确定</el-button> |
|||
<div> |
|||
<img |
|||
:src="selPerfect ? perfecturl_light : perfecturl" |
|||
@click="clickSatisfy('perfect')" |
|||
/> |
|||
<div class="tip-satisfy">非常满意</div> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="div-btn"> |
|||
<el-button size="small" @click="handleCloseEvent">关闭</el-button> |
|||
<el-button |
|||
style="margin-left: 20px" |
|||
type="primary" |
|||
size="small" |
|||
@click="handleComfirmSatisfy" |
|||
>确定</el-button |
|||
> |
|||
</div> |
|||
</el-card> |
|||
<el-dialog |
|||
:visible.sync="showSatisfy" |
|||
:close-on-click-modal="false" |
|||
:close-on-press-escape="false" |
|||
title="满意度评价" |
|||
width="550px" |
|||
top="15vh" |
|||
class="dialog-h" |
|||
@closed="showSatisfy = false" |
|||
> |
|||
<div class="div-btn"> |
|||
<el-button size="small" @click="showSatisfy = false">关闭</el-button> |
|||
<el-button |
|||
style="margin-left: 20px" |
|||
type="primary" |
|||
size="small" |
|||
@click="handleComfirmSatisfy" |
|||
>确定</el-button |
|||
> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import foldText from "@/views/components/foldText"; |
|||
import projectInfo from "../../xiangmu/cpts/project-info"; |
|||
import dateFormat from "dai-js/tools/dateFormat"; |
|||
|
|||
function iniData() { |
|||
return { |
|||
user: {}, |
|||
projectPageType: "info", |
|||
info: {}, |
|||
eventDetailCopy: {}, |
|||
showType: "", |
|||
projectId: "", |
|||
demandForm: { |
|||
gridId: "", |
|||
categoryCode: "", |
|||
parentCode: "", |
|||
content: "", |
|||
reportType: "", |
|||
reportUserName: "", |
|||
reportUserMobile: "", |
|||
reportTime: "", |
|||
wantServiceTime: "", |
|||
demandUserId: "", |
|||
demandUserName: "", |
|||
demandUserMobile: "", |
|||
}, |
|||
satisfyLevel: "", |
|||
//满意度评价 |
|||
showSatisfy: false, |
|||
}; |
|||
return { |
|||
user: {}, |
|||
projectPageType: "info", |
|||
|
|||
info: {}, |
|||
eventDetailCopy: {}, |
|||
showType: "", |
|||
|
|||
projectId: "", |
|||
|
|||
demandForm: { |
|||
gridId: "", |
|||
categoryCode: "", |
|||
parentCode: "", |
|||
content: "", |
|||
reportType: "", |
|||
reportUserName: "", |
|||
reportUserMobile: "", |
|||
reportTime: "", |
|||
wantServiceTime: "", |
|||
demandUserId: "", |
|||
demandUserName: "", |
|||
demandUserMobile: "", |
|||
}, |
|||
|
|||
//满意度评价 |
|||
showSatisfy: false, |
|||
selBad: false, |
|||
selGood: false, |
|||
selPerfect: false, |
|||
badurl: require("@/assets/img/satisfy-images/face1.png"), |
|||
badurl_light: require("@/assets/img/satisfy-images/face1_light.png"), |
|||
goodurl: require("@/assets/img/satisfy-images/face2.png"), |
|||
goodurl_light: require("@/assets/img/satisfy-images/face2_light.png"), |
|||
perfecturl: require("@/assets/img/satisfy-images/face3.png"), |
|||
perfecturl_light: require("@/assets/img/satisfy-images/face3_light.png"), |
|||
}; |
|||
} |
|||
|
|||
export default { |
|||
name: "issueInfo", |
|||
props: { |
|||
eventId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
type: { |
|||
type: String, |
|||
default: "info", |
|||
}, |
|||
|
|||
eventDetailData: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
source: { |
|||
//展示来源:manage 管理平台 visiual 可视化平台 |
|||
type: String, |
|||
default: "manage", |
|||
}, |
|||
name: "issueInfo", |
|||
props: { |
|||
eventId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
type: { |
|||
type: String, |
|||
default: "info", |
|||
}, |
|||
|
|||
components: { |
|||
foldText, |
|||
projectInfo, |
|||
eventDetailData: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
source: { |
|||
//展示来源:manage 管理平台 visiual 可视化平台 |
|||
type: String, |
|||
default: "manage", |
|||
}, |
|||
}, |
|||
|
|||
data: iniData, |
|||
|
|||
|
|||
watch: {}, |
|||
created() { }, |
|||
computed: { |
|||
containerStyle() { |
|||
if (this.type === 'info') { |
|||
return { |
|||
minHeight: 'calc(88vh - 50px)', |
|||
overflow: 'auto', |
|||
position: 'relative' |
|||
} |
|||
} else { |
|||
return {} |
|||
} |
|||
} |
|||
components: { |
|||
foldText, |
|||
projectInfo, |
|||
}, |
|||
|
|||
data: iniData, |
|||
|
|||
|
|||
watch: {}, |
|||
created() {}, |
|||
computed: { |
|||
containerStyle() { |
|||
if (this.type === 'info') { |
|||
return { |
|||
minHeight: 'calc(88vh - 50px)', |
|||
overflow: 'auto', |
|||
position: 'relative' |
|||
} |
|||
} else { |
|||
return {} |
|||
} |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.user = this.$store.state.user; |
|||
if (this.eventId) { |
|||
this.info = JSON.parse(JSON.stringify(this.eventDetailData)); |
|||
|
|||
//如果已经评价过,进行回显 |
|||
// if (this.info.status === 'closed_case' && this.info.satisfactionName) { |
|||
// this.changeSatisfyType(this.info.satisfaction) |
|||
// } |
|||
} |
|||
// this.getApiData(); |
|||
}, |
|||
|
|||
methods: { |
|||
watchImg(src) { |
|||
window.open(src); |
|||
}, |
|||
mounted() { |
|||
this.user = this.$store.state.user; |
|||
if (this.eventId) { |
|||
this.info = JSON.parse(JSON.stringify(this.eventDetailData)); |
|||
|
|||
//如果已经评价过,进行回显 |
|||
// if (this.info.status === 'closed_case' && this.info.satisfactionName) { |
|||
// this.changeSatisfyType(this.info.satisfaction) |
|||
// } |
|||
} |
|||
// this.getApiData(); |
|||
|
|||
handleClose() { |
|||
this.showType = ""; |
|||
}, |
|||
|
|||
handleCloseEvent() { |
|||
this.$emit("handleClose"); |
|||
}, |
|||
|
|||
async getApiData() {}, |
|||
|
|||
handleToProject() { |
|||
this.$emit("handleToProject"); |
|||
// if (this.info.status === 'processing') { |
|||
// this.projectPageType = 'edit' |
|||
// } else { |
|||
// this.projectPageType = 'info' |
|||
// } |
|||
|
|||
// this.showType = 'project' |
|||
}, |
|||
handleToDemand() { |
|||
this.$emit("handleToDemand"); |
|||
}, |
|||
handleToIssue() { |
|||
this.$emit("handleToIssue"); |
|||
}, |
|||
|
|||
//满意度评价 |
|||
handleSatisfy() { |
|||
this.showSatisfy = true; |
|||
}, |
|||
|
|||
methods: { |
|||
watchImg(src) { |
|||
window.open(src); |
|||
}, |
|||
|
|||
handleClose() { |
|||
this.showType = ""; |
|||
}, |
|||
|
|||
handleCloseEvent() { |
|||
this.$emit("handleClose"); |
|||
}, |
|||
|
|||
async getApiData() { }, |
|||
|
|||
//满意度评价 |
|||
handleSatisfy() { |
|||
this.showSatisfy = true; |
|||
}, |
|||
|
|||
clickSatisfy(type) { |
|||
if (this.info.satisfactionName) { |
|||
return false; |
|||
} |
|||
this.satisfyLevel = type; |
|||
}, |
|||
|
|||
async handleComfirmSatisfy() { |
|||
if (!this.satisfyLevel) { |
|||
this.$message.info("请选择评价级别"); |
|||
} |
|||
const url = "/governance/icEvent/comment"; |
|||
let params = { |
|||
icEventId: this.eventId, |
|||
satisfaction: this.satisfyLevel, |
|||
}; |
|||
const { data, code, msg } = await requestPost(url, params); |
|||
if (code === 0) { |
|||
this.$message.success("评价成功"); |
|||
this.info.satisfactionName = |
|||
this.satisfyLevel == "bad" |
|||
? "不满意" |
|||
: this.satisfyLevel == "good" |
|||
? "满意" |
|||
: "非常满意"; |
|||
this.showSatisfy = false; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
clickSatisfy(type) { |
|||
if (this.info.satisfactionName) { |
|||
return false; |
|||
} |
|||
|
|||
this.changeSatisfyType(type); |
|||
}, |
|||
changeSatisfyType(type) { |
|||
if (type === "bad") { |
|||
this.selGood = false; |
|||
this.selPerfect = false; |
|||
this.selBad = true; |
|||
} else if (type === "good") { |
|||
this.selGood = true; |
|||
this.selPerfect = false; |
|||
this.selBad = false; |
|||
} else if (type === "perfect") { |
|||
this.selGood = false; |
|||
this.selPerfect = true; |
|||
this.selBad = false; |
|||
} |
|||
}, |
|||
|
|||
async handleComfirmSatisfy() { |
|||
let satisfyLevel = ""; |
|||
if (!this.selBad && !this.selGood && !this.selPerfect) { |
|||
this.$message.info("请选择评价级别"); |
|||
} else { |
|||
if (this.selBad) { |
|||
satisfyLevel = "bad"; |
|||
} else if (this.selGood) { |
|||
satisfyLevel = "good"; |
|||
} else if (this.selPerfect) { |
|||
satisfyLevel = "perfect"; |
|||
} |
|||
} |
|||
const url = "/governance/icEvent/comment"; |
|||
|
|||
let params = { |
|||
icEventId: this.eventId, |
|||
satisfaction: satisfyLevel, |
|||
}; |
|||
|
|||
const { data, code, msg } = await requestPost(url, params); |
|||
|
|||
if (code === 0) { |
|||
this.$message.success("评价成功"); |
|||
this.info.satisfactionName = |
|||
satisfyLevel == "bad" |
|||
? "不满意" |
|||
: satisfyLevel == "good" |
|||
? "满意" |
|||
: "非常满意"; |
|||
this.showSatisfy = false; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/modules/shequzhili/event-info.scss"; |
|||
|
|||
.m-info { |
|||
padding-left: 0px !important; |
|||
padding-left: 0px !important; |
|||
} |
|||
|
|||
.m-info-prop { |
|||
margin: 25px 0 !important; |
|||
padding-left: 0px !important; |
|||
|
|||
&::before { |
|||
content: ""; |
|||
display: block; |
|||
position: absolute; |
|||
top: 9px; |
|||
left: 0; |
|||
width: 7px; |
|||
height: 7px; |
|||
background: none !important; |
|||
border-radius: 3px; |
|||
margin-right: 10px; |
|||
} |
|||
margin: 25px 0 !important; |
|||
padding-left: 0px !important; |
|||
&::before { |
|||
content: ""; |
|||
display: block; |
|||
position: absolute; |
|||
top: 9px; |
|||
left: 0; |
|||
width: 7px; |
|||
height: 7px; |
|||
background: none !important; |
|||
border-radius: 3px; |
|||
margin-right: 10px; |
|||
} |
|||
} |
|||
</style> |
|||
|
|||
|
|||
@ -1,215 +1,263 @@ |
|||
<!-- |
|||
* @Author: mk 2403457699@qq.com |
|||
* @Date: 2023-07-26 16:23:24 |
|||
* @LastEditors: mk 2403457699@qq.com |
|||
* @LastEditTime: 2023-08-09 10:21:34 |
|||
* @Description: 事件分类回填 |
|||
* |
|||
* |
|||
--> |
|||
<template> |
|||
<div class="search"> |
|||
<el-form ref="ref_form1" :inline="false" :model="formData" :rules="dataRule"> |
|||
<el-form-item label="事件分类" label-width="150px" :class="{ 'form-item': source === 'visiual' }" |
|||
prop="categoryList"> |
|||
<div :class="{ 'visiual-form': source === 'visiual' }"> |
|||
<el-cascader class="cell-width-2" ref="myCascader" v-model="selCategoryArray" :key="iscascaderShow" |
|||
:options="casOptions" :props="optionProps" :show-all-levels="false" |
|||
@change="handleChangeCate"></el-cascader> |
|||
</div> |
|||
</el-form-item> |
|||
<el-form-item label="回复内容" prop="content" label-width="150px" :class="{ 'form-item': source === 'visiual' }" |
|||
style="display: block"> |
|||
<div :class="{ 'visiual-form': source === 'visiual' }"> |
|||
<el-input class="cell-width-area" type="textarea" maxlength="500" show-word-limit :rows="5" |
|||
placeholder="请输入回复内容,不超过500字" v-model="formData.content"></el-input> |
|||
</div> |
|||
</el-form-item> |
|||
<el-form-item label="办结时限" prop="timeLimit" label-width="150px" :class="{ 'form-item': source === 'visiual' }" |
|||
style="display: block"> |
|||
<div :class="{ 'visiual-form': source === 'visiual' }"> |
|||
<el-date-picker v-model="formData.timeLimit" class="cell-width-1" type="datetime" placeholder="办结时限" |
|||
value-format="yyyy-MM-dd HH:mm:ss"> |
|||
</el-date-picker> |
|||
</div> |
|||
</el-form-item> |
|||
</el-form> |
|||
<el-form |
|||
ref="ref_form1" |
|||
:inline="false" |
|||
:model="formData" |
|||
:rules="dataRule" |
|||
> |
|||
<el-form-item |
|||
label="事件分类" |
|||
label-width="150px" |
|||
:class="{ 'form-item': source === 'visiual' }" |
|||
prop="categoryList" |
|||
> |
|||
<div :class="{ 'visiual-form': source === 'visiual' }"> |
|||
<el-cascader class="cell-width-2" |
|||
ref="myCascader" |
|||
v-model="selCategoryArray" |
|||
:key="iscascaderShow" |
|||
:options="casOptions" |
|||
:props="optionProps" |
|||
:show-all-levels="false" |
|||
@change="handleChangeCate"></el-cascader> |
|||
</div> |
|||
</el-form-item> |
|||
<el-form-item |
|||
label="回复内容" |
|||
prop="content" |
|||
label-width="150px" |
|||
:class="{ 'form-item': source === 'visiual' }" |
|||
style="display: block" |
|||
> |
|||
<div :class="{ 'visiual-form': source === 'visiual' }"> |
|||
<el-input |
|||
class="cell-width-area" |
|||
type="textarea" |
|||
maxlength="500" |
|||
show-word-limit |
|||
:rows="5" |
|||
placeholder="请输入回复内容,不超过500字" |
|||
v-model="formData.content" |
|||
></el-input> |
|||
</div> |
|||
</el-form-item> |
|||
<el-form-item |
|||
label="" |
|||
label-width="150px" |
|||
:class="{ 'form-item': source === 'visiual' }" |
|||
style="display: block" |
|||
> |
|||
<el-checkbox |
|||
:class="{ 'form-item': source === 'visiual' }" |
|||
v-model="status" |
|||
@change="handleChangeStatus" |
|||
>已完成</el-checkbox |
|||
> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { Loading } from "element-ui"; // 引入Loading服务 |
|||
import { requestPost } from "@/js/dai/request"; |
|||
let loading; // 加载动画 |
|||
|
|||
export default { |
|||
</template> |
|||
|
|||
<script> |
|||
import { Loading } from "element-ui"; // 引入Loading服务 |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import formVltHelper from "dai-js/tools/formVltHelper"; |
|||
|
|||
import { isCard } from "@/utils/validate"; |
|||
let loading; // 加载动画 |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
btnDisable: false, |
|||
formData: { |
|||
operationType: '0', //处理方式[0:已回复 5、指派 6、完成并回复] |
|||
content: '', |
|||
status: 'processing', |
|||
timeLimit: '',//办结时限 |
|||
categoryList: [], |
|||
}, |
|||
status: false, |
|||
okflag: false, |
|||
eventDetailCopy: {}, |
|||
selCategoryArray: [], |
|||
casOptions: [], |
|||
iscascaderShow: 0, |
|||
optionProps: { |
|||
multiple: false, |
|||
value: "id", |
|||
label: "categoryName", |
|||
children: "children", |
|||
level: 'categoryType' |
|||
}, |
|||
dataRule: { |
|||
content: [ |
|||
{ required: true, message: '回复内容不能为空', trigger: 'blur' }, |
|||
], |
|||
categoryList: [ |
|||
// { required: true, message: '事件分类不能为空', trigger: 'blur' }, |
|||
], |
|||
timeLimit: [ |
|||
{ required: true, message: "办结时限不能为空", trigger: "blur" }, |
|||
] |
|||
} |
|||
}; |
|||
return { |
|||
btnDisable: false, |
|||
formData: { |
|||
operationType: "0", //处理方式[0:已回复 1:已转项目 2:已转需求] |
|||
content: "", |
|||
status: "", |
|||
categoryList: [], |
|||
}, |
|||
|
|||
status: false, |
|||
okflag: false, |
|||
|
|||
eventDetailCopy: {}, |
|||
selCategoryArray:[], |
|||
casOptions: [], |
|||
iscascaderShow: 0, |
|||
optionProps: { |
|||
multiple: false, |
|||
value: "id", |
|||
label: "name", |
|||
children: "subCategory", |
|||
}, |
|||
dataRule:{ |
|||
content: [ |
|||
{ required: true, message: "回复内容不能为空", trigger: "blur" }, |
|||
], |
|||
categoryList: [ |
|||
// { required: true, message: "事件分类不能为空", trigger: "blur" }, |
|||
], |
|||
} |
|||
}; |
|||
}, |
|||
components: {}, |
|||
components: { }, |
|||
computed: {}, |
|||
props: { |
|||
eventId: { |
|||
type: String, |
|||
default: '', |
|||
}, |
|||
eventDetailData: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
source: { |
|||
//展示来源:manage 管理平台 visiual 可视化平台 |
|||
type: String, |
|||
default: 'manage', |
|||
eventId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
eventDetailData: { |
|||
type: Object, |
|||
default() { |
|||
return {}; |
|||
}, |
|||
}, |
|||
source: { |
|||
//展示来源:manage 管理平台 visiual 可视化平台 |
|||
type: String, |
|||
default: "manage", |
|||
}, |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
|
|||
watch: {}, |
|||
|
|||
created() { |
|||
|
|||
console.log(this.source); |
|||
}, |
|||
|
|||
|
|||
async mounted() { |
|||
this.getCategoryList(); |
|||
if (this.eventId) { |
|||
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData)); |
|||
console.log('this.eventDetailCopy', this.eventDetailCopy); |
|||
let value = this.eventDetailCopy.parentCategoryId.split(","); |
|||
value.push(this.eventDetailCopy.categoryId); |
|||
this.handleChangeCate(value) |
|||
this.getCategoryList(); |
|||
if (this.eventId) { |
|||
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData)); |
|||
// 这一步接收到eventDetailCopy在这里回填 |
|||
if ( |
|||
this.eventDetailCopy.parentCategoryId && |
|||
this.eventDetailCopy.categoryId |
|||
) { |
|||
this.selCategoryArray.push( this.eventDetailCopy.parentCategoryId,this.eventDetailCopy.categoryId) |
|||
} |
|||
|
|||
} |
|||
}, |
|||
|
|||
|
|||
methods: { |
|||
async getCategoryList() { |
|||
const url = '/governance/icEvent/getCategoryTree'; |
|||
let params = {}; |
|||
const { data, code, msg } = await requestPost(url, params); |
|||
if (code === 0) { |
|||
let treeDataNew = this.deepTree(data, "children"); |
|||
//组织级联数据 |
|||
++this.iscascaderShow; |
|||
this.casOptions = []; |
|||
this.casOptions = treeDataNew; |
|||
async getCategoryList() { |
|||
const url = "/governance/issueprojectcategorydict/list"; |
|||
|
|||
let params = {}; |
|||
|
|||
const { data, code, msg } = await requestPost(url, params); |
|||
|
|||
if (code === 0) { |
|||
let treeDataNew = this.filterTree(data); |
|||
|
|||
//组织级联数据 |
|||
++this.iscascaderShow; |
|||
this.casOptions = []; |
|||
|
|||
this.casOptions = treeDataNew; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
handleChangeCate() { |
|||
if(this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0]){ |
|||
this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data |
|||
}else{ |
|||
this.selCateObj = {} |
|||
} |
|||
console.log(this.selCateObj); |
|||
}, |
|||
|
|||
//重构树,去除网格 |
|||
filterTree(arr) { |
|||
let childs = arr; |
|||
for (let i = childs.length; i--; i > 0) { |
|||
if (childs[i].subCategory) { |
|||
if (childs[i].subCategory.length) { |
|||
this.filterTree(childs[i].subCategory); |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
if (this.eventDetailCopy.parentCategoryId) { |
|||
let pids = this.eventDetailCopy.parentCategoryId.split(','); |
|||
pids.push(this.eventDetailCopy.categoryId) |
|||
pids.forEach(id => { |
|||
let node = this.buildTree(this.casOptions, toString(id)); |
|||
this.selCategoryArray.push(node) |
|||
}); |
|||
let node = this.buildTree(this.casOptions, this.eventDetailCopy.categoryId); |
|||
this.selCategoryArray.push(node); |
|||
console.log(this.selCategoryArray); |
|||
delete childs[i].subCategory; |
|||
} |
|||
}, |
|||
buildTree(nodes, treeId) { |
|||
nodes.forEach(item => { |
|||
if (treeId === item.id) { |
|||
return item; |
|||
} else { |
|||
this.buildTree(item.children, treeId) |
|||
} |
|||
}) |
|||
}, |
|||
handleChangeCate(value) { |
|||
if (this.selCateObj = this.$refs['myCascader'].getCheckedNodes()[0]) { |
|||
this.selCateObj = this.$refs['myCascader'].getCheckedNodes()[0].data |
|||
} |
|||
} |
|||
return arr; |
|||
}, |
|||
async getReplayInfo() { |
|||
this.okflag = false; |
|||
this.$refs["ref_form1"].validate((valid, messageObj) => { |
|||
if (!valid) { |
|||
app.util.validateRule(messageObj); |
|||
} else { |
|||
if (this.status) { |
|||
console.log(this.selCateObj); |
|||
if (!this.selCateObj || !this.selCateObj.id) { |
|||
this.$message.error("请选择事件分类"); |
|||
return false; |
|||
} |
|||
this.formData.status = "closed_case"; |
|||
} else { |
|||
this.selCateObj = {} |
|||
} |
|||
if(!value) return |
|||
this.selCategoryArray = value |
|||
}, |
|||
//重构树,去除网格 |
|||
deepTree(arr, children) { |
|||
if (Array.isArray(arr) && arr.length > 0) { |
|||
return arr.map((item) => { |
|||
return { |
|||
...item, |
|||
[children]: |
|||
(item[children] && |
|||
item[children].length > 0 && |
|||
this.deepTree(item[children], children)) || |
|||
null, |
|||
}; |
|||
}); |
|||
} |
|||
}, |
|||
async getReplayInfo() { |
|||
this.okflag = false; |
|||
this.$refs['ref_form1'].validate((valid, messageObj) => { |
|||
if (!valid) { |
|||
app.util.validateRule(messageObj); |
|||
} else { |
|||
if (this.status) { |
|||
if (!this.selCateObj || !this.selCateObj.id) { |
|||
this.$message.error('请选择事件分类'); |
|||
return false; |
|||
} |
|||
} |
|||
this.formData.categoryList = []; |
|||
this.formData.categoryList.push(this.selCateObj); |
|||
this.okflag = true; |
|||
} |
|||
}); |
|||
}, |
|||
resetData() { }, |
|||
// 开启加载动画 |
|||
startLoading() { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: '正在加载……', // 加载中需要显示的文字 |
|||
background: 'rgba(0,0,0,.7)', // 背景颜色 |
|||
}); |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading() { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close(); |
|||
this.formData.status = "processing"; |
|||
} |
|||
}, |
|||
this.formData.categoryId = this.selCateObj.id; |
|||
this.formData.categoryList = []; |
|||
this.formData.categoryList.push(this.selCateObj); |
|||
|
|||
this.okflag = true; |
|||
} |
|||
}); |
|||
}, |
|||
handleChangeStatus(val){ |
|||
console.log(val); |
|||
if(!val){ |
|||
this.$set(this.dataRule,'categoryList',[]) |
|||
}else{ |
|||
this.$set(this.dataRule,'categoryList',[{ required: true, message: "事件分类不能为空", trigger: "blur" }]) |
|||
} |
|||
console.log(this.dataRule); |
|||
}, |
|||
resetData() {}, |
|||
// 开启加载动画 |
|||
startLoading() { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: "正在加载……", // 加载中需要显示的文字 |
|||
background: "rgba(0,0,0,.7)", // 背景颜色 |
|||
}); |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading() { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close(); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
@import '@/assets/scss/modules/visual/a_customize.scss'; |
|||
@import '@/assets/scss/modules/shequzhili/event-info.scss'; |
|||
|
|||
.el-dialog__body { |
|||
}; |
|||
</script> |
|||
|
|||
|
|||
<style lang='scss' scoped> |
|||
@import "@/assets/scss/modules/visual/a_customize.scss"; |
|||
@import "@/assets/scss/modules/shequzhili/event-info.scss"; |
|||
</style> |
|||
|
|||
|
|||
|
|||
<style scoped> |
|||
.el-dialog__body { |
|||
padding: 0 10px 20px !important; |
|||
} |
|||
</style> |
|||
} |
|||
</style> |
|||
|
|||
@ -0,0 +1,175 @@ |
|||
<template> |
|||
<div class="search"> |
|||
|
|||
<el-form ref="ref_form1" |
|||
:inline="false" |
|||
:model="formData" |
|||
:rules="dataRule"> |
|||
<el-form-item label="处理意见" |
|||
prop="suggestion" |
|||
label-width="150px" |
|||
:class="{'form-item':source==='visiual'}" |
|||
style="display: block"> |
|||
<div :class="{'visiual-form':source==='visiual'}"> |
|||
<el-input class="cell-width-area" |
|||
type="textarea" |
|||
maxlength="500" |
|||
show-word-limit |
|||
:rows="5" |
|||
placeholder="请输入处理意见,不超过500字" |
|||
v-model="formData.suggestion"></el-input> |
|||
</div> |
|||
|
|||
</el-form-item> |
|||
|
|||
</el-form> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { Loading } from "element-ui"; // 引入Loading服务 |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import formVltHelper from "dai-js/tools/formVltHelper"; |
|||
|
|||
import { isCard } from "@/utils/validate"; |
|||
|
|||
let loading; // 加载动画 |
|||
|
|||
|
|||
export default { |
|||
data () { |
|||
return { |
|||
btnDisable: false, |
|||
formData: { |
|||
operationType: '4',//处理方式[0:已回复 1:已转项目 2:已转需求 3:转议题,4上报城管] |
|||
suggestion: '', |
|||
|
|||
}, |
|||
|
|||
|
|||
okflag: false, |
|||
|
|||
eventDetailCopy: {}, |
|||
|
|||
casOptions: [], |
|||
iscascaderShow: 0, |
|||
selCateObj: {}, |
|||
optionProps: { |
|||
multiple: false, |
|||
value: 'id', |
|||
label: 'name', |
|||
children: 'subCategory', |
|||
}, |
|||
|
|||
}; |
|||
}, |
|||
components: {}, |
|||
computed: { |
|||
dataRule () { |
|||
|
|||
return { |
|||
suggestion: [ |
|||
{ required: true, message: "处理建议不能为空", trigger: "blur" }, |
|||
], |
|||
|
|||
}; |
|||
}, |
|||
|
|||
|
|||
}, |
|||
props: { |
|||
eventId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
eventDetailData: { |
|||
type: Object, |
|||
default () { |
|||
return {} |
|||
} |
|||
}, |
|||
source: {//展示来源:manage 管理平台 visiual 可视化平台 |
|||
type: String, |
|||
default: 'manage' |
|||
} |
|||
}, |
|||
watch: {}, |
|||
|
|||
created () { |
|||
|
|||
console.log(this.source) |
|||
|
|||
}, |
|||
|
|||
async mounted () { |
|||
|
|||
if (this.eventId) { |
|||
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData)); |
|||
|
|||
if (this.eventDetailCopy.parentCategoryId && this.eventDetailCopy.categoryId) { |
|||
|
|||
this.selCateObj = { |
|||
name: this.eventDetailCopy.categoryName, |
|||
id: this.eventDetailCopy.categoryId |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
handleChangeCate () { |
|||
console.log(this.$refs["myCascader"].getCheckedNodes()[0].data) |
|||
this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data |
|||
|
|||
}, |
|||
|
|||
async getUrbanInfo () { |
|||
this.okflag = false |
|||
this.$refs["ref_form1"].validate((valid, messageObj) => { |
|||
if (!valid) { |
|||
app.util.validateRule(messageObj); |
|||
|
|||
} else { |
|||
this.okflag = true |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
resetData () { |
|||
|
|||
}, |
|||
// 开启加载动画 |
|||
startLoading () { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: "正在加载……", // 加载中需要显示的文字 |
|||
background: "rgba(0,0,0,.7)", // 背景颜色 |
|||
}); |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading () { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close(); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
|
|||
<style lang='scss' scoped> |
|||
@import "@/assets/scss/modules/visual/a_customize.scss"; |
|||
@import "@/assets/scss/modules/shequzhili/event-info.scss"; |
|||
</style> |
|||
|
|||
|
|||
|
|||
<style> |
|||
.el-dialog__body { |
|||
padding: 0 10px 20px !important; |
|||
} |
|||
</style> |
|||
|
|||
@ -1,201 +1,281 @@ |
|||
<template> |
|||
<div class=""> |
|||
<div> |
|||
<el-form ref="ref_form1" :inline="false" :rules="dataRule" class="form"> |
|||
<el-form-item label="处理方式" label-width="150px" :class="{ 'form-item': source === 'visiual' }" |
|||
prop="operationType"> |
|||
<el-radio-group :class="{ 'form-item': source === 'visiual' }" v-model="operationType" |
|||
@change="handleChangeOperationType"> |
|||
<el-radio v-if="!eventId" label="4">暂不处理</el-radio> |
|||
<el-radio label="0">回复</el-radio> |
|||
<el-radio label="5">指派</el-radio> |
|||
<el-radio label="6">完成并回复</el-radio> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div v-if="operationType === '0'"> |
|||
<process-form-replay ref="ref_process_form_replay" :source="source" :eventDetailData="eventDetailData" |
|||
:eventId="eventId"></process-form-replay> |
|||
</div> |
|||
<div v-if="operationType === '6'"> |
|||
<process-form-replay-end ref="ref_process_form_replay_end" :source="source" |
|||
:eventDetailData="eventDetailData" :eventId="eventId"></process-form-replay-end> |
|||
</div> |
|||
<div v-if="operationType === '5'"> |
|||
<process-form-designate ref="ref_process_form_designate" :source="source" :eventDetailData="eventDetailData" |
|||
:eventId="eventId"></process-form-designate> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<div> |
|||
|
|||
<el-form ref="ref_form1" |
|||
:inline="false" |
|||
:rules="dataRule" |
|||
class="form"> |
|||
|
|||
<el-form-item label="处理方式" |
|||
label-width="150px" |
|||
:class="{'form-item':source==='visiual'}" |
|||
prop="operationType"> |
|||
<el-radio-group :class="{'form-item':source==='visiual'}" |
|||
v-model="operationType" |
|||
@change="handleChangeOperationType"> |
|||
<el-radio v-if="!eventId" |
|||
label="4">暂不处理</el-radio> |
|||
<el-radio label="0">回复</el-radio> |
|||
<el-radio label="1">立项</el-radio> |
|||
<el-radio label="2">转服务</el-radio> |
|||
<el-radio label="3">转议题</el-radio> |
|||
|
|||
</el-radio-group> |
|||
</el-form-item> |
|||
|
|||
</el-form> |
|||
|
|||
<div v-if="operationType==='0'"> |
|||
<process-form-replay ref="ref_process_form_replay" |
|||
:source="source" |
|||
:eventDetailData="eventDetailData" |
|||
:eventId="eventId"></process-form-replay> |
|||
</div> |
|||
|
|||
<div v-if="operationType==='1'"> |
|||
<process-form-project ref="ref_process_form_project" |
|||
:source="source" |
|||
:eventDetailData="eventDetailData" |
|||
:gridId="gridId" |
|||
:eventId="eventId"></process-form-project> |
|||
</div> |
|||
|
|||
<div v-if="operationType==='2'"> |
|||
<process-form-demand ref="ref_process_form_demond" |
|||
:source="source" |
|||
:eventId="eventId" |
|||
:transferObj="transferObj" |
|||
:demandUserId="demandUserId" |
|||
:demandUserName="demandUserName" |
|||
:demandUserMobile="demandUserMobile" |
|||
:eventDetailData="eventDetailData"></process-form-demand> |
|||
|
|||
</div> |
|||
<div v-if="operationType==='3'"> |
|||
<process-form-issue ref="ref_process_form_issue" |
|||
:source="source" |
|||
:eventDetailData="eventDetailData" |
|||
:eventId="eventId"></process-form-issue> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { Loading } from "element-ui"; // 引入Loading服务 |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import processFormReplay from "./process-form-replay"; |
|||
import processFormReplayEnd from "./process-form-replay-end"; |
|||
import processFormProject from "./process-form-project"; |
|||
import processFormDemand from "./process-form-demand"; |
|||
import processFormIssue from "./process-form-issue"; |
|||
import processFormDesignate from "./process-form-designate"; |
|||
|
|||
|
|||
let loading; // 加载动画 |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
casOptions: [], |
|||
iscascaderShow: 0, |
|||
selCategoryArray: [], |
|||
selCateObj: {}, |
|||
optionProps: { |
|||
multiple: false, |
|||
value: 'id', |
|||
label: 'name', |
|||
children: 'subCategory', |
|||
}, |
|||
operationType: '', |
|||
replayInfo: {}, |
|||
demand: {}, |
|||
project: {}, |
|||
issueInfo: {}, |
|||
okflag: false, |
|||
eventDetailCopy: {}, |
|||
transferObj: { |
|||
latitude: "", |
|||
longitude: "" |
|||
} |
|||
}; |
|||
data () { |
|||
return { |
|||
|
|||
casOptions: [], |
|||
iscascaderShow: 0, |
|||
selCategoryArray: [], |
|||
selCateObj: {}, |
|||
optionProps: { |
|||
multiple: false, |
|||
value: 'id', |
|||
label: 'name', |
|||
children: 'subCategory', |
|||
}, |
|||
|
|||
operationType: '', |
|||
|
|||
|
|||
replayInfo: {}, |
|||
demand: {}, |
|||
project: {}, |
|||
issueInfo: {}, |
|||
okflag: false, |
|||
|
|||
eventDetailCopy: {}, |
|||
transferObj:{ |
|||
latitude :"", |
|||
longitude :"" |
|||
} |
|||
}; |
|||
}, |
|||
components: { |
|||
processFormReplay, |
|||
processFormProject, |
|||
processFormDemand, |
|||
processFormIssue |
|||
}, |
|||
computed: { |
|||
dataRule () { |
|||
return { |
|||
|
|||
operationType: [ |
|||
{ required: true, message: "处理方式不能为空", trigger: "blur" }, |
|||
], |
|||
|
|||
}; |
|||
}, |
|||
components: { |
|||
processFormReplay, |
|||
processFormProject, |
|||
processFormDemand, |
|||
processFormIssue, |
|||
processFormDesignate, |
|||
processFormReplayEnd |
|||
|
|||
|
|||
}, |
|||
props: { |
|||
demandUserId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
computed: { |
|||
dataRule() { |
|||
return { |
|||
operationType: [ |
|||
{ required: true, message: "处理方式不能为空", trigger: "blur" }, |
|||
], |
|||
}; |
|||
}, |
|||
demandUserName: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
props: { |
|||
demandUserId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
demandUserName: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
demandUserMobile: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
gridId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
eventId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
eventDetailData: { |
|||
type: Object, |
|||
default() { |
|||
return {} |
|||
} |
|||
}, |
|||
source: {//展示来源:manage 管理平台 visiual 可视化平台 |
|||
type: String, |
|||
default: 'manage' |
|||
} |
|||
demandUserMobile: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
gridId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
eventId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
eventDetailData: { |
|||
type: Object, |
|||
default () { |
|||
return {} |
|||
} |
|||
}, |
|||
source: {//展示来源:manage 管理平台 visiual 可视化平台 |
|||
type: String, |
|||
default: 'manage' |
|||
} |
|||
}, |
|||
|
|||
watch: { |
|||
|
|||
}, |
|||
|
|||
created () { |
|||
|
|||
console.log(this.source) |
|||
|
|||
}, |
|||
|
|||
async mounted () { |
|||
const { user } = this.$store.state |
|||
this.agencyId = user.agencyId |
|||
|
|||
if (this.eventId) { |
|||
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData)); |
|||
|
|||
} |
|||
if(this.eventDetailData.operationType){ |
|||
this.operationType = this.eventDetailCopy.operationType |
|||
// this.getProcessInfo() |
|||
} |
|||
this.$EventBus.$on('map',(val)=>{ |
|||
this.transferObj.latitude = val.lat |
|||
this.transferObj.longitude = val.lng |
|||
}) |
|||
}, |
|||
|
|||
methods: { |
|||
handleChangeOperationType (val) { |
|||
|
|||
}, |
|||
async getProcessInfo () { |
|||
this.okflag = false |
|||
if (this.operationType === '0') { |
|||
this.$refs.ref_process_form_replay.getReplayInfo() |
|||
if (this.$refs.ref_process_form_replay.okflag) { |
|||
this.replayInfo = this.$refs.ref_process_form_replay.formData |
|||
|
|||
this.okflag = true |
|||
|
|||
} else { |
|||
return false |
|||
} |
|||
|
|||
watch: {}, |
|||
} else if (this.operationType === '1') { |
|||
this.$refs.ref_process_form_project.getProjectInfo() |
|||
if (this.$refs.ref_process_form_project.okflag) { |
|||
|
|||
created() { }, |
|||
this.project = this.$refs.ref_process_form_project.formData |
|||
|
|||
async mounted() { |
|||
const { user } = this.$store.state |
|||
this.agencyId = user.agencyId |
|||
if (this.eventId) { |
|||
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData)); |
|||
//赋值分类信息 |
|||
this.okflag = true |
|||
|
|||
} else { |
|||
return false |
|||
} |
|||
if (this.eventDetailData.operationType) { |
|||
this.operationType = this.eventDetailCopy.operationType |
|||
} else if (this.operationType === '2') { |
|||
this.$refs.ref_process_form_demond.getDemandInfo() |
|||
if (this.$refs.ref_process_form_demond.okflag) { |
|||
this.demand = this.$refs.ref_process_form_demond.formData |
|||
|
|||
this.okflag = true |
|||
|
|||
} else { |
|||
return false |
|||
} |
|||
this.$EventBus.$on('map', (val) => { |
|||
this.transferObj.latitude = val.lat |
|||
this.transferObj.longitude = val.lng |
|||
}) |
|||
} else if (this.operationType === '3') { |
|||
this.$refs.ref_process_form_issue.getIssueInfo() |
|||
if (this.$refs.ref_process_form_issue.okflag) { |
|||
this.issueInfo = this.$refs.ref_process_form_issue.formData |
|||
|
|||
this.okflag = true |
|||
|
|||
} else { |
|||
return false |
|||
} |
|||
} |
|||
|
|||
}, |
|||
|
|||
methods: { |
|||
handleChangeOperationType(val) { |
|||
this.operationType = val; |
|||
}, |
|||
async getProcessInfo() { |
|||
this.okflag = false |
|||
if (this.operationType === '0') { |
|||
this.$refs.ref_process_form_replay.getReplayInfo() |
|||
if (this.$refs.ref_process_form_replay.okflag) { |
|||
this.replayInfo = this.$refs.ref_process_form_replay.formData; |
|||
this.okflag = true; |
|||
} |
|||
} else if (this.operationType === '5') { |
|||
this.$refs.ref_process_form_designate.getReplayInfo() |
|||
this.replayInfo = this.$refs.ref_process_form_designate.formData |
|||
if (this.$refs.ref_process_form_designate.okflag) { |
|||
this.replayInfo = this.$refs.ref_process_form_designate.formData |
|||
this.okflag = true |
|||
} |
|||
} else if (this.operationType === '6') { |
|||
this.$refs.ref_process_form_replay_end.getReplayInfo() |
|||
this.replayInfo = this.$refs.ref_process_form_replay_end.formData |
|||
if (this.$refs.ref_process_form_replay_end.okflag) { |
|||
this.replayInfo = this.$refs.ref_process_form_replay_end.formData |
|||
this.okflag = true |
|||
} |
|||
}else { |
|||
return false |
|||
} |
|||
}, |
|||
handleCancle() { |
|||
this.resetData(); |
|||
}, |
|||
// 开启加载动画 |
|||
startLoading() { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: "正在加载……", // 加载中需要显示的文字 |
|||
background: "rgba(0,0,0,.7)", // 背景颜色 |
|||
}); |
|||
}, |
|||
resetData() { |
|||
|
|||
}, |
|||
// 结束加载动画 |
|||
endLoading() { |
|||
if (loading) { |
|||
loading.close(); |
|||
} |
|||
}, |
|||
|
|||
handleCancle () { |
|||
this.resetData(); |
|||
|
|||
}, |
|||
resetData () { |
|||
|
|||
}, |
|||
// 开启加载动画 |
|||
startLoading () { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: "正在加载……", // 加载中需要显示的文字 |
|||
background: "rgba(0,0,0,.7)", // 背景颜色 |
|||
}); |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading () { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close(); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
|
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/modules/shequzhili/event-info.scss"; |
|||
</style> |
|||
|
|||
|
|||
|
|||
<style scoped> |
|||
.el-dialog__body { |
|||
padding: 0 10px 20px !important; |
|||
padding: 0 10px 20px !important; |
|||
} |
|||
</style> |
|||
|
|||
@ -0,0 +1,202 @@ |
|||
<template> |
|||
<div class="g-main"> |
|||
<div> |
|||
<div class="m-table"> |
|||
<div class="div_btn"><el-button size="small" type="primary " @click="handleAdd({}, 'add')">新增</el-button></div> |
|||
<el-table :data="tableData" border class="m-table-item" style="width: 100%" :height="maxTableHeight"> |
|||
<!-- <el-table-column label="" fixed="left" type="selection" align="center" width="50" /> --> |
|||
<el-table-column label="序号" fixed="left" type="index" align="center" width="50" /> |
|||
<el-table-column prop="categoryName" align="center" label="分类名称" :show-overflow-tooltip="true"></el-table-column> |
|||
<!-- <el-table-column prop="awardPoint" align="center" label="积分" :show-overflow-tooltip="true"></el-table-column> --> |
|||
<el-table-column prop="usableFlag" label="状态" min-width="140" align="center" :show-overflow-tooltip="true"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="scope.row.usableFlag == '0'">禁用</span> |
|||
<span v-if="scope.row.usableFlag == '1'">启用</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" align="center" width="200"> |
|||
<template slot-scope="scope"> |
|||
<el-button @click="handleHid(scope.row)" type="text" size="small" v-if="scope.row.usableFlag == '1'" class="">禁用</el-button> |
|||
<el-button @click="handleHid(scope.row)" type="text" size="small" v-if="scope.row.usableFlag == '0'" class="">启用</el-button> |
|||
<el-button style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">修改</el-button> |
|||
<el-button style="margin-right: 10px" @click="handleDel(scope.row)" size="small" type="text">删除</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> |
|||
</div> |
|||
<addForm :detailId="detailId" :pageType="pageType" v-if="dialogVisible" :dialogVisible="dialogVisible" @handleClose="handleClose" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { requestPost } from '@/js/dai/request'; |
|||
import nextTick from 'dai-js/tools/nextTick'; |
|||
import { mapGetters } from 'vuex'; |
|||
import addForm from './hobbyItemsComponents/addForm.vue'; |
|||
import axios from 'axios'; |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
dialogVisible: false, |
|||
warnFlagList: [{ value: '0', label: '否' }, { value: '1', label: '是' }], |
|||
intelligentFlagList: [{ value: '0', label: '不开启' }, { value: '1', label: '开启' }], |
|||
disabled: false, |
|||
user: '', |
|||
agencyId: '', |
|||
formData: {}, |
|||
customerId: '', |
|||
pageType: 'list', // 列表list 新增add 处理dispose 详情info |
|||
gridList: [], //所属网格list--场所区域 |
|||
placeTypeList: [], //场所类型 |
|||
tableData: [], |
|||
pageNo: 1, |
|||
pageSize: window.localStorage.getItem('pageSize') || 20, |
|||
total: 1, |
|||
detailId: '', |
|||
detailData: {}, |
|||
multipleSelection: [], |
|||
rowObj: {}, |
|||
importLoading: false |
|||
}; |
|||
}, |
|||
components: { addForm }, |
|||
created() {}, |
|||
computed: { |
|||
maxTableHeight() { |
|||
return this.$store.state.inIframe ? this.clientHeight - 410 + this.iframeHeigh : this.clientHeight - 410; |
|||
}, |
|||
...mapGetters(['clientHeight', 'iframeHeight']) |
|||
}, |
|||
watch: {}, |
|||
mounted() { |
|||
this.user = this.$store.state.user; |
|||
this.agencyId = this.user.agencyId; |
|||
this.customerId = this.user.customerId; |
|||
console.log('this.customerId ', this.customerId); |
|||
this.getTableData(); |
|||
}, |
|||
methods: { |
|||
async handleDel(rowData) { |
|||
let message = '确认删除?'; |
|||
this.$confirm(message, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}) |
|||
.then(() => { |
|||
this.del(rowData.categoryId); |
|||
}) |
|||
.catch(err => {}); |
|||
}, |
|||
async del(id) { |
|||
const url = `/actual/base/hobbyitem/delete/${id}`; |
|||
|
|||
const { data, code, msg } = await requestPost(url); |
|||
if (code === 0) { |
|||
this.$message.success('删除成功!'); |
|||
this.getTableData(); |
|||
} else { |
|||
this.$message.error('操作失败!'); |
|||
} |
|||
}, |
|||
handleAdd(row, type) { |
|||
if (row.categoryId) { |
|||
this.detailId = row.categoryId; |
|||
} |
|||
this.pageType = type; |
|||
this.dialogVisible = true; |
|||
}, |
|||
async handleHid(row) { |
|||
let usableFlag = ''; |
|||
if (row.usableFlag == '1') { |
|||
usableFlag = false; |
|||
} else { |
|||
usableFlag = true; |
|||
} |
|||
const url = '/actual/base/hobbyitem/updatestatus'; |
|||
const param = { |
|||
categoryId: row.categoryId, |
|||
usableFlag: usableFlag |
|||
}; |
|||
// const url = 'http://yapi.elinkservice.cn/mock/330/actual/base/enterprise/list'; |
|||
const { pageSize, pageNo, formData } = this; |
|||
const { data, code, msg } = await requestPost(url, param); |
|||
if (code === 0) { |
|||
this.$message.success('操作成功'); |
|||
this.getTableData(); |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
handleSearch(val) { |
|||
console.log(this.formData); |
|||
this.pageNo = 1; |
|||
this.getTableData(); |
|||
}, |
|||
handleClose() { |
|||
this.dialogVisible = false; |
|||
this.detailId = ''; |
|||
this.getTableData(); |
|||
}, |
|||
|
|||
async getTableData() { |
|||
const url = '/actual/base/hobbyitem/list'; |
|||
// const url = 'http://yapi.elinkservice.cn/mock/330/actual/base/enterprise/list'; |
|||
const { pageSize, pageNo, customerId } = this; |
|||
const { data, code, msg } = await requestPost(url, { |
|||
pageSize, |
|||
pageNo, |
|||
customerId |
|||
}); |
|||
if (code === 0) { |
|||
this.total = data.total || 0; |
|||
this.tableData = data.list |
|||
? data.list.map(item => { |
|||
return item; |
|||
}) |
|||
: []; |
|||
} 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.formData = { |
|||
customerId |
|||
}; |
|||
this.pageNo = 1; |
|||
this.getTableData(); |
|||
} |
|||
} |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import '@/assets/scss/modules/management/list-main.scss'; |
|||
.m-search { |
|||
.u-item-width-normal { |
|||
width: 200px; |
|||
} |
|||
} |
|||
</style> |
|||
@ -0,0 +1,312 @@ |
|||
<template> |
|||
<el-dialog |
|||
:visible.sync="dialogVisible" |
|||
width="800px" |
|||
:before-close="handleCancle" |
|||
> |
|||
<span slot="title"> |
|||
<span v-if="pageType == 'add'">新增</span> |
|||
<span v-if="pageType == 'edit'">修改</span> |
|||
<span v-if="pageType == 'view'">查看</span> |
|||
</span> |
|||
<div> |
|||
<el-form |
|||
:model="formData" |
|||
ref="form" |
|||
:rules="dataRule" |
|||
:label-width="'120px'" |
|||
> |
|||
<el-form-item label="分类名称" prop="categoryName"> |
|||
<el-input |
|||
v-model="formData.categoryName" |
|||
class="u-item-width-normal" |
|||
size="small" |
|||
clearable |
|||
placeholder="请输入" |
|||
></el-input> |
|||
</el-form-item> |
|||
|
|||
<!-- <el-form-item label="奖励积分" prop="awardPoint"> |
|||
<el-input-number v-model="formData.awardPoint" class="u-item-width-normal" size="small" clearable placeholder="请输入"></el-input-number> |
|||
</el-form-item> --> |
|||
<el-form-item label="对应个性需求" prop="demandList"> |
|||
<el-cascader |
|||
ref="cascaderItem1" |
|||
:options="demandOptions" |
|||
:props="props1" |
|||
v-model="formData.demandList1" |
|||
@change="handleAreaChange1" |
|||
clearable |
|||
></el-cascader> |
|||
</el-form-item> |
|||
<el-form-item label="对应公共服务" prop="commonServiceTypeList"> |
|||
<el-cascader |
|||
ref="cascaderItem2" |
|||
:options="commonServiceTypeOptions" |
|||
:props="props2" |
|||
v-model="formData.commonServiceTypeList1" |
|||
@change="handleAreaChange2" |
|||
clearable |
|||
></el-cascader> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> |
|||
<span slot="footer" class="dialog-footer"> |
|||
<el-button @click="handleCancle">取 消</el-button> |
|||
<el-button type="primary" @click="handleComfirm">确 定</el-button> |
|||
</span> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
import { isMobile } from "@/utils/validate"; |
|||
import { mapGetters } from "vuex"; |
|||
import { Loading } from "element-ui"; // 引入Loading服务 |
|||
import { requestPost, requestGet } from "@/js/dai/request"; |
|||
import daiMap from "@/utils/dai-map"; |
|||
import nextTick from "dai-js/tools/nextTick"; |
|||
|
|||
let loading; // 加载动画 |
|||
let map; |
|||
var search; |
|||
var markers; |
|||
var infoWindowList; |
|||
var geocoder; // 新建一个正逆地址解析类 |
|||
|
|||
export default { |
|||
props: { |
|||
detailId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
|
|||
dialogVisible: { |
|||
type: Boolean, |
|||
default: "", |
|||
}, |
|||
pageType: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
props1: { |
|||
multiple: true, |
|||
value: "value", |
|||
label: "label", |
|||
children: "children", |
|||
}, |
|||
props2: { |
|||
value: "id", |
|||
label: "name", |
|||
children: "childrenList", |
|||
multiple: true, |
|||
}, |
|||
categoryCodeArr: {}, |
|||
demandOptions: [], |
|||
commonServiceTypeOptions: [], |
|||
index: -1, //判断这个是arr中的第几个 |
|||
arr: [ |
|||
"育龄妇女", |
|||
"老年人", |
|||
"空巢老人", |
|||
"独居老人", |
|||
"租户", |
|||
"残疾", |
|||
"大病", |
|||
"慢病", |
|||
], |
|||
btnDisable: false, |
|||
user: "", |
|||
agencyId: "", |
|||
marryList: [ |
|||
{ value: "-1", label: "不限制" }, |
|||
{ value: "0", label: "未婚" }, |
|||
{ value: "1", label: "已婚" }, |
|||
], |
|||
list: {}, |
|||
formData: { |
|||
// awardPoint: '', |
|||
categoryId: "", |
|||
categoryName: "", |
|||
demandList1: [], |
|||
commonServiceTypeList1: [], |
|||
demandList: [], |
|||
commonServiceTypeList: [], |
|||
}, |
|||
dataRule: { |
|||
categoryName: [ |
|||
{ required: true, message: "分类名称不能为空", trigger: "bulr" }, |
|||
], |
|||
// awardPoint: [{ required: true, message: '奖励积分不能为空', trigger: 'bulr' }], |
|||
// demandList: [{ required: true, message: '对应个性需求不能为空', trigger: 'blur' }], |
|||
// commonServiceTypeList: [{ required: true, message: '对应公共服务不能为空', trigger: 'bulr' }] |
|||
}, |
|||
}; |
|||
}, |
|||
watch: {}, |
|||
|
|||
created() {}, |
|||
async mounted() { |
|||
this.user = this.$store.state.user; |
|||
this.agencyId = this.user.agencyId; |
|||
this.startLoading(); |
|||
if (this.pageType == "edit") { |
|||
this.getDetail(); |
|||
} |
|||
this.getDemandOptions(); |
|||
this.getCommonServiceTypeOptions(); |
|||
await this.endLoading(); |
|||
this.endLoading(); |
|||
}, |
|||
|
|||
methods: { |
|||
handleAreaChange1(data) { |
|||
let that = this; |
|||
let demandList = []; |
|||
const obj = this.$refs["cascaderItem1"].getCheckedNodes(); |
|||
//标签上定义的 ref值 |
|||
obj.forEach((item) => { |
|||
if (item.data.pvalue != "0") { |
|||
let obj2 = { |
|||
demandCategoryId: item.data.id, |
|||
demandCategoryCode: item.data.value, |
|||
demandParentCode: item.data.pvalue, |
|||
}; |
|||
demandList.push(obj2); |
|||
} |
|||
}); |
|||
that.formData.demandList = [...demandList]; |
|||
}, |
|||
handleAreaChange2(data) { |
|||
let that = this; |
|||
let commonServiceTypeList = []; |
|||
const obj = this.$refs["cascaderItem2"].getCheckedNodes(); |
|||
//标签上定义的 ref值 |
|||
obj.forEach((item) => { |
|||
let obj2 = { |
|||
commonServiceTypeId: item.data.id, |
|||
commonServiceTypePid: item.data.pid, |
|||
}; |
|||
commonServiceTypeList.push(obj2); |
|||
}); |
|||
that.formData.commonServiceTypeList = [...commonServiceTypeList]; |
|||
}, |
|||
getTreeData(data) { |
|||
if (!Array.isArray(data)) return []; |
|||
let arr = data.map((item) => { |
|||
let _item = {}; |
|||
if (item.children) { |
|||
if (item.children.length === 0) |
|||
_item = { ...item, children: undefined }; |
|||
else _item = { ...item, children: this.getTreeData(item.children) }; |
|||
} else { |
|||
_item = { ...item }; |
|||
} |
|||
return _item; |
|||
}); |
|||
return arr; |
|||
}, |
|||
|
|||
async getDemandOptions() { |
|||
const url = `/governance/icresidemanddict/demandoption`; |
|||
const { data, code, msg } = await requestPost(url); |
|||
if (code === 0) { |
|||
console.log("this.demandOptions", data); |
|||
this.demandOptions = this.getTreeData(data); |
|||
// console.log("this.demandOptions",this.demandOptions) |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
async getCommonServiceTypeOptions() { |
|||
const url = `/governance/commonServiceType/treeList`; |
|||
const { data, code, msg } = await requestGet(url); |
|||
if (code === 0) { |
|||
this.commonServiceTypeOptions = data; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
async getDetail() { |
|||
const url = `/actual/base/hobbyitem/detail/${this.detailId}`; |
|||
const { data, code, msg } = await requestPost(url); |
|||
if (code === 0) { |
|||
console.log("详情数据", data); |
|||
this.formData = { ...data }; |
|||
this.fenxiData(); |
|||
this.index = this.arr.indexOf(this.formData.categoryName); |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
fenxiData() { |
|||
let that = this; |
|||
let commonServiceTypeList1 = []; |
|||
let demandList1 = []; |
|||
this.formData.commonServiceTypeList.forEach((item) => { |
|||
let arr = [item.commonServiceTypePid, item.commonServiceTypeId]; |
|||
commonServiceTypeList1.push(arr); |
|||
}); |
|||
this.formData.demandList.forEach((item) => { |
|||
console.log(item); |
|||
let arr2 = [item.demandParentCode, item.demandCategoryCode]; |
|||
demandList1.push(arr2); |
|||
}); |
|||
this.formData.commonServiceTypeList1 = [...commonServiceTypeList1]; |
|||
this.formData.demandList1 = [...demandList1]; |
|||
}, |
|||
handleComfirm() { |
|||
this.save(); |
|||
}, |
|||
|
|||
async save() { |
|||
let form = this.formData; |
|||
this.handleAreaChange1(); |
|||
this.handleAreaChange2(); |
|||
console.log("this.formData", this.formData); |
|||
const url = "/actual/base/hobbyitem/saveorupdate"; |
|||
var params = {}; |
|||
params = { ...this.formData }; |
|||
const { data, code, msg } = await requestPost(url, params); |
|||
if (code === 0) { |
|||
this.$message.success("操作成功"); |
|||
this.handleCancle(); |
|||
} else if (code >= 8000) { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
handleCancle() { |
|||
// this.resetData(); |
|||
this.$emit("handleClose"); |
|||
}, |
|||
resetData() { |
|||
this.$refs.form.resetFields(); |
|||
}, |
|||
// 开启加载动画 |
|||
startLoading() { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: "正在加载……", // 加载中需要显示的文字 |
|||
background: "rgba(0,0,0,.7)", // 背景颜色 |
|||
}); |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading() { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close(); |
|||
} |
|||
}, // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/modules/management/form-main.scss"; |
|||
@import "@/assets/scss/modules/management/form.scss"; |
|||
@import "@/assets/scss/modules/visual/a_customize.scss"; |
|||
</style> |
|||