Browse Source

事件管理

shibei_master
jiangyy 3 years ago
parent
commit
5088376449
  1. 227
      src/assets/scss/modules/shequzhili/event-info.scss
  2. 874
      src/views/modules/communityService/measure/index.vue
  3. 127
      src/views/modules/shequzhili/event/cpts/add.vue
  4. 882
      src/views/modules/shequzhili/event/cpts/edit.vue
  5. 141
      src/views/modules/shequzhili/event/cpts/event-detail.vue
  6. 318
      src/views/modules/shequzhili/event/cpts/event-info.vue
  7. 288
      src/views/modules/shequzhili/event/cpts/issue-info.vue
  8. 154
      src/views/modules/shequzhili/event/cpts/issue-suggest.vue
  9. 579
      src/views/modules/shequzhili/event/cpts/process-form-demand.vue
  10. 495
      src/views/modules/shequzhili/event/cpts/process-form-project.vue
  11. 91
      src/views/modules/shequzhili/event/cpts/process-form.vue
  12. 154
      src/views/modules/shequzhili/event/cpts/project-evaluation.vue
  13. 60
      src/views/modules/shequzhili/event/eventList.vue

227
src/assets/scss/modules/shequzhili/event-info.scss

@ -23,15 +23,7 @@
}
.div_map {
position: relative;
}
.div_searchmap {
z-index: 1000;
position: absolute;
top: 5px;
left: 5px;
}
}
}
}
@ -55,6 +47,15 @@
width: 450px
}
}
.div_map {
position: relative;
}
.div_searchmap {
z-index: 1000;
position: absolute;
top: 5px;
left: 5px;
}
.div-btn{
margin-top:50px;
@ -64,6 +65,9 @@
.cell-width-1{
width: 250px
}
.cell-width-long{
width: 450px
}
.cell-width-2{
width: 350px
}
@ -92,128 +96,125 @@
justify-content: center;
}
.m-info {
padding-left: 10px;
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #333;
line-height: 24px;
// width: 500px;
.info-title {
margin-top: 30px;
font-size: 20px;
font-family: PingFang SC;
font-weight: bold;
color: #333;
line-height: 30px;
}
.info-content {
margin: 20px 0;
}
.info-pics {
display: flex;
margin: 20px 0;
img {
display: block;
width: 32%;
height: 90px;
margin-right: 9px;
object-fit: cover;
}
}
padding-left: 30px;
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #333;
line-height: 24px;
// width: 500px;
.info-title {
margin-top: 30px;
font-size: 20px;
font-family: PingFang SC;
font-weight: bold;
color: #333;
line-height: 30px;
}
.info-content {
margin: 20px 0;
}
.info-pics {
display: flex;
margin: 20px 0;
img {
display: block;
width: 32%;
height: 90px;
margin-right: 9px;
object-fit: cover;
}
}
.info-prop {
position: relative;
margin: 10px 0;
display: flex;
padding-left: 15px;
.info-title-2 {
width: 70px;
flex: 0 0 1;
font-size: 14px;
}
.info-prop {
position: relative;
margin: 10px 0;
display: flex;
padding-left: 15px;
.info-title-2 {
width: 70px;
flex: 0 0 1;
font-size: 14px;
}
> span,
> div {
display: block;
// max-width: 300px;
}
> span,
> div {
display: block;
// max-width: 300px;
}
&::before {
content: "";
display: block;
position: absolute;
top: 9px;
left: 0;
width: 7px;
height: 7px;
background: #0c81fe;
border-radius: 3px;
margin-right: 10px;
}
}
&::before {
content: "";
display: block;
position: absolute;
top: 9px;
left: 0;
width: 7px;
height: 7px;
background: #0c81fe;
border-radius: 3px;
margin-right: 10px;
}
}
}
.m-case {
height: 600px;
padding: 20px 0 20px 0;
overflow-y: auto;
height: 600px;
padding: 20px 0 20px 0;
overflow-y: auto;
}
.m-row {
display: flex;
justify-content: space-between;
display: flex;
justify-content: space-between;
}
.m-hint {
position: relative;
height: 300px;
// 暂无数据
img {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
}
position: relative;
height: 300px;
// 暂无数据
img {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
}
}
.m-line {
min-width: 400px;
.stat {
margin: 20px 0 10px;
display: flex;
.stat-item {
width: 33%;
text-align: center;
div {
font-size: 17px;
font-family: Source Han Serif SC;
font-weight: 500;
color: rgba(#000, 0.5);
line-height: 24px;
&.z-weak {
font-size: 12px;
font-family: Source Han Serif SC;
font-weight: 500;
color: rgba(#000, 0.5);
line-height: 24px;
}
}
}
}
min-width: 400px;
.stat {
margin: 20px 0 10px;
display: flex;
.stat-item {
width: 33%;
text-align: center;
div {
font-size: 17px;
font-family: Source Han Serif SC;
font-weight: 500;
color: rgba(#000, 0.5);
line-height: 24px;
&.z-weak {
font-size: 12px;
font-family: Source Han Serif SC;
font-weight: 500;
color: rgba(#000, 0.5);
line-height: 24px;
}
}
}
}
}
.m-tb {
padding-left: 62px;
padding-right: 40px;
}

874
src/views/modules/communityService/measure/index.vue

File diff suppressed because it is too large

127
src/views/modules/shequzhili/event/cpts/add.vue

@ -33,6 +33,11 @@
placeholder="请输入报事人姓名"
v-model="formData.name">
</el-input>
<el-button style="margin-left: 10px"
type="primary"
size="mini"
@click="handleShowPersonList">居民信息中选择</el-button>
</el-form-item>
<el-form-item label="手机号"
prop="mobile"
@ -178,6 +183,62 @@
</div>
<!-- 新增弹出框 -->
<el-dialog :visible.sync="personTableShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
title="选择居民"
width="550px"
top="5vh"
class="dialog-h"
@closed="diaClose">
<div style="padding:10px 30px">
<el-form :inline="false"
ref="ref_formSearch"
:label-width="'90px'">
<el-form-item label="所属网格"
label-width="150px">
<el-select class="cell-width-1"
v-model.trim="selGridId"
placeholder="请选择"
@change="handleChangeGrid"
clearable>
<el-option v-for="item in gridList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="居民"
label-width="150px"
prop="selPersonIndex">
<el-select v-model="selPersonIndex"
class="cell-width-1"
filterable
placeholder="请选择"
clearable>
<el-option v-for="(item,index) in demandUserList"
:key="item.demandUserId"
:label="item.label"
:value="index">
</el-option>
</el-select>
</el-form-item>
</el-form>
<div class="div-btn ">
<el-button style="margin-left:20px"
type="primary"
size="small"
@click="handleComfirmSelPerson">确定</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
@ -243,9 +304,6 @@ export default {
label: "网络员手持终端",
},
],
aaa: {
aaa: 1
},
formData: iniFmData(),
formDataTemp: {
@ -275,7 +333,17 @@ export default {
upload_name: '', //
replayImgList: [],
okflag: false
okflag: false,
formDataSearch: {
gridId: '',
name: ''
},
personTableShow: false,
selGridId: '',
selPersonIndex: '',
selPerson: {},
demandUserList: []
};
},
components: {},
@ -325,7 +393,17 @@ export default {
},
props: {},
watch: {},
watch: {
"formData.name": function (val) {
this.$emit("changeName", val)
},
"formData.mobile": function (val) {
this.$emit("changeMobile", val)
},
"formData.reportUserId": function (val) {
this.$emit("changeUserId", val)
},
},
async mounted () {
const { user } = this.$store.state
@ -340,6 +418,44 @@ export default {
},
methods: {
handleShowPersonList () {
this.personTableShow = true;
},
diaClose () {
this.personTableShow = false;
},
handleComfirmSelPerson () {
this.personTableShow = true;
},
async handleChangeGrid () {
const url = "/epmetuser/icresiuser/demandusers"
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page"
let params = {
agencyId: '',
gridId: this.selGridId,
name: "",
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.demandUserList = data;
} else {
this.$message.error(msg)
}
this.tableLoading = false
},
async loadGrid () {
const url = "/gov/org/customergrid/gridoption"
@ -576,6 +692,7 @@ export default {
resetData () {
this.formData = iniFmData();
this.replayImgList = []
},
//
startLoading () {

882
src/views/modules/shequzhili/event/cpts/edit.vue

@ -1,882 +0,0 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<el-form
ref="ref_form"
:inline="true"
:model="fmData"
:rules="dataRule"
:disabled="formType === 'detail'"
class="form"
>
<el-form-item
label="所属网格 "
prop="gridId"
label-width="150px"
style="display: block"
>
<el-select
v-model.trim="fmData.gridId"
placeholder="请选择"
size="small"
clearable
class="resi-cell-select"
@change="handleChangeGrid"
:disabled="formType === 'edit'"
style="width: 250px"
>
<el-option
v-for="item in optionsG"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="所属房屋 "
prop="homeId"
label-width="150px"
style="display: block"
>
<el-select
v-model.trim="fmData.villageId"
placeholder="请选择小区"
size="small"
clearable
class="resi-cell-select"
@clear="handleClearVillage"
@change="handleChangeV"
:disabled="formType === 'edit'"
style="margin-right: 8px; width: 120px"
>
<el-option
v-for="item in optionsV"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-select
v-model.trim="fmData.buildId"
placeholder="楼号"
size="small"
clearable
style="margin-right: 8px; width: 120px"
class="resi-cell-select"
:disabled="changeVDisabled || formType === 'edit'"
@clear="handleClearBuild"
@change="handleChangeB"
>
<el-option
v-for="item in optionsB"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-select
v-model.trim="fmData.unitId"
:disabled="changeBDisabled || formType === 'edit'"
placeholder="单元"
size="small"
clearable
style="margin-right: 8px; width: 120px"
class="resi-cell-select"
@click="handleClearDan"
@change="handleChangeD"
>
<el-option
v-for="item in optionsD"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-select
v-model.trim="fmData.homeId"
:disabled="changeDDisabled || formType === 'edit'"
placeholder="房号"
size="small"
clearable
@change="handleChangeH"
style="width: 120px"
class="resi-cell-select"
>
<el-option
v-for="item in optionsH"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="姓名"
prop="name"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
maxlength="30"
show-word-limit
style="width: 200px; margin-right: 20px"
placeholder="请输入姓名 "
:disabled="formType === 'edit'"
v-model="fmData.name"
>
</el-input>
<el-checkbox
v-model="fmData.isWelfare"
:disabled="formType === 'edit'"
true-label="1"
false-label="0"
>享受福利</el-checkbox
>
<el-checkbox
v-model="fmData.isCheck"
true-label="1"
false-label="0"
:disabled="formType === 'edit'"
@change="checkResiAvailable"
>补充居民信息</el-checkbox
>
</el-form-item>
<el-form-item
label="手机号"
prop="mobile"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
maxlength="30"
show-word-limit
placeholder="请输入手机号 "
v-model="fmData.mobile"
:disabled="formType === 'edit'"
>
</el-input>
</el-form-item>
<el-form-item
label="身份证号"
prop="idCard"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
maxlength="30"
placeholder="请输入身份证号"
v-model="fmData.idCard"
@blur="handleBlurId"
:disabled="formType === 'edit'"
></el-input>
</el-form-item>
<el-form-item
label="性别"
prop="principalName"
label-width="150px"
style="display: block"
>
<el-select
v-model.trim="fmData.gender"
placeholder="性别"
size="small"
clearable
style="width: 120px"
class="resi-cell-select"
:disabled="formType === 'edit'"
>
<el-option
v-for="item in optionsGender"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="出生日期"
prop="birthday"
label-width="150px"
style="display: block"
>
<el-date-picker
v-model="fmData.birthday"
type="date"
placeholder="出生日期"
value-format="yyyy-MM-dd"
:disabled="formType === 'edit'"
>
</el-date-picker>
</el-form-item>
<el-form-item
label="出生地"
prop="birthplace"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入出生地"
v-model="fmData.birthplace"
>
</el-input>
</el-form-item>
<el-form-item
label="出生人父亲姓名"
prop="father"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
maxlength="30"
show-word-limit
placeholder="请输入出生人父亲姓名"
v-model="fmData.father"
>
</el-input>
</el-form-item>
<el-form-item
label="出生人母亲姓名"
prop="mother"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
maxlength="30"
show-word-limit
placeholder="请输入出生人母亲姓名"
v-model="fmData.mother"
>
</el-input>
</el-form-item>
<el-form-item
label="胎次"
prop="count"
label-width="150px"
style="display: block"
>
<el-input-number
v-model="fmData.count"
:min="1"
:max="50"
label="请输入胎次"
></el-input-number>
</el-form-item>
<el-form-item
label="申报户口日期"
prop="reportDate"
label-width="150px"
style="display: block"
>
<el-date-picker
v-model="fmData.reportDate"
placeholder="申报户口日期"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
<el-form-item
label="户主姓名"
prop="householderName"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
maxlength="50"
show-word-limit
placeholder="请输入户主姓名"
:disabled="fmData.alreadyHaveMaster"
v-model="fmData.householderName"
>
</el-input>
</el-form-item>
<el-form-item
label="与户主关系"
prop="householderRelation"
label-width="150px"
style="display: block"
>
<el-select
v-model.trim="fmData.householderRelation"
placeholder="与户主关系"
size="small"
clearable
style="width: 120px"
class="resi-cell-select"
>
<el-option
v-for="item in optionsRelation"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
v-if="false"
label="备注"
prop="remark"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
type="textarea"
maxlength="500"
show-word-limit
:rows="3"
placeholder="请输入备注,不超过500字"
v-model="fmData.remark"
></el-input>
</el-form-item>
</el-form>
</div>
<div class="div_btn resi-btns">
<el-button size="small" @click="handleCancle"> </el-button>
<el-button
v-if="formType != 'detail'"
type="primary"
size="small"
:disabled="btnDisable"
@click="handleComfirm"
> </el-button
>
</div>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
import formVltHelper from "dai-js/tools/formVltHelper";
import { computedCard } from "@/utils/index";
import { isCard } from "@/utils/validate";
let loading; //
function iniFmData() {
return {
id: "",
gridId: "",
villageId: "",
buildId: "",
unitId: "",
homeId: "",
name: "",
mobile: "",
idCard: "",
isWelfare: "0", //01
isCheck: "0",
isReplace: "0",
gender: "",
birthplace: "",
father: "",
mother: "",
count: "",
reportDate: "",
householderName: "",
householderRelation: "",
alreadyHaveMaster: false,
};
}
export default {
data() {
return {
formType: "add", // addeditdetail
btnDisable: false,
optionsV: [],
optionsB: [],
optionsH: [],
optionsD: [],
optionsG: [],
optionsRelation: [],
optionsGender: [
{
value: "1",
label: "男",
},
{
value: "2",
label: "女",
},
],
fmData: iniFmData(),
checkResult: {},
};
},
components: {},
computed: {
dataRule() {
let checkIdCard = (rule, value, callback) => {
if (value === "") {
callback(new Error("请输入身份证"));
} else {
if (!isCard(value)) {
callback(new Error("身份证号格式不正确"));
}
callback();
}
};
return {
gridId: [
{ required: true, message: "所属网格不能为空", trigger: "blur" },
],
homeId: [
{ required: true, message: "所属房屋不能为空", trigger: "blur" },
],
name: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
idCard: [
{ required: true, message: "身份证号不能为空", trigger: "blur" },
{ required: true, validator: checkIdCard, trigger: "blur" },
],
birthplace: [
{ required: true, message: "出生地不能为空", trigger: "blur" },
],
};
},
changeVDisabled() {
return !this.fmData.villageId;
},
changeBDisabled() {
return !this.fmData.buildId;
},
changeDDisabled() {
return !this.fmData.unitId;
},
},
props: {},
watch: {},
async mounted() {
this.getGridList();
this.getValiheList();
this.getRelationList();
},
methods: {
async checkResiAvailable() {
const {
fmData: { idCard, isCheck },
} = this;
if (isCheck == "1" && isCard(idCard)) {
const { data, code, msg } = await requestPost(
"/epmetuser/icresiuser/checkuser",
{
idCard,
agencyId: this.$store.state.user.agencyId,
}
);
if (code === 0) {
this.checkResult = data;
if (!data.moveInstatus) {
this.$message({
type: "error",
message: `请联系${data.resiAgencyName}迁出该居民后操作`,
});
}
} else {
this.$message.error(msg);
}
}
},
handleBlurId() {
const { sex, birth, age } = computedCard(this.fmData.idCard);
if (birth) {
this.fmData.birthday = birth;
this.fmData.gender = sex == 1 ? "1" : "2";
this.checkResiAvailable();
}
},
handleClearVillage() {
this.fmData.buildId = "";
this.fmData.homeId = "";
},
handleClearBuild() {
this.fmData.buildId = "";
this.fmData.unitId = "";
this.fmData.homeId = "";
},
handleClearDan() {
this.fmData.unitId = "";
this.fmData.homeId = "";
},
handleChangeGrid(val) {
console.log("val", val);
this.fmData.villageId = "";
this.fmData.buildId = "";
this.fmData.unitId = "";
this.fmData.homeId = "";
this.getValiheList();
},
handleChangeV(val) {
console.log("val", val);
this.fmData.buildId = "";
this.fmData.unitId = "";
this.fmData.homeId = "";
this.getBuildList();
},
handleChangeB(val) {
console.log("val", val);
this.fmData.unitId = "";
this.fmData.homeId = "";
this.getUniList();
},
handleChangeD(val) {
console.log("val", val);
this.fmData.homeId = "";
this.getHouseList();
},
handleChangeH(val) {
console.log("val", val);
this.getHouseMaster();
},
getRelationList() {
const { user } = this.$store.state;
this.$http
.post("/sys/dict/data/relationship", {
formCode: "resi_base_info",
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log("获取查询详情成功", res.data);
if (res.data) {
this.optionsRelation = res.data;
}
}
});
},
getGridList() {
const { user } = this.$store.state;
this.$http
.post("/gov/org/customergrid/gridoption", {
agencyId: user.agencyId,
purpose: "query",
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log("获取查询详情成功", res.data);
this.optionsG = res.data;
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
getValiheList() {
const { user } = this.$store.state;
this.$http
.post("/gov/org/icneighborhood/neighborhoodoption", {
gridId: this.fmData.gridId,
agencyId: "",
// agencyId: user.agencyId
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log("获取查询详情成功", res.data);
this.optionsV = res.data;
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
getBuildList() {
this.$http
.post("/gov/org/icbuilding/buildingoption", {
neighborHoodId: this.fmData.villageId,
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log("获取查询详情成功", res.data);
this.optionsB = res.data;
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
getUniList() {
this.$http
.post("/gov/org/icbuildingunit/unitoption", {
buildingId: this.fmData.buildId,
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log("获取查询详情成功", res.data);
this.optionsD = res.data;
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
getHouseList() {
this.$http
.post("/gov/org/ichouse/houseoption", { unitId: this.fmData.unitId })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log("获取查询详情成功", res.data);
this.optionsH = res.data;
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
getHouseMaster() {
const { homeId } = this.fmData;
if (!homeId) return (this.alreadyHaveMaster = false);
this.$http
.post("/epmetuser/icresiuser/queryhousehold/" + homeId, {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log("获取户主信息成功", res.data);
const { name } = res.data;
if (name) {
this.fmData.householderName = name;
this.alreadyHaveMaster = true;
} else {
this.alreadyHaveMaster = false;
}
}
});
},
async initForm(type, row) {
this.$refs.ref_form.resetFields();
this.formType = type;
console.log(row);
if (row) {
// this.fmData = { ...this.fmData, ...row };
await this.getInfo(row.id);
this.getValiheList();
this.getBuildList();
this.getUniList();
this.getHouseList();
}
},
async getInfo(id) {
const { data, code, msg } = await requestPost(
"/epmetuser/icBirthRecord/" + id,
{
// id,
}
);
if (code === 0) {
this.fmData = { ...this.fmData, ...data };
} else {
this.$message.error(msg);
}
},
async handleComfirm() {
this.btnDisable = true;
setTimeout(() => {
this.btnDisable = false;
}, 10000);
this.$refs["ref_form"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
this.btnDisable = false;
} else {
if (!formVltHelper.userOrMobile(this.fmData.mobile)) {
return this.$message({
type: "error",
message: "手机号格式有误",
});
}
this.submit();
}
});
},
async submit() {
let url = "";
if (this.formType === "add") {
url = "/epmetuser/icBirthRecord/save";
} else if (this.formType === "edit") {
url = "/epmetuser/icBirthRecord/update";
} else {
return;
}
const { fmData, checkResult } = this;
if (
fmData.isCheck == "1" &&
checkResult.resiHomeId != fmData.homeId &&
checkResult.status == "0"
) {
await this.$confirm(
"居民信息中房屋信息与当前选择房屋不一致,是否更新?",
"提示",
{
confirmButtonText: "更新",
cancelButtonText: "不更新",
type: "warning",
center: true,
}
)
.then(() => {
this.fmData.isReplace = "1";
})
.catch(() => {
this.fmData.isReplace = "0";
});
}
const { data, code, msg } = await requestPost(url, fmData);
if (code === 0) {
this.$message({
type: "success",
message: "操作成功",
});
this.resetData();
this.$emit("dialogOk");
this.btnDisable = false;
} else {
this.btnDisable = false;
this.$message.error(msg);
}
},
handleCancle() {
this.resetData();
this.$emit("dialogCancle");
},
resetData() {
this.checkResult = {};
this.optionsB = [];
this.optionsH = [];
this.optionsD = [];
this.fmData = iniFmData();
},
//
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>
.item_width_1 {
width: 500px;
}
.item_width_2 {
width: 400px;
}
.item_width_3 {
margin-left: 10px;
width: 200px;
}
.item_width_4 {
width: 200px;
}
.div_map {
margin-top: 10px;
}
.div_btn {
// display: flex;
// justify-content: flex-end;
}
.el-tabs {
margin: 0 20px;
}
.el-upload__tip {
color: rgb(155, 155, 155);
margin: 0;
}
.form {
margin-top: 30px;
}
.m-staffs {
width: 468px;
.item {
display: flex;
justify-content: space-around;
margin-bottom: 7px;
}
.item-add {
}
}
</style>
<style>
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

141
src/views/modules/shequzhili/event/cpts/event-detail.vue

@ -0,0 +1,141 @@
<template>
<div class="">
<div class="m-row">
<div class="m-info">
<div class="info-prop">
<span class="info-title-2">所属网格</span>
<span>{{ info.gridName }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">上报时间</span>
<span>{{ info.createdTime }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">事件内容</span>
<span>{{ info.eventContent }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">图片</span>
<img :src="src"
:key="src"
v-for="src in info.imageList"
@click="watchImg(src)" />
</div>
<div v-if="info.voiceList.length>0"
class="info-prop">
<span class="info-title-2">语音</span>
<audio controls>
<source :src="item.url"
type=""
:key="item.url"
v-for="item in info.voiceList" />
</audio>
</div>
<div class="info-prop">
<span class="info-title-2">反映渠道</span>
<span>{{ info.sourceTypeName }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">地址</span>
<span>{{ info.address }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">报事人</span>
<span>{{ info.name }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">手机号</span>
<span>{{ info.mobile }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">身份证号</span>
<span>{{ info.idCard?info.idCard:'--' }}</span>
</div>
</div>
</div>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import foldText from "@/views/components/foldText";
import dateFormat from "dai-js/tools/dateFormat";
function iniData () {
return {
pageType: "info",
info: {},
};
}
export default {
name: "issueInfo",
props: {
eventId: {
type: String,
default: "",
},
type: {
type: String,
default: "info",
},
},
components: {
foldText,
},
data: iniData,
computed: {},
watch: {},
mounted () {
this.getApiData();
},
methods: {
watchImg (src) {
window.open(src);
},
handleClose () {
this.$emit("close");
},
async getApiData () {
this.getEventInfo();
},
//
async getEventInfo () {
const url = "/gov/project/icEvent/detail";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/detail";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
});
if (code === 0) {
this.info = { ...data };
} else {
this.$message.error(msg);
}
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/shequzhili/event-info.scss"
scoped
></style>

318
src/views/modules/shequzhili/event/cpts/event-info.vue

@ -1,106 +1,69 @@
<template>
h3<template>
<div class="">
<!-- <div v-show="pageType == 'info'"
class="g-page">
<div v-if="pageType == 'add'">
<el-card>
<h3>新增事件</h3>
<event-add ref="ref_add"
@changeName="changeName"
@changeMobile="changeMobile"
@changeUserId="changeUserId"></event-add>
</el-card>
</div>
<div v-if="pageType == 'add'"
class="process-form">
<el-card>
<h3>处理</h3>
<process-form ref="ref_processinfo"
:demandUserId="demandUserId"
:demandUserName="demandUserName"
:demandUserMobile="demandUserMobile"></process-form>
<div class="div-btn ">
<el-button size="small"
@click="handleClose">关闭</el-button>
<el-button style="margin-left:20px"
type="primary"
size="small"
@click="handleComfirm">确定</el-button>
</div>
</el-card>
</div>
<div class="g-page"
v-if="pageType == 'dispose'">
<div class="g-left">
<el-card>
<h3>项目详情</h3>
<h3>事件详情</h3>
<event-detail ref="ref_detail"
:eventId="eventId"></event-detail>
</el-card>
<div class="m-info">
<div class="info-prop">
<span>项目标题</span>
<span>{{ projectInfo.projectTitle }}</span>
</div>
<div class="info-prop">
<span>项目背景</span>
<span>{{ projectInfo.backGround || "--" }}</span>
</div>
<div class="info-prop">
<span>项目方案</span>
<span>{{ projectInfo.publicReply }}</span>
</div>
<div class="info-prop">
<span>内部备注</span>
<span>{{ projectInfo.internalRemark || "--" }}</span>
</div>
<div class="info-prop"
v-if="projectInfo.departmentNameList.length > 0">
<span>当前处理部门</span>
<span>{{ projectInfo.departmentNameList.join("、") }}</span>
</div>
<div class="info-prop">
<span>项目来源</span>
<a style="cursor: pointer"
@click="handleWatchOrigin">查看项目来源</a>
</div>
<div class="info-prop">
<span>项目评价</span>
<a style="cursor: pointer"
@click="showedEvaluation=true">查看项目评价</a>
<div class="process-form">
<el-card>
<h3>处理</h3>
<process-form ref="ref_processinfo"
:demandUserId="demandUserId"
:demandUserName="demandUserName"
:demandUserMobile="demandUserMobile"></process-form>
<div class="div-btn ">
<el-button size="small"
@click="handleClose">关闭</el-button>
<el-button style="margin-left:20px"
type="primary"
size="small"
@click="handleComfirm">确定</el-button>
</div>
<div class="info-prop"
v-if="projectCate.length > 0">
<span>分类</span>
<fold-text style="width: 300px"
:row="3">
<div :key="item.name"
v-for="item in projectCate">
{{ item.name }}
</div>
</fold-text>
</div>
<div class="info-prop"
v-if="projectTag.length > 0">
<span>标签</span>
<fold-text style="width: 300px"
:row="3">
<div :key="item.name"
v-for="item in projectTag">
{{ item.name }}
</div>
</fold-text>
</div>
</div>
<div class="m-btns">
<el-button size=""
@click="handleClose">关闭</el-button>
</div>
</el-card>
<el-card v-if="type == 'edit'">
<h3>处理</h3>
<div class="m-fm">
<el-form :inline="true"
:model="fmData"
:rules="dataRule"
label-position="left"
label-width="100px">
<el-form-item label="处理:"
prop="operationType">
<el-radio-group v-model="fmData.operationType">
<el-radio :label="3">处理/响应</el-radio>
<el-radio :label="6">结案</el-radio>
<el-radio :label="9">转其他机关/科室</el-radio>
<el-radio :label="10">退回</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
</div>
<div class="m-btns">
<el-button size=""
style="margin-right: 50px"
@click="handleClose">关闭</el-button>
<el-button size=""
type="danger"
@click="handleSubmit">确定</el-button>
</div>
</el-card>
</el-card>
</div>
</div>
<div class="g-right">
<el-card class="m-card"
v-if="projectProcess.length > 0">
style="max-height: 90vh; overflow: auto">
<h3>处理进展</h3>
<div class="m-process">
<div class="m-process"
v-if="projectProcess.length>0">
<div class="list">
<div class="item"
:class="index === 0 ? 'z-on' : ''"
@ -147,69 +110,26 @@
</div>
</div>
</div>
<div v-else>暂无处理进展</div>
</el-card>
</div>
</div> -->
<div v-show="pageType == 'add'">
<el-card>
<event-add ref="ref_add"></event-add>
</el-card>
</div>
<div class="process-form">
<el-card>
<process-form ref="ref_processinfo"></process-form>
<div class="div-btn ">
<el-button size="small"
@click="handleClose">关闭</el-button>
<el-button style="margin-left:20px"
type="primary"
size="small"
@click="handleComfirm">确定</el-button>
</div>
</el-card>
</div>
<!-- <div v-if="pageType == 'origin-info'">
<issue-info v-if="projectInfo.origin == 'issue'"
@close="handleBackInfo"
:issue-id="projectInfo.originId" />
<event-info v-if="projectInfo.origin == 'resi_event'"
@close="handleBackInfo"
:event-id="projectInfo.originId" />
</div> -->
<!-- <div class="m-btns">
<el-button @click="handleClose">关闭</el-button>
</div> -->
<!-- 修改弹出框 -->
<!-- <el-dialog v-if="showedEvaluation"
:visible.sync="showedEvaluation"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
width="850px"
top="5vh"
class="dialog-h"
@closed="showedEvaluation = false">
<project-evaluation :eventId="projectIdCopy"></project-evaluation>
</el-dialog> -->
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import foldText from "@/views/components/foldText";
import issueInfo from "./issue-info";
import eventInfo from "./event-info1";
import projectEvaluation from "./project-evaluation";
import dateFormat from "dai-js/tools/dateFormat";
import eventAdd from "./add";
import eventDetail from "./event-detail";
import processForm from "./process-form";
function iniData () {
@ -223,6 +143,12 @@ function iniData () {
demand: {},
project: {},
demandUserId: '',
demandUserName: '',
demandUserMobile: '',
projectProcess: [],
};
}
@ -241,11 +167,9 @@ export default {
components: {
foldText,
issueInfo,
eventInfo,
projectEvaluation,
eventAdd,
eventDetail,
processForm,
},
@ -264,10 +188,59 @@ export default {
},
mounted () {
if (this.pageType === 'dispose') {
this.getProjectProcess()
}
},
methods: {
changeName (val) {
this.demandUserName = val
},
changeMobile (val) {
this.demandUserMobile = val
},
changeUserId (val) {
this.demandUserId = val
},
//
async getProjectProcess () {
const url = "/gov/project/icEvent/process";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/process";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
});
if (code === 0) {
this.projectProcess = data.map((item) => {
item.processTime = dateFormat(
new Date(item.processTime * 1000),
"yyyy-MM-dd hh:mm"
);
return item;
});
} else {
this.$message.error(msg);
}
},
getEventInfo () {
this.$refs.ref_add.getEventInfo()
if (this.$refs.ref_add.okflag) {
this.eventInfoData = this.$refs.ref_add.formData
} else {
return false
}
console.log('eventInfo', this.eventInfoData)
},
handleComfirm () {
if (this.pageType === 'add') {
this.$refs.ref_add.getEventInfo()
@ -283,32 +256,79 @@ export default {
this.$refs.ref_processinfo.getProcessInfo()
if (this.$refs.ref_processinfo.okflag) {
this.formData.operationType = this.$refs.ref_processinfo.operationType
this.formData.categoryList = this.$refs.ref_processinfo.categoryList
if (this.formData.operationType === '0') {
this.project = {}
this.demand = {}
this.replayInfo = this.$refs.ref_processinfo.replayInfo
console.log('replayInfo', this.replayInfo)
//
this.eventInfoData.content = this.replayInfo.content
this.eventInfoData.status = this.replayInfo.status
this.eventInfoData.categoryList = this.$refs.ref_processinfo.categoryList
} else if (this.formData.operationType === '1') {
this.demand = this.$refs.ref_processinfo.replayInfo
this.replayInfo = {}
this.demand = {}
this.project = this.$refs.ref_processinfo.project
//
this.project.gridId = this.eventInfoData.gridId
console.log('projectInfo', this.project)
} else if (this.formData.operationType === '2') {
this.project = this.$refs.ref_processinfo.replayInfo
this.replayInfo = {}
this.project = {}
this.demand = this.$refs.ref_processinfo.demand
//
this.demand.gridId = this.eventInfoData.gridId
this.demand.reportUserName = this.eventInfoData.name//
this.demand.reportUserMobile = this.eventInfoData.mobile//
this.demand.reportTime = this.eventInfoData.happenTime//
console.log('demond', this.demand)
}
} else {
return false
}
//
// this.demand.demandUserId//user.idic_resi_user.id
// this.demand.demandUserName//
// this.demand.demandUserMobile//
this.formData = {
...this.eventInfoData,
replayInfo: this.replayInfo,
// replayInfo: this.replayInfo,
project: this.project,
demand: this.demand
}
console.log('this.formData', this.formData)
this.submit()
},
async submit () {
const url = "/gov/project/icEvent/add";
const { formData } = this;
const { data, code, msg } = await requestPost(url, {
...formData,
});
if (code === 0) {
this.$message.success("操作成功!");
if (this.pageType === 'add') {
this.eventInfo = this.$refs.ref_add.resetData()
}
this.$emit("handleOk");
} else {
}
},
handleClose () {
if (this.pageType === 'add') {

288
src/views/modules/shequzhili/event/cpts/issue-info.vue

@ -1,288 +0,0 @@
<template>
<div class="">
<div class="g-page" v-show="pageType == 'info'">
<div class="g-left">
<el-card>
<h3>议题详情</h3>
<div class="m-row">
<div class="m-info">
<div class="info-prop">
<span>议题标题</span>
<span>{{ issueInfo.issueTitle }}</span>
</div>
<div class="info-prop">
<span>议题建议</span>
<span>{{ issueInfo.issueSuggestion }}</span>
</div>
<div class="info-prop">
<span>所属网格</span>
<span>{{ issueInfo.belongsGridName || "--" }}</span>
</div>
<div class="info-prop">
<span>议题发起人</span>
<span>{{ issueInfo.issueInitiator }}</span>
</div>
<div
v-if="issueInfo.topicInfo && issueInfo.topicInfo.groupName"
class="info-prop"
>
<span>议题来源</span>
<span>{{ issueInfo.topicInfo.groupName }}</span>
</div>
<div class="info-prop">
<span>转议题时间</span>
<span>{{ issueInfo.shiftIssueTime }}</span>
</div>
</div>
<div class="m-line">
<div class="stat">
<div class="stat-item">
<div>
{{ issueTrend.realityVoteCount }}/{{
issueTrend.shouldVoteCount
}}
</div>
<div class="z-weak">已表决/应表决</div>
</div>
<div class="stat-item">
<div>{{ issueTrend.supportAmount }}</div>
<div class="z-weak">支持</div>
</div>
<div class="stat-item">
<div>{{ issueTrend.oppositionAmount }}</div>
<div class="z-weak">反对</div>
</div>
</div>
<div v-if="issueChartData.length > 0" class="m-chart">
<line-chart :list="issueChartData" />
</div>
</div>
</div>
<div class="m-btns" v-if="type == 'info'">
<el-button size="" @click="handleClose">关闭</el-button>
</div>
</el-card>
</div>
<div class="g-right">
<el-card class="m-card" v-if="issueProcess.length > 0">
<h3>处理进展</h3>
<div class="m-process">
<div class="list">
<div
class="item"
:class="index === 0 ? 'z-on' : ''"
:key="item.processId"
v-for="(item, index) in issueProcess"
>
<div class="item-row">
<div class="name">{{ item.processName }}</div>
<div class="date">
{{ item.processTime }}
</div>
</div>
<div class="detail">
<div class="detail-field">处理部门</div>
<div class="detail-value">{{ item.departmentName }}</div>
</div>
<div
class="detail"
v-if="item.processName != '转项目' && item.publicReply"
>
<div class="detail-field"> </div>
<div class="detail-value">
<fold-text :row="3">{{ item.publicReply }}</fold-text>
</div>
</div>
<div
class="detail"
v-if="item.processName != '转项目' && item.internalRemark"
>
<div class="detail-field">内部备注</div>
<div class="detail-value">
<fold-text :row="3">{{ item.internalRemark }}</fold-text>
</div>
</div>
<div class="detail">
<div class="attachement-list">
<a
:href="att.url"
target="_blank"
:key="att.url"
v-for="att in item.internalFile"
>
<i class="el-icon-folder-opened"></i>
{{ att.name }}
</a>
</div>
</div>
</div>
</div>
</div>
</el-card>
</div>
</div>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import foldText from "@/views/components/foldText";
import dateFormat from "dai-js/tools/dateFormat";
import lineChart from "@/views/modules/visual/cpts/line-chart";
function iniData() {
return {
pageType: "info",
issueProcess: [],
issueInfo: {
attitude: "",
belongsGridName: "",
issueIdea: "",
issueInitiator: "",
issueStatus: "",
issueSuggestion: "",
issueTitle: "",
joinVote: true,
projectId: "",
projectStatus: false,
publishIdeaFlag: false,
},
issueTrend: {},
issueChartData: [],
};
}
export default {
name: "issueInfo",
props: {
issueId: {
type: String,
default: "64502a8f1048a7240295527a9b32e513",
},
type: {
type: String,
default: "info",
},
},
components: {
foldText,
lineChart,
},
data: iniData,
computed: {},
watch: {},
mounted() {
this.getApiData();
},
methods: {
watchImg(src) {
window.open(src);
},
handleClose() {
this.$emit("close");
},
handleSubmit() {
this.$emit("afterEdit");
},
async getApiData() {
this.getIssueInfo();
this.getIssueTrend();
this.getIssueProcess();
},
//
async getIssueInfo() {
const url = "/resi/hall/issue/detail";
const { data, code, msg } = await requestPost(url, {
issueId: this.issueId,
});
if (code === 0) {
this.issueInfo = data;
} else {
this.$message.error(msg);
}
},
//
async getIssueTrend() {
const url = "/resi/hall/issue/votingtrend";
const { data, code, msg } = await requestPost(url, {
issueId: this.issueId,
});
if (code === 0) {
this.issueTrend = data;
let chartData = [];
data.polyLine.forEach((item) => {
let date = dateFormat(new Date(item.voteDate * 1000), "yyyy-MM-dd");
// console.log("date:" + date);
chartData.push(
{
date,
value: item.supportIncrement,
type: "支持",
},
{
date,
value: item.oppositionIncrement,
type: "反对",
}
);
});
this.issueChartData = chartData;
} else {
this.$message.error(msg);
}
},
//
async getIssueProcess() {
const url = "/gov/issue/manage/progress";
const { data, code, msg } = await requestPost(url, {
issueId: this.issueId,
});
if (code === 0) {
this.issueProcess = data.map((item) => {
item.processTime = dateFormat(
new Date(item.processTime * 1000),
"yyyy-MM-dd hh:mm"
);
return item;
});
} else {
this.$message.error(msg);
}
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/shequzhili/project-info.scss"
scoped
></style>

154
src/views/modules/shequzhili/event/cpts/issue-suggest.vue

@ -1,154 +0,0 @@
<template>
<div class="" style="padding: 0 20px 10px">
<h2>项目评价</h2>
<el-table
:data="tableData"
border
style="width: 100%"
class="resi-table"
:height="maxTableHeight"
>
<el-table-column
label="序号"
fixed="left"
type="index"
align="center"
width="50"
/>
<el-table-column
prop="evaluationUser"
align="center"
label="评价人"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
prop="time"
label="评价时间"
align="center"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
prop="content"
align="center"
label="评价内容 "
:show-overflow-tooltip="true"
>
</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>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import dateFormat from "dai-js/tools/dateFormat";
function iniData() {
return {
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
tableData: [],
};
}
export default {
name: "projectEvaluation",
props: {
projectId: {
type: String,
default: "64502a8f1048a7240295527a9b32e513",
},
},
components: {},
data: iniData,
computed: {},
watch: {
projectId() {
let data = iniData();
Object.keys(data).forEach((k) => {
this[k] = data[k];
});
this.getApiData();
},
},
mounted() {
this.getApiData();
},
methods: {
watchImg(src) {
window.open(src);
},
handleClose() {
this.$emit("close");
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.pageNo = val;
this.getTableData();
},
async getApiData() {
await this.getTableData();
},
async getTableData() {
// const url = "/gov/project/project/satisfaction-evaluation-list";
const url =
"http://yapi.elinkservice.cn/mock/245/gov/project/project/satisfaction-evaluation-list";
const { pageSize, pageNo, fmData } = this;
const { data, code, msg } = await requestPost(url, {
pageSize,
pageNo,
...fmData,
});
if (code === 0) {
console.log("列表请求成功!!!!!!!!!!!!!!");
this.total = data.total || 0;
this.tableData = data.list
? data.list.map((item) => {
return item;
})
: [];
} else {
}
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/shequzhili/project-info.scss"
scoped
></style>

579
src/views/modules/shequzhili/event/cpts/process-form-demand.vue

@ -0,0 +1,579 @@
<template>
<div class="">
<el-form ref="ref_form"
:inline="false"
:model="formData"
:rules="dataRule"
label-width="100px">
<el-form-item label="需求内容"
label-width="150px"
prop="content">
<el-input v-model="formData.content"
:autosize="{ minRows: 2, maxRows: 10 }"
type="textarea"
clearable
class="cell-width-area"
placeholder="请输入内容"></el-input>
</el-form-item>
<el-form-item label="需求类型"
label-width="150px"
prop="categoryCode">
<el-cascader v-model="formData.categoryCode"
:options="demandOptions"
clearable
class="cell-width-1"
@change="handleCateSlect"></el-cascader>
</el-form-item>
<el-form-item label="服务时间"
label-width="150px"
prop="wantServiceTime">
<el-date-picker v-model="formData.wantServiceTime"
type="datetime"
class="cell-width-1"
clearable
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="需求人"
label-width="150px"
prop="demandUserName">
<el-input v-model="formData.demandUserName"
class="cell-width-1"></el-input>
</el-form-item>
<el-form-item label="联系电话"
label-width="150px"
prop="demandUserMobile">
<el-input v-model="formData.demandUserMobile"
class="cell-width-1"></el-input>
</el-form-item>
<el-form-item label="服务地点"
prop="serviceLocation"
label-width="150px"
style="display: block">
<el-input class="cell-width-1"
v-model="formData.serviceLocation">
</el-input>
</el-form-item>
<el-form-item label="位置坐标"
prop="longitude"
label-width="150px"
style="display: block">
<div style="width:500px">
<div class="div_map">
<div id="app_map">
</div>
<div class="div_searchmap">
<el-input class="cell-width-map"
maxlength="50"
size="mini"
placeholder="请输入关键字"
v-model="keyWords">
</el-input>
<el-button style="margin-left: 10px"
type="primary"
size="mini"
@click="handleSearchMap">查询</el-button>
</div>
</div>
<div style="margin-top: 10px">
<span>经度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="formData.longitude">
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="formData.latitude">
</el-input>
</div>
</div>
</el-form-item>
<el-form-item label="门牌号"
label-width="150px"
prop="locationDetail">
<el-input v-model="formData.locationDetail"
class="cell-width-1"></el-input>
</el-form-item>
<el-form-item label="服务方"
label-width="150px"
prop="serverId">
<template>
<el-select v-model="formData.serviceType"
class="cell-width-1"
placeholder="请选择"
clearable
@change="handleServiceChange('add', $event)">
<el-option v-for="item in serviceOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
-
<el-select v-model="formData.serverId"
class="cell-width-1"
filterable
placeholder="请选择"
clearable>
<el-option v-for="item in serviceOptiondList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</template>
</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; //
var map
var search
var markers
var infoWindowList
var geocoder //
function iniFmData () {
return {
operationType: '1',//[0: 1: 1:]
IcEventId: '',//Id
gridId: '',//
categoryCode: '',//
parentCode: '',//
content: '',// 1000
reportType: 'self_help',// communitybuilding_caption;party;self_help
reportUserName: '',//
reportUserMobile: '',//
reportTime: '',//
demandUserId: '',// user.idic_resi_user.id
demandUserName: '',//
demandUserMobile: '',//
wantServiceTime: '',//
serviceType: '',
serverId: '',
locationDetail: '',
serviceLocation: '',//
latitude: '',//
longitude: '',//
};
}
export default {
data () {
return {
btnDisable: false,
customerId: localStorage.getItem("customerId"),
demandOptions: [],
serviceOptions: [
{
label: "志愿者",
value: "volunteer",
},
// {
// label: '',
// value: 'social_org'
// },
{
label: "社区自组织",
value: "community_org",
},
{
label: "区域党建单位",
value: "party_unit",
},
],
serviceOptiondList: [],
formData: iniFmData(),
formDataTemp: {
IcEventId: "",
serviceLocation: "34534534",
categoryCode: "10030002",
content: "341231",
demandUserId: "",
demandUserMobile: "15111111111",
demandUserName: "123123",
gridId: "",
operationType: "1",
parentCode: "1003",
reportTime: "",
reportType: "self_help",
reportUserMobile: "",
reportUserName: "",
serverId: "cebe59b05d02715141762211bf57734f",
serviceType: "volunteer",
wantServiceTime: "2022-05-17 00:00:00",
latitude: 36.069920462445104,
locationDetail: "345345",
longitude: 120.38677261825706,
serviceLocation: "山东省青岛市市南区闽江路82号"
},
okflag: false,
//
keyWords: '',
};
},
components: {},
computed: {
dataRule () {
return {
content: [
{ required: true, message: "需求内容不能为空", trigger: "blur" },
],
categoryCode: [
{ required: true, message: "需求类型不能为空", trigger: "blur" },
],
wantServiceTime: [
{ required: true, message: "服务时间不能为空", trigger: "blur" },
],
demandUserName: [
{ required: true, message: "需求人不能为空", trigger: "blur" },
],
demandUserMobile: [
{ required: true, message: "联系电话不能为空", trigger: "blur" },
],
serviceLocation: [
{ required: true, message: "服务地点不能为空", trigger: "blur" },
],
serverId: [
{ required: true, message: "服务方不能为空", trigger: "blur" },
],
};
},
},
props: {
demandUserId: {
type: String,
default: "",
},
demandUserName: {
type: String,
default: "",
},
demandUserMobile: {
type: String,
default: "",
},
},
watch: {
demandUserName: function (val) {
this.formData.reportUserName = val
this.formData.demandUserName = val
},
demandUserMobile: function (val) {
this.formData.reportUserMobile = val
this.formData.demandUserMobile = val
},
demandUserId: function (val) {
this.formData.demandUserId = val
},
},
async mounted () {
const { user } = this.$store.state
this.agencyId = user.agencyId
this.getDemandOptions();
// this.formData = { ...this.formDataTemp }
this.initMap()
this.formData.demandUserName = this.demandUserName
this.formData.demandUserMobile = this.demandUserMobile
this.formData.demandUserId = this.demandUserId
},
methods: {
async getDemandOptions () {
const url = "/heart/icresidemanddict/demandoption"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.demandOptions = this.getFlagData(
this.getTreeData(data),
"usableFlag"
);
} else {
this.$message.error(msg)
}
},
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;
},
getFlagData (data, flag) {
if (!Array.isArray(data)) return [];
let arr1 = data.filter((item) => item[flag]);
let arr2 = arr1.map((item) => {
if (item.children)
return { ...item, children: this.getFlagData(item.children, flag) };
else return item;
});
// console.log('arrr-oppp', arr2)
return arr2;
},
handleCateSlect (val) {
console.log("val", val);
if (val.length === 1) {
this.demandOptions.forEach((item) => {
if (item.value == val[0]) this.formData.parentCode = item.pvalue;
});
this.formData.categoryCode = val[0];
} else {
this.formData.parentCode = val[0];
this.formData.categoryCode = val[1];
}
},
handleServiceChange (type, val) {
if (val === "social_org") {
if (type === "add") this.getServiceuserList(val, "add_demand");
else this.getServiceuserList(val, "query_demand");
} else this.getServiceuserList(val, "");
},
async getServiceuserList (serviceType, query) {
if (!serviceType) return false;
const { demandUserId } = this.formData;
const params = {
serviceName: "",
serviceType: serviceType,
queryPurpose: query,
};
const url = "/heart/userdemand/servicelist"
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.serviceOptiondList = data.filter(
(item) => item.value != demandUserId
);
} else {
this.$message.error(msg)
}
},
async getDemandInfo () {
this.okflag = false
this.$refs["ref_form"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
} else {
this.okflag = true
}
});
},
resetData () {
},
// init
initMap () {
//
var center = new window.TMap.LatLng(36.0722275, 120.38945519)
// map TMap.Map()
map = new window.TMap.Map(document.getElementById('app_map'), {
center: center, //
zoom: 17.2, //
pitch: 43.5, //
rotation: 45 //
})
search = new window.TMap.service.Search({ pageSize: 10 })
//
markers = new TMap.MultiMarker({
map: map,
geometries: []
})
infoWindowList = Array(10)
geocoder = new TMap.service.Geocoder(); //
//
map.on('panend', () => {
this.handleMoveCenter()
})
this.handleMoveCenter()
this.convert()
},
setMarker (lat, lng) {
markers.setGeometries([])
markers.add([
{
id: '4',
styleId: 'marker',
position: new TMap.LatLng(lat, lng),
properties: {
title: 'marker4'
}
}
])
},
handleSearchMap () {
infoWindowList.forEach((infoWindow) => {
infoWindow.close()
})
infoWindowList.length = 0
markers.setGeometries([])
//
search
.searchRectangle({
keyword: this.keyWords,
bounds: map.getBounds()
})
.then((result) => {
let { data } = result
if (Array.isArray(data) && data.length > 0) {
const {
location: { lat, lng }
} = data[0]
map.setCenter(new TMap.LatLng(lat, lng))
this.setMarker(lat, lng)
this.formData.latitude = lat
this.formData.longitude = lng
this.convert()
} else {
this.$message.error('未检索到相关位置坐标')
}
})
},
handleMoveCenter () {
//
const center = map.getCenter()
const lat = center.getLat()
const lng = center.getLng()
this.formData.latitude = lat
this.formData.longitude = lng
this.setMarker(lat, lng)
this.convert(lat, lng)
},
convert (lat, lng) {
markers.setGeometries([]);
// var input = document.getElementById('location').value.split(',');
let location
if (lat && lng) {
location = new TMap.LatLng(lat, lng);
} else {
location = new TMap.LatLng(this.formData.latitude, this.formData.longitude);
}
// map.setCenter(location);
markers.updateGeometries([
{
id: 'main', //
position: location,
},
]);
geocoder
.getAddress({ location: location }) //
.then((result) => {
this.formData.serviceLocation = result.result.address
//
});
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/shequzhili/event-info.scss"
scoped
></style>
<style>
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

495
src/views/modules/shequzhili/event/cpts/process-form-project.vue

@ -0,0 +1,495 @@
<template>
<div class="">
<el-form ref="ref_form"
:inline="false"
:model="formData"
:rules="dataRule"
label-width="100px">
<el-form-item label="项目标题"
prop="title"
label-width="150px"
style="display: block">
<el-input class="cell-width-1"
maxlength="50"
placeholder="请输入项目标题"
v-model="formData.title">
</el-input>
</el-form-item>
<el-form-item label="所属网格 "
prop="gridId"
label-width="150px"
style="display: block">
<el-select v-model.trim="formData.gridId"
placeholder="请选择"
clearable
class="cell-width-1">
<el-option v-for="item in gridList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="处理部门"
label-width="150px"
prop="projectStaffId">
<el-popover placement="bottom"
width="400"
height="400"
v-model="visibleStaffPanel">
<div class="f">
<select-staff @confirm="(ret) => (formData.staffList = ret)"
@close="visibleStaffPanel = false" />
</div>
<div slot="reference">
<a v-if="formData.staffList.length == 0"
style="cursor: pointer">点击选择</a>
<a v-else
style="cursor: pointer">已选 {{ formData.staffList.length }} </a>
</div>
</el-popover>
</el-form-item>
<el-form-item label="协办单位"
label-width="150px"
prop="assistanceUnitIndex">
<el-select v-model.trim="formData.assistanceUnitIndex"
placeholder="请选择"
class="cell-width-1">
<el-option v-for="(item, index) in assistanceUnitList"
:key="item.assistanceUnitId"
:label="item.assistanceUnitName"
:value="index">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="项目方案"
label-width="150px"
prop="publicReply">
<el-input type="textarea"
class="cell-width-area"
:rows="2"
placeholder="请输入项目方案"
v-model="formData.publicReply">
</el-input>
</el-form-item>
<el-form-item label="内部备注"
label-width="150px"
prop="internalRemark">
<el-input type="textarea"
class="cell-width-area"
:rows="2"
placeholder="请输入内部备注"
v-model="formData.internalRemark">
</el-input>
</el-form-item>
<el-form-item label="图片/附件:"
label-width="150px"
prop="internalFile">
<el-upload class="avatar-uploader"
:action="uploadUlr"
:data="{ customerId: customerId }"
:show-file-list="true"
:on-success="handleImgSuccess"
:on-remove="handleImgRemove"
:before-upload="beforeImgUpload">
<i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
<el-form-item label="标签"
label-width="150px"
prop="tagList">
<fold-text v-if="tagList.length>0"
style="width: 300px"
:row="3">
<div :key="item.name"
v-for="item in tagList">
{{ item.name }}
</div>
</fold-text>
<el-popover placement="bottom"
width="400"
height="400"
v-model="visibleTagPanel">
<div class="f"
style="min-height: 120px">
<h2>选择标签</h2>
<el-select v-model="selectedTagData"
multiple
allow-create
filterable
placeholder="请选择"
@change="handleTagChange">
<el-option-group label="自定义标签">
<el-option v-for="item in tagOptions.customized"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-option-group>
<el-option-group label="常用标签">
<el-option v-for="item in tagOptions.defaulted"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-option-group>
</el-select>
<el-button style="margin-left: 10px"
size="small"
type="danger"
@click="updateProjectTag">关闭</el-button>
</div>
<div slot="reference">
<el-button size="small"
type="">选择</el-button>
</div>
</el-popover>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
import selectStaff from "@/views/components/selectStaff";
import formVltHelper from "dai-js/tools/formVltHelper";
import foldText from "@/views/components/foldText";
import { isCard } from "@/utils/validate";
let loading; //
function iniFmData () {
return {
operationType: '1',//[0: 1: 1:]
publicReply: '',// 1000
internalRemark: '',// 1000
gridId: '',//
assistanceUnitIndex: '',
assistanceUnitId: '',// Id
assistanceUnitType: '',// 12
staffList: [],//
categoryList: [],//
tagList: [],//
internalFile: [],//
title: '',//
publicFile: [],//
locateAddress: '',//
locateLongitude: '',//
locateDimension: '',//
eventId: '',//
};
}
export default {
data () {
return {
btnDisable: false,
customerId: localStorage.getItem("customerId"),
gridList: [],//list--
myDepartmentList: [],//
visibleStaffPanel: false,
assistanceUnitList: [],//
tagList: [],//
tagOptions: [],
visibleTagPanel: false,
selectedTagData: [],
formData: iniFmData(),
formDataTemp: {
assistanceUnitIndex: 0,
assistanceUnitId: '',// Id
assistanceUnitType: '',// 12
eventId: "",
gridId: "63d5ff92ea981b1c58e4914ac894c610",
internalRemark: "内部备注",
operationType: "1",
projectStaffId: "1514068005825622017",
publicReply: "项目方案",
title: "3123123",
internalFile: [],
staffList: [],
tagList: [{
id: "46294b3c9f96ee4d0b00e997e06c8f97",
isDisable: "enable",
name: "车行道、人行道、盲道、无障碍通道、路名牌",
},
{
id: "953bafc1191f784841d9b8da61ec7b9b",
isDisable: "enable",
name: "城市广场管理",
}],
},
okflag: false,
uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadqrcodeV2",
};
},
components: { selectStaff, foldText },
computed: {
dataRule () {
return {
title: [
{ required: true, message: "标题不能为空", trigger: "blur" },
],
gridId: [
{ required: true, message: "所属网格不能为空", trigger: "blur" },
],
projectStaffId: [
{ required: true, message: "处理部门不能为空", trigger: "blur" },
],
publicReply: [
{ required: true, message: "项目方案不能为空", trigger: "blur" },
],
};
},
},
props: {},
watch: {
"formData.assistanceUnitIndex": function (val) {
if (val === "" || this.assistanceUnitList.length === 0) {
this.formData.assistanceUnitId = "";
this.formData.assistanceUnitType = "";
} else {
this.formData.assistanceUnitId =
this.assistanceUnitList[val].assistanceUnitId;
this.formData.assistanceUnitType =
this.assistanceUnitList[val].assistanceUnitType;
}
},
async selectedTagData (val) {
const { tagOptions } = this;
this.tagList = await Promise.all(
val.map(async (id) => {
let ele = [...tagOptions.customized, ...tagOptions.defaulted].find(
(item) => item.id == id || item.name == id
);
if (!ele) {
await this.createTag(id);
ele = [
...this.tagOptions.customized,
...this.tagOptions.defaulted,
].find((item) => item.name == id);
if (!ele)
return {
id: "",
name: ele.name,
};
}
return {
id: ele.id,
name: ele.name,
};
})
);
this.tagList = this.tagList.filter((item) => item.id);
console.log(this.tagList)
},
},
async mounted () {
const { user } = this.$store.state
this.agencyId = user.agencyId
this.loadGrid();
this.getMyDepartmentList();
this.getAssistanceUnitList();
this.getTagList()
this.formData = { ...this.formDataTemp }
},
methods: {
async loadGrid () {
const url = "/gov/org/customergrid/gridoption"
let params = {
agencyId: this.agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.gridList = data
} else {
this.$message.error(msg)
}
},
//
async getMyDepartmentList () {
const url = "/gov/project/trace/approvalagencylist";
const { data, code, msg } = await requestPost(url, {
issueId: '',
projectStaffId: '',
});
if (code === 0) {
this.myDepartmentList = data.subAgencyList;
} else {
this.$message.error(msg);
}
},
//
async getAssistanceUnitList () {
const url = "/heart/icpartyunit/assistanceUnitList";
const { data, code, msg } = await requestPost(url, {
// projectId: this.projectIdCopy,
});
if (code === 0) {
this.assistanceUnitList = data;
} else {
this.$message.error(msg);
}
},
//
async getTagList () {
const url = "/gov/issue/issueprojecttagdict/list";
const { data, code, msg } = await requestPost(url, {
// categoryList: this.projectCate,
});
if (code === 0) {
this.tagOptions = {
customized: data.customized,
defaulted: data.defaulted,
};
} else {
this.$message.error(msg);
}
},
handleTagChange (val) {
console.log(val);
},
updateProjectTag () {
this.visibleTagPanel = false;
},
async getProjectInfo () {
this.okflag = false
this.$refs["ref_form"].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj);
} else {
this.formData.tagList = this.tagList
this.okflag = true
}
});
},
beforeImgUpload (file) {
const isLt1M = file.size / 1024 / 1024 < 10;
if (!isLt1M) {
this.$message.error("上传文件大小不能超过 10MB!");
}
return isLt1M;
},
resetData () {
},
handleImgSuccess (res, file, fileList) {
console.log("res.data.url", file);
if (res.code === 0 && res.msg === "success") {
console.log("res.data.url", res.data.url);
this.formData.internalFile.push({
format: file.name.split(".").pop(),
name: file.name,
size: file.size,
type: file.raw.type,
url: res.data.url,
});
console.log(this.formData.internalFile);
} else {
this.$message.error(res.msg);
}
},
handleImgRemove (file) {
let index = this.formData.internalFile.findIndex(
(item) => item.url == file.response.data.url
);
this.formData.internalFile.splice(index, 1);
console.log(this.formData.internalFile);
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/shequzhili/event-info.scss"
scoped
></style>
<style
lang="scss"
src="@/assets/scss/modules/shequzhili/project-info.scss"
scoped
></style>
<style>
.el-dialog__body {
padding: 0 10px 20px !important;
}
</style>

91
src/views/modules/shequzhili/event/cpts/process-form.vue

@ -11,11 +11,13 @@
prop="categoryList">
<el-cascader class="cell-width-2"
ref="myCascader"
:disabled="operationType==='2'"
v-model="selCategoryArray"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
:show-all-levels="false"></el-cascader>
:show-all-levels="false"
@change="handleChangeCate"></el-cascader>
</el-form-item>
<el-form-item label="处理方式"
label-width="150px"
@ -33,9 +35,17 @@
<process-form-replay ref="ref_process_form_replay"></process-form-replay>
</div>
<div v-if="operationType==='1'"></div>
<div v-if="operationType==='1'">
<process-form-project ref="ref_process_form_project"></process-form-project>
</div>
<div v-if="operationType==='2'">
<process-form-demand ref="ref_process_form_demond"
:demandUserId="demandUserId"
:demandUserName="demandUserName"
:demandUserMobile="demandUserMobile"></process-form-demand>
<div v-if="operationType==='2'"></div>
</div>
</div>
@ -46,6 +56,8 @@
import { Loading } from "element-ui"; // Loading
import { requestPost } from "@/js/dai/request";
import processFormReplay from "./process-form-replay";
import processFormProject from "./process-form-project";
import processFormDemand from "./process-form-demand";
let loading; //
@ -53,6 +65,7 @@ let loading; // 加载动画
export default {
data () {
return {
btnDisable: false,
gridList: [],//list--
categrayList: [],
@ -61,15 +74,16 @@ export default {
selCategoryArray: [
],
selCateObj: {},
optionProps: {
multiple: true,
multiple: false,
value: 'id',
label: 'name',
children: 'subCategory',
},
operationType: '0',
operationType: '1',
categoryList: [],
@ -81,7 +95,9 @@ export default {
};
},
components: {
processFormReplay
processFormReplay,
processFormProject,
processFormDemand
},
computed: {
dataRule () {
@ -98,8 +114,24 @@ export default {
},
props: {},
watch: {},
props: {
demandUserId: {
type: String,
default: "",
},
demandUserName: {
type: String,
default: "",
},
demandUserMobile: {
type: String,
default: "",
},
},
watch: {
},
async mounted () {
const { user } = this.$store.state
@ -142,7 +174,7 @@ export default {
//
++this.iscascaderShow
this.casOptions = []
this.selCategoryArray = [["1001", "1015"], ["1001", "1016"], ["1001", "1017"]]
this.selCategoryArray = ["1001", "1015"]
this.casOptions = treeDataNew
@ -152,6 +184,12 @@ export default {
},
handleChangeCate () {
console.log(this.$refs["myCascader"].getCheckedNodes()[0].data)
this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data
},
//
filterTree (arr) {
let childs = arr
@ -168,8 +206,9 @@ export default {
},
async getProcessInfo () {
this.okflag = false
let catelist = []
if (this.selCategoryArray.length === 0) {
this.$message({
type: "error",
@ -179,17 +218,18 @@ export default {
this.okflag = false
return false
}
console.log(this.selCategoryArray)
this.selCategoryArray.forEach(element => {
let array = element[1]
catelist.push(array)
});
this.categoryList = catelist
this.categoryList = []
this.categoryList.push(this.selCategoryArray[1])
console.log(this.categoryList)
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.replayInfo.categoryId = this.selCateObj.id
this.replayInfo.categoryList = []
this.replayInfo.categoryList.push(this.selCateObj)
this.okflag = true
} else {
@ -198,9 +238,28 @@ export default {
} else if (this.operationType === '1') {
this.$refs.ref_process_form_project.getProjectInfo()
if (this.$refs.ref_process_form_project.okflag) {
this.project = this.$refs.ref_process_form_project.formData
this.project.categoryList = []
this.project.categoryList.push(this.selCateObj)
//
this.okflag = true
} else {
return false
}
} 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
}
}
},

154
src/views/modules/shequzhili/event/cpts/project-evaluation.vue

@ -1,154 +0,0 @@
<template>
<div class="" style="padding: 0 20px 10px">
<h2>项目评价</h2>
<el-table
:data="tableData"
border
style="width: 100%"
class="resi-table"
:height="maxTableHeight"
>
<el-table-column
label="序号"
fixed="left"
type="index"
align="center"
width="50"
/>
<el-table-column
prop="evaluationUser"
align="center"
label="评价人"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
prop="time"
label="评价时间"
align="center"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
prop="content"
align="center"
label="评价内容 "
:show-overflow-tooltip="true"
>
</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>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import dateFormat from "dai-js/tools/dateFormat";
function iniData() {
return {
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
tableData: [],
};
}
export default {
name: "projectEvaluation",
props: {
projectId: {
type: String,
default: "64502a8f1048a7240295527a9b32e513",
},
},
components: {},
data: iniData,
computed: {},
watch: {
projectId() {
let data = iniData();
Object.keys(data).forEach((k) => {
this[k] = data[k];
});
this.getApiData();
},
},
mounted() {
this.getApiData();
},
methods: {
watchImg(src) {
window.open(src);
},
handleClose() {
this.$emit("close");
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.pageNo = val;
this.getTableData();
},
async getApiData() {
await this.getTableData();
},
async getTableData() {
// const url = "/gov/project/project/satisfaction-evaluation-list";
const url =
"http://yapi.elinkservice.cn/mock/245/gov/project/project/satisfaction-evaluation-list";
const { pageSize, pageNo, fmData } = this;
const { data, code, msg } = await requestPost(url, {
pageSize,
pageNo,
...fmData,
});
if (code === 0) {
console.log("列表请求成功!!!!!!!!!!!!!!");
this.total = data.total || 0;
this.tableData = data.list
? data.list.map((item) => {
return item;
})
: [];
} else {
}
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/shequzhili/project-info.scss"
scoped
></style>

60
src/views/modules/shequzhili/event/eventList.vue

@ -235,25 +235,26 @@
align="center"
width="160">
<template slot-scope="scope">
<el-button @click="handleWatch(scope.$index)"
<el-button v-if="scope.row.status==='closed_case' && scope.row.satisfactionName"
@click="handleWatch(scope.row)"
type="text"
size="small">查看</el-button>
<el-button @click="handleEdit(scope.$index)"
<el-button v-if="scope.row.status==='processing' "
@click="handleDispose(scope.row)"
type="text"
size="small"
class="div-table-button--edit">处理</el-button>
<!-- <el-button @click="handleDispose(scope.row)"
type="text"
size="small"
class="div-table-button--edit">处理</el-button> -->
<el-button v-if="scope.row.status==='closed_case' && !scope.row.satisfactionName"
@click="handleDispose(scope.row)"
type="text"
size="small"
class="div-table-button--edit">评价</el-button>
<el-popconfirm v-if="false"
title="删除之后无法回复,确认删除?"
@onConfirm="handleDel(scope.row, scope.$index)"
@confirm="handleDel(scope.row, scope.$index)">
<el-button slot="reference"
type="text"
size="small"
class="div-table-button--delete"
style="margin-left: 10px">删除</el-button>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
@ -272,11 +273,12 @@
</div>
</div>
<div v-if="pageType == 'edit' || pageType == 'info'|| pageType == 'add'">
<div v-if="pageType == 'dispose' || pageType == 'info'|| pageType == 'add'">
<event-info ref="eleEditForm"
:pageType="pageType"
:eventId="eventId"
@handleClose="handleClose"
@handleOk="handleOk"
@dialogOk="handleEditSuccess" />
</div>
</div>
@ -368,11 +370,7 @@ export default {
disabledDate: startDisabledDate
},
eventId: '',
currentProject: {
eventId: "",
userId: "",
categoryCodes: [],
},
};
},
computed: {
@ -463,18 +461,15 @@ export default {
async handleWatch (rowIndex) {
let item = this.tableData[rowIndex];
this.currentProject = {
eventId: item.eventId,
};
this.pageType = "info";
},
async handleEdit (rowIndex) {
let item = this.tableData[rowIndex];
this.currentProject = {
eventId: item.eventId,
};
this.pageType = "edit";
async handleDispose (row) {
this.eventId = row.icEventId
this.pageType = "dispose";
},
handleClose () {
@ -482,6 +477,13 @@ export default {
this.eventId = ""
},
handleOk () {
this.pageType = "list";
this.eventId = ""
this.getTableData()
},
handleEditSuccess () {
@ -508,8 +510,8 @@ export default {
},
async getTableData () {
// const url = "/gov/project/icEvent/list";
const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/list";
const url = "/gov/project/icEvent/list";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/list";
const { pageSize, pageNo, formData } = this;
const { data, code, msg } = await requestPost(url, {
pageSize,

Loading…
Cancel
Save