Browse Source

修改详情图片预览

入企不扫码投诉详情
投诉页面详情修改
v3
chenrui 2 years ago
parent
commit
b5578bb295
  1. 11
      src/api/enterprise.js
  2. 8
      src/views/enterprise/compaint/registrationListView.vue
  3. 9
      src/views/enterprise/complaint.vue
  4. 2
      src/views/enterprise/complaintDetailView.vue
  5. 8
      src/views/enterprise/complaintNoScan.vue
  6. 49
      src/views/enterprise/registrationDetail.vue

11
src/api/enterprise.js

@ -131,3 +131,14 @@ export const checkIsExists = (enterpriseNumber, success, error) =>_get("/app/ent
* @returns * @returns
*/ */
export const addEvaluateInfo = (params, success, error) =>_post("/app/evaluate/add",params,success, error) export const addEvaluateInfo = (params, success, error) =>_post("/app/evaluate/add",params,success, error)
/**
* 查询民生诉求执法部门列表
* @param {*} params
* @param {*} success
* @param {*} error
* @returns
*/
export const queryComplaintItemList = (params, success, error) =>_get("/app/code/item/queryList",params,success, error)

8
src/views/enterprise/compaint/registrationListView.vue

@ -89,7 +89,7 @@
</div> </div>
</div> </div>
<div class="btn-list"> <div class="btn-list">
<a @click.stop="toComplaintView(item.id,item.lawEnforcementItem,item.lawEnforcementItemText,item.uniteCheck)"> <a @click.stop="toComplaintView(item.id,item.lawEnforcementItem,item.lawEnforcementItemText,item.uniteCheck,item.bureauDeptName,item.bureauDeptId)">
<van-icon name="warning-o"/> <van-icon name="warning-o"/>
投诉</a> 投诉</a>
@ -245,7 +245,7 @@
* @param {*} id * @param {*} id
* @param {*} name * @param {*} name
*/ */
const toComplaintView = (id, name, text,uniteCheck) => { const toComplaintView = (id, name, text,uniteCheck,bureauDeptName,bureauDeptId) => {
console.log(id, name) console.log(id, name)
console.log(uniteCheck) console.log(uniteCheck)
router.push({ router.push({
@ -255,7 +255,9 @@
lawEnforcementIncident: name, lawEnforcementIncident: name,
lawEnforcementItemText: text, lawEnforcementItemText: text,
isSelect: false, isSelect: false,
uniteCheck: uniteCheck uniteCheck: uniteCheck,
complaintDepartments: bureauDeptName,
complaintDepartmentIds: bureauDeptId
} }
}); });
} }

9
src/views/enterprise/complaint.vue

@ -402,10 +402,19 @@
console.log("================") console.log("================")
console.log(submitData.userId); console.log(submitData.userId);
console.log("================") console.log("================")
submitData.relId = route?.query?.id; submitData.relId = route?.query?.id;
submitData.lawEnforcementIncidentText = route?.query?.lawEnforcementItemText; submitData.lawEnforcementIncidentText = route?.query?.lawEnforcementItemText;
submitData.complaintDepartments = route?.query?.complaintDepartments;
submitData.complaintDepartmentIds = route?.query?.complaintDepartmentIds;
data.isSelect = route?.query?.isSelect; data.isSelect = route?.query?.isSelect;
submitData.comOrOpi = route?.query?.comOrOpi; submitData.comOrOpi = route?.query?.comOrOpi;
if(route?.query?.complaintDepartmentIds != null && route?.query?.complaintDepartmentIds != ''){
data.depts = [{text: route?.query?.complaintDepartments,id: route?.query?.complaintDepartmentIds}]
}
getDict({"dictType": "caseType"}, success => { getDict({"dictType": "caseType"}, success => {
console.log(success); console.log(success);
success.data.forEach(res => { success.data.forEach(res => {

2
src/views/enterprise/complaintDetailView.vue

@ -314,7 +314,7 @@
submitData.linkmanTel = success.data.linkmanTel; submitData.linkmanTel = success.data.linkmanTel;
submitData.bureauDeptName = success.data.bureauDeptName submitData.bureauDeptName = success.data.bureauDeptName
// 判断是否入企不扫码 // 判断是否入企不扫码
if (null == success.data.enforceType || null == success.data.relId) { if (3 == success.data.enforceType || null == success.data.relId) {
data.isNoScan = true; data.isNoScan = true;
submitData.complaintTime = success.data.complaintTime; submitData.complaintTime = success.data.complaintTime;
submitData.complaintDepartments = success.data.complaintDepartments; submitData.complaintDepartments = success.data.complaintDepartments;

8
src/views/enterprise/complaintNoScan.vue

@ -171,7 +171,7 @@
import {getDict} from '@/api/Home' import {getDict} from '@/api/Home'
import {uploadFile} from '@/util/fileUpload' import {uploadFile} from '@/util/fileUpload'
import {reactive, ref,defineProps} from "vue"; import {reactive, ref,defineProps} from "vue";
import DeptPopup from '@/views/enterprise/compaint/selectDeptFilter.vue'; import DeptPopup from '@/views/enterprise/compaint/selectMssqFilter.vue';
import {formattedTimeYYYYmmdd} from "@/util/util"; import {formattedTimeYYYYmmdd} from "@/util/util";
const {useCommon, useMy} = $globalStore; const {useCommon, useMy} = $globalStore;
@ -233,6 +233,8 @@
enforcementTime:"", enforcementTime:"",
complaintDepartments:"", complaintDepartments:"",
complaintDepartmentIds:"", complaintDepartmentIds:"",
complaintItemCodes:"",
complaintItemNames:"",
}) })
@ -259,8 +261,8 @@
deptNameArr.push(element.text); deptNameArr.push(element.text);
deptIdArr.push(element.id); deptIdArr.push(element.id);
} }
submitData.complaintDepartmentIds = deptIdArr.join(","); submitData.complaintItemCodes = deptIdArr.join(",");
submitData.complaintDepartments = deptNameArr.join(","); submitData.complaintItemNames = deptNameArr.join(",");
console.log(submitData) console.log(submitData)
// return; // return;
addEnterpriseComplaint(submitData, success => { addEnterpriseComplaint(submitData, success => {

49
src/views/enterprise/registrationDetail.vue

@ -14,8 +14,8 @@
<div class="zf-name">执法信息<span class="joint-mark" v-if="data.regList.length>1">联</span></div> <div class="zf-name">执法信息<span class="joint-mark" v-if="data.regList.length>1">联</span></div>
<div v-for="(item, index) in data.regList" :key="index"> <div v-for="(item, index) in data.regList" :key="index">
<van-swipe-cell class="swipe_cell" v-if="index<data.arrayLength"> <!-- <van-swipe-cell class="swipe_cell"> -->
<div class="card_box"> <div class="card_box" v-if="index<data.arrayLength">
<van-cell-group> <van-cell-group>
<van-field v-model="item.bureauDeptName" label="执法部门" readonly/> <van-field v-model="item.bureauDeptName" label="执法部门" readonly/>
<div class="one-label"> <div class="one-label">
@ -46,9 +46,9 @@
<div class="zoom"> <div class="zoom">
<img v-for="(ite, index) in item.images" class="img" :src="ite" alt="预览图片" <img v-for="(ite, index) in item.images" class="img" :src="ite" alt="预览图片"
@click="imagePreview(index)" :key="index"/> @click="imagePreview(index)" :key="index"/>
<van-image-preview v-model:show="data.show" :images="item.imageList" <van-image-preview v-model:show="data.show" :images="data.imageList"
@change="onChange" ref="imagePre"> @change="onChange" ref="imagePre">
<template v-slot:index>第{{ index + 1 }}页</template> <template v-slot:index>第{{ indexImg + 1 }}页</template>
</van-image-preview> </van-image-preview>
</div> </div>
</div> </div>
@ -61,7 +61,7 @@
<van-icon v-if="item.upShow" name="arrow-up" /> <van-icon v-if="item.upShow" name="arrow-up" />
</div> </div>
</div> </div>
</van-swipe-cell> <!-- </van-swipe-cell> -->
</div> </div>
@ -97,9 +97,9 @@
<div class="file-upload-center"><label>附&nbsp; &nbsp; &nbsp; &nbsp;件</label></div> <div class="file-upload-center"><label>附&nbsp; &nbsp; &nbsp; &nbsp;件</label></div>
<div class="zoom"> <div class="zoom">
<img v-for="(ite, index) in data.evaluateImageList" class="img" :src="ite" alt="预览图片" <img v-for="(ite, index) in data.evaluateImageList" class="img" :src="ite" alt="预览图片"
@click="imagePreview(index)" :key="index"/> @click="imagePreview2(index)" :key="index"/>
<van-image-preview v-model:show="data.show" :images="data.evaluateImageList" @change="onChange" ref="imagePre2"> <van-image-preview v-model:show="data.show2" :images="data.evaluateImageList" @change="onChange2" ref="imagePre2">
<template v-slot:index>第{{ index + 1 }}页</template> <template v-slot:index>第{{ indexImg2 + 1 }}页</template>
</van-image-preview> </van-image-preview>
</div> </div>
</div> </div>
@ -144,6 +144,7 @@
lawCer: [{text: "", id: ""}], lawCer: [{text: "", id: ""}],
imageList: [], imageList: [],
show: ref(false), show: ref(false),
show2: ref(false),
dataList: [], dataList: [],
evaluateImageList: [], evaluateImageList: [],
regList: [], regList: [],
@ -209,13 +210,10 @@
data.bad = "#7FFFD4"; data.bad = "#7FFFD4";
submitData.reslut = 1; submitData.reslut = 1;
} }
const index = ref(0); const indexImg = ref(0);
const indexImg2 = ref(0);
const imagePreview = (newIndex) => { const imagePreview = (newIndex) => {
var imgstrArr = data.imgstr.split(","); var imgstrArr = data.imgstr.split(",");
// showImagePreview({
// images:data.imageList[index],
// startPosition: index,
// });
nextTick(() => { nextTick(() => {
// console.log(this.$refs.testRef) // console.log(this.$refs.testRef)
@ -223,9 +221,20 @@
// const imagePre = ref("imagePre"); // const imagePre = ref("imagePre");
// imagePre.change(newIndex); // imagePre.change(newIndex);
}); });
// index.value = newIndex;
data.show = ref(true); data.show = ref(true);
}
const imagePreview2 = (newIndex) => {
var imgstrArr = data.imgstr.split(",");
nextTick(() => {
// console.log(this.$refs.testRef)
// this.$refs.imagePre.change(newIndex)
// const imagePre = ref("imagePre");
// imagePre.change(newIndex);
});
data.show2 = ref(true);
} }
const setLinkageItem = (id) => { const setLinkageItem = (id) => {
@ -284,7 +293,10 @@
} }
const onChange = (newIndex) => { const onChange = (newIndex) => {
index.value = newIndex; indexImg.value = newIndex;
};
const onChange2 = (newIndex) => {
indexImg2.value = newIndex;
}; };
//3a0096181c184e5aa56f70923680856d$6e74ceda1463c165fd43eeeadce4f7cd //3a0096181c184e5aa56f70923680856d$6e74ceda1463c165fd43eeeadce4f7cd
//初始化参数,获取扫码的企业统一信用编码 //初始化参数,获取扫码的企业统一信用编码
@ -296,7 +308,7 @@
// queryEnforcementRegistrationById(); // queryEnforcementRegistrationById();
queryRegUniteById(); queryRegUniteById();
setAttr(); // setAttr();
}) })
const queryRegById = () => { const queryRegById = () => {
@ -519,7 +531,8 @@
// data.imgstr = data.imgstr.substring(0, data.imgstr.length - 1); // data.imgstr = data.imgstr.substring(0, data.imgstr.length - 1);
// } // }
for (const key in success.data.filePreview.fileList) { for (const key in success.data.filePreview.fileList) {
images[key] = success.data.filePreview.fileList[key]; images[key] = baseUrl + success.data.filePreview.fileList[key];
data.imageList.push(baseUrl + success.data.filePreview.fileList[key])
} }
obj.images = images; obj.images = images;
data.regList.push(obj); data.regList.push(obj);
@ -527,6 +540,7 @@
if (proFlag == regs.length) { if (proFlag == regs.length) {
res(); res();
} }
console.log(data.imageList);
}, error => { }, error => {
}); });
} }
@ -1034,5 +1048,6 @@
border: 0; border: 0;
} }
</style> </style>

Loading…
Cancel
Save