You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1706 lines
51 KiB

<template>
<div class="address_edit">
<div class="warp_body">
<van-form @failed="onFailed" @submit="submit">
<van-cell-group v-if="data.regList[0]">
<div class="qy-name">企业信息</div>
<van-field
v-model="data.regList[0].enterpriseName"
label="企业名称"
readonly
/>
<van-field
class="mult-line"
v-model="data.regList[0].enterpriseNumber"
label="统一社会信用代码"
readonly
/>
</van-cell-group>
<van-divider class="divdsty" />
<div class="zf-name">
执法信息<span class="joint-mark" v-if="data.hasUnion"
>联</span
>
</div>
<div v-for="(item, index) in data.regList" :key="index">
<!-- <van-swipe-cell class="swipe_cell"> -->
<div class="card_box" v-if="index < data.arrayLength">
<van-cell-group>
<van-field
v-model="item.bureauDeptName"
label="执法单位"
readonly
/>
<div class="one-label">
<van-field
v-model="item.lawEnforcer"
label="执法人员"
readonly
/>
<van-field
class="no-label"
v-for="(ite, index) in item.lawCer"
:key="index"
v-model="ite.show"
label=" "
readonly
/>
</div>
<van-field
v-model="item.lawEnforceCategoryText"
label="执法类别"
readonly
/>
<van-field
v-if="item.checkCategoryText"
v-model="item.checkCategoryText"
label="任务来源"
readonly
/>
<div class="fold-div" v-if="item.lawEnforcementItemText">
<label>执法事项</label>
<van-text-ellipsis
:content="item.lawEnforcementItemText"
rows="2"
autosize
expand-text="展开"
collapse-text="收起"
/>
</div>
<van-field
v-for="(ite, index) in item.lawList"
:key="index"
v-model="ite.text"
label="执法依据"
readonly
type="textarea"
rows="1"
autosize
/>
<view v-if="null != item.enforce">
<van-field
v-model="item.enforce"
label="原&nbsp; &nbsp; &nbsp; &nbsp;因"
readonly
/>
</view>
<van-field
v-if="item.checkCategoryText != null"
v-model="item.enforcementTime"
label="执法时间"
readonly
/>
<van-field
v-if="item.checkCategoryText == null"
v-model="item.enforcementTime"
label="预告时间"
readonly
/>
<van-divider class="divdsty" />
<van-cell center title="受委托执法">
<template #right-icon>
<van-radio-group v-model="data.auth_checked" shape="square" direction="horizontal" >
<van-radio name="0" >否</van-radio>
<van-radio name="1" >是</van-radio>
</van-radio-group>
</template>
</van-cell>
<view v-if="data.auth_checked=='1'">
<van-field
v-model="data.entrustDeptName"
label="委托行政机关"
readonly
/>
</view>
<div class="file-upload">
<div class="file-upload-center">
<label>附&nbsp; &nbsp; &nbsp; &nbsp;件</label>
</div>
<div class="zoom">
<img
v-for="(ite, index) in item.images"
class="img"
:src="ite"
alt="预览图片"
@click="imagePreview(index)"
:key="index"
/>
<van-image-preview
v-model:show="data.show"
:images="data.imageList"
@change="onChange"
ref="imagePre"
>
<template v-slot:index>第{{ indexImg + 1 }}页</template>
</van-image-preview>
</div>
</div>
</van-cell-group>
<van-divider class="divdsty" />
<!-- <div
class="look_all"
v-if="item.downShow && data.regList.length > 1"
@click="showArrays(item)"
:class="{ new_up: !item.show }"
>
<van-icon v-if="item.downShow" name="arrow-down" />
</div>
<div
class="look_all"
v-if="item.upShow && data.regList.length > 1"
@click="showArrays(item)"
:class="{ new_up: !item.show }"
>
<van-icon v-if="item.upShow" name="arrow-up" />
</div> -->
</div>
<!-- </van-swipe-cell> -->
</div>
<div v-if="submitData.isEvaluate == 1">
<van-divider class="divdsty" />
<van-cell-group>
<div class="cardsty">
<div class="evaluateText">评价</div>
<!-- <div class="eval-list">
<div
id="evalBad"
:class="1 == submitData.serviceExperience ? 'active' : ''"
>
<span @click="checkServiceMetrics(1)"></span
><label>不满意</label>
</div>
<div
id="evalGood"
:class="2 == submitData.serviceExperience ? 'active' : ''"
>
<span @click="checkServiceMetrics(2)"></span
><label>较满意</label>
</div>
<div
id="evalVeryGood"
:class="3 == submitData.serviceExperience ? 'active' : ''"
>
<span @click="checkServiceMetrics(3)"></span><label>满意</label>
</div>
</div> -->
<div class="eval-list">
<!-- <div id="evalVeryGood" :class="3==submitData.serviceExperience?'active':''">
<span @click="checkServiceMetrics(3)"></span><label>满意</label>
</div>
<div id="evalGood" :class="2==submitData.serviceExperience?'active':''">
<span @click="checkServiceMetrics(2)"></span><label>较满意</label>
</div>
<div id="evalBad" :class="1==submitData.serviceExperience?'active':''">
<span @click="checkServiceMetrics(1)"></span><label>不满意</label>
</div> -->
<div
id="evalVeryGood"
:class="3 == submitData.satisfactionLevel ? 'active' : ''"
>
<span></span><label>满意</label>
</div>
<div
id="evalGood"
:class="2 == submitData.satisfactionLevel ? 'active' : ''"
>
<span></span><label>较满意</label>
</div>
<div
id="evalBad"
:class="1 == submitData.satisfactionLevel ? 'active' : ''"
>
<span></span><label>不满意</label>
</div>
</div>
<div class="LevelIsNot1" v-if="submitData.satisfactionLevel != 1">
<div class="eval-item">
<label class="starText">执法文明</label>
<span class="eval-star">
<van-rate
v-model="submitData.serviceExperience"
:size="25"
color="#ffd21e"
void-icon="star"
void-color="#eee"
readonly
/>
</span>
<span
v-if="submitData.serviceExperience == 1"
class="starText"
>非常不满意</span
>
<span
v-if="submitData.serviceExperience == 2"
class="starText"
>不满意</span
>
<span
v-if="submitData.serviceExperience == 3"
class="starText"
>基本满意</span
>
<span
v-if="submitData.serviceExperience == 4"
class="starText"
>满意</span
>
<span
v-if="submitData.serviceExperience == 5"
class="starText"
>非常满意</span
>
</div>
<div class="eval-item">
<label class="starText">执法效率</label>
<span class="eval-star">
<van-rate
v-model="submitData.checkEffect"
:size="25"
color="#ffd21e"
void-icon="star"
void-color="#eee"
readonly
/>
</span>
<span v-if="submitData.checkEffect == 1" class="starText"
>非常不满意</span
>
<span v-if="submitData.checkEffect == 2" class="starText"
>不满意</span
>
<span v-if="submitData.checkEffect == 3" class="starText"
>基本满意</span
>
<span v-if="submitData.checkEffect == 4" class="starText"
>满意</span
>
<span v-if="submitData.checkEffect == 5" class="starText"
>非常满意</span
>
</div>
<div class="eval-item">
<label class="starText">执法态度</label>
<span class="eval-star">
<van-rate
v-model="submitData.checkAttitude"
:size="25"
color="#ffd21e"
void-icon="star"
void-color="#eee"
readonly
/>
</span>
<span
v-if="submitData.checkAttitude == 1"
class="starText"
>非常不满意</span
>
<span
v-if="submitData.checkAttitude == 2"
class="starText"
>不满意</span
>
<span
v-if="submitData.checkAttitude == 3"
class="starText"
>基本满意</span
>
<span
v-if="submitData.checkAttitude == 4"
class="starText"
>满意</span
>
<span
v-if="submitData.checkAttitude == 5"
class="starText"
>非常满意</span
>
</div>
<div class="eval-item">
<label class="starText">合&nbsp;法&nbsp;性</label>
<span class="eval-star">
<van-rate
v-model="submitData.proceduralLegality"
:size="25"
color="#ffd21e"
void-icon="star"
void-color="#eee"
readonly
/>
</span>
<span
v-if="submitData.proceduralLegality == 1"
class="starText"
>非常不满意</span
>
<span
v-if="submitData.proceduralLegality == 2"
class="starText"
>不满意</span
>
<span
v-if="submitData.proceduralLegality == 3"
class="starText"
>基本满意</span
>
<span
v-if="submitData.proceduralLegality == 4"
class="starText"
>满意</span
>
<span
v-if="submitData.proceduralLegality == 5"
class="starText"
>非常满意</span
>
</div>
</div>
<div v-else>
<van-field label="意见|建议" readonly />
<van-field
class="complaint-cont"
v-model="submitData.evaluateDescription"
rows="5"
autosize
readonly
type="textarea"
show-word-limit
/>
<div class="file-upload">
<div class="file-upload-center">
<label>附&nbsp; &nbsp; &nbsp; &nbsp;件</label>
</div>
<div class="zoom">
<img
v-for="(ite, index) in data.evaluateImageList"
class="img"
:src="ite"
alt="预览图片"
@click="imagePreview2(index)"
:key="index"
/>
<van-image-preview
v-model:show="data.show2"
:images="data.evaluateImageList"
@change="onChange2"
ref="imagePre2"
>
<template v-slot:index>第{{ indexImg2 + 1 }}页</template>
</van-image-preview>
</div>
</div>
</div>
<div class="otherProBlem">
<div class="otherProBlemText"><span>其他问题</span>
<van-switch
v-model="submitData.otherProblemSwitchBoolean"
active-color="#00CD00"
size="16px"
disabled
/></div>
<div v-if="submitData.otherProblemSwitchBoolean">
<div class="otherProBlemItem">
<span
>1、是否存在逐利执法,接受被执法企业的馈赠、报酬、福利等?</span
>
<div class="otherProBlemItemIconList">
<div class="otherProBlemItemIcon">
<div
:class="submitData.problem1 == 1 ? 'onbad' : 'bad'"
></div>
<span>是</span>
</div>
<div class="otherProBlemItemIcon">
<div
:class="submitData.problem1 == 0 ? 'ongood' : 'good'"
></div>
<span>否</span>
</div>
</div>
</div>
<div class="otherProBlemItem">
<span
>2、是否存在要求被执法企业提供宴请、娱乐、旅游等活动?</span
>
<div class="otherProBlemItemIconList">
<div class="otherProBlemItemIcon">
<div
:class="submitData.problem2 == 1 ? 'onbad' : 'bad'"
></div>
<span>是</span>
</div>
<div class="otherProBlemItemIcon">
<div
:class="submitData.problem2 == 0 ? 'ongood' : 'good'"
></div>
<span>否</span>
</div>
</div>
</div>
<div class="otherProBlemItem">
<span
>3、是否存在干扰企业正常生产经营,刻意要求法定代表人到场行为?</span
>
<div class="otherProBlemItemIconList">
<div class="otherProBlemItemIcon">
<div
:class="submitData.problem3 == 1 ? 'onbad' : 'bad'"
></div>
<span>是</span>
</div>
<div class="otherProBlemItemIcon">
<div
:class="submitData.problem3 == 0 ? 'ongood' : 'good'"
></div>
<span>否</span>
</div>
</div>
</div>
<div class="otherProBlemItem">
<span
>4、是否存在任性处罚企业,乱查封、乱扣押、乱冻结、动辄责令停产停业的行为?</span
>
<div class="otherProBlemItemIconList">
<div class="otherProBlemItemIcon">
<div
:class="submitData.problem4 == 1 ? 'onbad' : 'bad'"
></div>
<span>是</span>
</div>
<div class="otherProBlemItemIcon">
<div
:class="submitData.problem4 == 0 ? 'ongood' : 'good'"
></div>
<span>否</span>
</div>
</div>
</div>
<div class="otherProBlemItem">
<span
>5、是否存在变相执法,以观摩、督导、考察等名义行执法之实?</span
>
<div class="otherProBlemItemIconList">
<div class="otherProBlemItemIcon">
<div
:class="submitData.problem5 == 1 ? 'onbad' : 'bad'"
></div>
<span>是</span>
</div>
<div class="otherProBlemItemIcon">
<div
:class="submitData.problem5 == 0 ? 'ongood' : 'good'"
></div>
<span>否</span>
</div>
</div>
</div>
</div>
</div>
</div>
</van-cell-group>
</div>
</van-form>
</div>
</div>
</template>
<script setup name="register">
import { showSuccessToast, showImagePreview } from "vant";
import {
queryEnforcementRegistrationById,
queryEnforcementRegistrationUniteById,
getAttr,
queryUnionByHour,
} from "@/api/enforce";
import { reactive, ref, nextTick } from "vue";
import { uploadFile } from "@/util/fileUpload";
import { getDict } from "@/api/Home";
import { queryLinkageById } from "@/api/linkage";
import { nameCorrect } from "@/util/fileUpload";
import { selectRegistrationList } from "@/api/enterprise";
import { formattedDate } from "@/util/util";
import { baseUrl } from "@/config/env";
//用户筛选弹窗
// import Popup from './userFilter.vue';
const { useMy } = $globalStore;
const router = useRouter();
//路由参数
const route = useRoute();
const data = reactive({
showLawEnforcerFlag: false,
currentPage: 1,
good: "#7FFFD4",
bad: "#D3D3D3",
popupVisible: false,
popupContent: "",
popupVisible2: false,
popupContent2: "",
imgstr: "",
lawList: [{ text: "", id: "" }],
lawCer: [{ text: "", id: "" }],
imageList: [],
show: ref(false),
show2: ref(false),
dataList: [],
evaluateImageList: [],
enforceReasonList: [],
regList: [],
lawList: [],
arrayLength: 1,
allNo: 'circle',
hasUnion: false, // 联合执法选择
auth_checked: "0", // 委托执法选择
union_datas: [], // 联合执法用的分组list
check_union_no: '', // 选中的联合执法编号
radio_flag: 'circle', // 联合执法单选按钮的选择标识,
entrustDeptName:""
});
//保存参数
const submitData = reactive({
//执法单位
lawEnforcement: "",
lawEnforcementId: "",
//执法人员1
lawEnforcer: "",
lawEnforcerId: "",
//执法人员2
lawEnforcerTwo: "",
lawEnforcerIdTwo: "",
//辅助人员
subsidiaryer: "",
subsidiaryerId: "",
//执法事项
lawEnforcementItem: "",
enforce: "",
//执法依据
lawEnforcementBasis: "",
// 执法时间
enforcementTime: "",
//执法结果
reslut: 0,
//备注
remark: "",
//企业名称
enterpriseName: "",
//统一信用码
enterpriseNumber: "",
//后台保存图片列表
fileList: [],
//vant组件上传照片列表
fileListObj: [],
/**局级部门 */
bureauDeptName: "",
bureauDeptId: "",
// evaluateDescription: "",
// linkman: "",
// linkmanTel: "",
isEvaluate: 0,
checkCss: null,
// authorization: 0,
lawFieldText: "",
checkCategoryText: "",
lawEnforceCategoryText: "",
uniteCheck: "",
// inspectionEfficiency: 0,
// serviceExperience: 0,
satisfactionLevel: 3,
serviceExperience: 0,
checkEffect: 0,
proceduralLegality: 0,
checkAttitude: 0,
otherProblemSwitch: 0,
otherProblemSwitchBoolean: true,
problem1: 0,
problem2: 0,
problem3: 0,
problem4: 0,
problem5: 0
});
const tapGood = () => {
data.good = "#7FFFD4";
data.bad = "#D3D3D3";
submitData.reslut = 0;
};
const tapBad = () => {
data.good = "#D3D3D3";
data.bad = "#7FFFD4";
submitData.reslut = 1;
};
const indexImg = ref(0);
const indexImg2 = ref(0);
const imagePreview = (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.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) => {
queryLinkageById(
{ id: id },
(success) => {
submitData.lawEnforcementItem = success.title;
},
(error) => {}
);
};
const setLinkageGA = (id) => {
queryLinkageById(
{ id: id },
(success) => {
submitData.lawEnforcementBasis = success.title;
},
(error) => {}
);
};
const setAttr = () => {
// 查询执法要求字典信息
getAttr(
route?.query?.id,
(success) => {
if (success.data.filePreview != null) {
if (success.data.filePreview.fileList != null) {
for (var i = 0; i < success.data.filePreview.fileList.length; i++) {
data.imgstr += success.data.filePreview.fileList[i] + ",";
}
data.imgstr = data.imgstr.substring(0, data.imgstr.length - 1);
}
data.imageList = success.data.filePreview.fileList;
success.data.filePreview.fileList;
for (const key in success.data.filePreview.fileList) {
console.log(success.data.filePreview.fileList[key]);
data.imageList[key] = success.data.filePreview.fileList[key];
}
}
},
(error) => {}
);
};
const setEvaluateFile = (id) => {
// 查询执法要求字典信息
getAttr(
id,
(success) => {
if (success.data.filePreview != null) {
if (success.data.filePreview.fileList != null) {
for (var i = 0; i < success.data.filePreview.fileList.length; i++) {
data.imgstr += success.data.filePreview.fileList[i] + ",";
}
data.imgstr = data.imgstr.substring(0, data.imgstr.length - 1);
}
data.evaluateImageList = success.data.filePreview.fileList;
success.data.filePreview.fileList;
for (const key in success.data.filePreview.fileList) {
console.log(success.data.filePreview.fileList[key]);
data.evaluateImageList[key] =
baseUrl + success.data.filePreview.fileList[key];
}
}
},
(error) => {}
);
};
const onChange = (newIndex) => {
indexImg.value = newIndex;
};
const onChange2 = (newIndex) => {
indexImg2.value = newIndex;
};
//3a0096181c184e5aa56f70923680856d$6e74ceda1463c165fd43eeeadce4f7cd
//初始化参数,获取扫码的企业统一信用编码
onMounted(() => {
getDict({"dictType":"no-scan-reason"}, success => {
data.enforceReasonList.push({"text":'补录', "value":'3'});
for (var i=0; i<success.data.length; i++) {
data.enforceReasonList.push({"text":success.data[i].dictLabel, "value":success.data[i].dictValue});
}
});
// nameCorrect();
//查询执法登记信息
// queryRegById();
// queryEnforcementRegistrationById();
queryRegUniteById();
// setAttr();
});
const queryRegById = () => {
queryEnforcementRegistrationById(
route?.query?.id,
(success) => {
submitData.enterpriseName = success.data.enterpriseName;
submitData.enterpriseNumber = success.data.enterpriseNumber;
// submitData.lawEnforcement = success.data.lawEnforcement;
//执法单位
submitData.lawEnforcement = success.data.bureauDeptName;
submitData.lawEnforcerTwo = success.data.lawEnforcerTwo;
submitData.subsidiaryer = success.data.subsidiaryer;
submitData.lawEnforcementId = success.data.lawEnforcementId;
submitData.lawEnforcementItem = success.data.lawEnforcementItem;
submitData.lawEnforcementItemText = success.data.lawEnforcementItemText;
// submitData.lawEnforcementBasis = success.data.lawEnforcementBasis;
// submitData.lawEnforcementBasisText = success.data.lawEnforcementBasisText;
// submitData.lawEnforcerIdTwo = success.data.lawEnforcerIdTwo;
submitData.lawEnforcer = nameCorrect(success.data.lawEnforcer);
submitData.remark = success.data.remark;
submitData.enforce = success.data.enforceReason;
// 执法领域
submitData.lawFieldText = success.data.lawFieldText;
// 任务来源
submitData.checkCategoryText = success.data.checkCategoryText;
// 执法类别
submitData.lawEnforceCategoryText=success.data.lawEnforceCategoryText;
// 执法时间
submitData.enforcementTime = formattedDate(
success.data.enforcementTime
);
//评价信息
submitData.isEvaluate = success.data.isEvaluate;
if (
null != success.data.enterpriseEvaluate &&
"" != success.data.enterpriseEvaluate
) {
submitData.evaluateDescription =
success.data.enterpriseEvaluate.evaluateDescription;
submitData.linkman = success.data.enterpriseEvaluate.linkman;
submitData.linkmanTel = success.data.enterpriseEvaluate.linkmanTel;
submitData.authorization =
success.data.enterpriseEvaluate.authorization;
// submitData.inspectionEfficiency = success.data.enterpriseEvaluate.inspectionEfficiency;
submitData.serviceExperience =
success.data.enterpriseEvaluate.serviceExperience;
setEvaluateFile(success.data.enterpriseEvaluate.id);
}
if (success.data.reslut == 0) {
data.good = "#7FFFD4";
data.bad = "#D3D3D3";
} else {
data.good = "#D3D3D3";
data.bad = "#7FFFD4";
}
// 执法依据
submitData.lawEnforcementBasis = success.data.lawEnforcementBasis;
submitData.lawEnforcementBasisText = success.data.lawEnforcementBasisText;
if (
null != submitData.lawEnforcementBasis &&
submitData.lawEnforcementBasis.length > 0 &&
null != submitData.lawEnforcementBasisText &&
submitData.lawEnforcementBasisText.length > 0
) {
var tmpBasis = submitData.lawEnforcementBasis.split(",");
var tmpBasisText = submitData.lawEnforcementBasisText.split(",");
data.lawList = [];
for (var i = 0; i < tmpBasis.length; i++) {
data.lawList.push({ text: tmpBasisText[i], id: tmpBasis[i] });
}
}
// 执法人员
submitData.lawEnforcerIdTwo = success.data.lawEnforcerIdTwo;
submitData.lawEnforcerTwo = success.data.lawEnforcerTwo;
var lawEnforcer2ShowStr = success.data.lawEnforcer2Show;
if (
null != submitData.lawEnforcerIdTwo &&
submitData.lawEnforcerIdTwo.length > 0 &&
null != submitData.lawEnforcerTwo &&
submitData.lawEnforcerTwo.length > 0
) {
var tmpEnforceId = submitData.lawEnforcerIdTwo.split(",");
var tmpEnforceText = submitData.lawEnforcerTwo.split(",");
var lawEnforcer2Show = lawEnforcer2ShowStr.split(",");
data.lawCer = [];
for (var i = 0; i < tmpEnforceId.length; i++) {
data.lawCer.push({
text: tmpEnforceText[i],
id: tmpEnforceId[i],
show: nameCorrect(lawEnforcer2Show[i]),
});
}
}
submitData.uniteCheck = success.data.uniteCheck;
// setLinkageItem(submitData.lawEnforcementItem);
// setLinkageGA(submitData.lawEnforcementBasis);
if (success.data.uniteCheck != null && success.data.uniteCheck != "") {
selectRegistrationList(
{ uniteCheck: success.data.uniteCheck },
(success) => {
console.log(success.data);
for (let index = 0; index < success.data.length; index++) {
const element = success.data[index];
var arr = [];
// arr.push(nameCorrect(element.lawEnforcer));
// let tow = element.lawEnforcerTwo.split(",");
// for (const key in tow) {
// arr.push(nameCorrect(tow[key]));
// }
for (const key in element.lawEnforcer2List) {
arr.push(nameCorrect(element.lawEnforcer2List[key]));
}
var obj = {
deptName: element.bureauDeptName,
deptId: element.bureauDeptId,
userList: arr,
};
data.dataList.push(obj);
}
},
(error) => {}
);
}
console.log(data.dataList);
},
(error) => {}
);
};
const showArrays = (item) => {
if (item.downShow) {
item.downShow = false;
data.arrayLength = data.regList.length;
} else {
data.regList[0].downShow = true;
data.arrayLength = 1;
}
};
const queryRegUniteById = () => {
queryEnforcementRegistrationUniteById(
route?.query?.id,
(success) => {
convertReg(success.data["regResults"]).then(() => {
return convertLaw(success.data["lawResults"]);
}).then(() => {
data.regList[0].downShow = true;
data.regList[data.regList.length - 1].upShow = true;
//评价信息
submitData.isEvaluate = success.data["regResults"][0].isEvaluate;
if (
null != success.data["regResults"][0].enterpriseEvaluate &&
"" != success.data["regResults"][0].enterpriseEvaluate
) {
submitData.evaluateDescription =
success.data[
"regResults"
][0].enterpriseEvaluate.evaluateDescription;
// submitData.linkman = success.data['regResults'][0].enterpriseEvaluate.linkman;
// submitData.linkmanTel = success.data['regResults'][0].enterpriseEvaluate.linkmanTel;
// submitData.authorization = success.data['regResults'][0].enterpriseEvaluate.authorization;
// // submitData.inspectionEfficiency = success.data.enterpriseEvaluate.inspectionEfficiency;
// submitData.serviceExperience = success.data['regResults'][0].enterpriseEvaluate.serviceExperience;
submitData.satisfactionLevel =
success.data[
"regResults"
][0].enterpriseEvaluate.satisfactionLevel;
submitData.serviceExperience =
success.data[
"regResults"
][0].enterpriseEvaluate.serviceExperience;
submitData.checkEffect =
success.data["regResults"][0].enterpriseEvaluate.checkEffect;
submitData.proceduralLegality =
success.data[
"regResults"
][0].enterpriseEvaluate.proceduralLegality;
submitData.checkAttitude =
success.data[
"regResults"
][0].enterpriseEvaluate.checkAttitude;
submitData.otherProblemSwitch =
success.data[
"regResults"
][0].enterpriseEvaluate.otherProblemSwitch;
if (
success.data["regResults"][0].enterpriseEvaluate
.otherProblemSwitch == 1
) {
submitData.otherProblemSwitchBoolean = true;
} else {
submitData.otherProblemSwitchBoolean = false;
}
submitData.problem1 =
success.data["regResults"][0].enterpriseEvaluate.problem1;
submitData.problem2 =
success.data["regResults"][0].enterpriseEvaluate.problem2;
submitData.problem3 =
success.data["regResults"][0].enterpriseEvaluate.problem3;
submitData.problem4 =
success.data["regResults"][0].enterpriseEvaluate.problem4;
submitData.problem5 =
success.data["regResults"][0].enterpriseEvaluate.problem5;
setEvaluateFile(
success.data["regResults"][0].enterpriseEvaluate.id
);
}
});
},
(error) => {}
);
};
const convertReg = (regs) => {
return new Promise((res) => {
var proFlag = 0;
for (var k = 0; k < regs.length; k++) {
// 因为下面的小箭头隐藏了, 所以这里要把自己移动到第一位 放出来的话删掉 start
if (regs[k].id != route?.query?.id) {
continue
}
// 因为下面的小箭头隐藏了, 所以这里要把自己移动到第一位 放出来的话删掉 end
let dt = regs[k];
let obj = {};
obj.id = dt.id;
obj.enterpriseName = dt.enterpriseName;
obj.enterpriseNumber = dt.enterpriseNumber;
obj.bureauDeptName = dt.bureauDeptName;
obj.lawEnforcerTwo = dt.lawEnforcerTwo;
obj.subsidiaryer = dt.subsidiaryer;
obj.lawEnforcementId = dt.lawEnforcementId;
obj.lawEnforcementItem = dt.lawEnforcementItem;
obj.lawEnforcementItemText = dt.lawEnforcementItemText;
data.auth_checked = String(dt.hasAuto);
data.entrustDeptName=dt.entrustDeptName;
data.hasUnion = dt.hasUnion==0?false:true;
obj.lawEnforcer = nameCorrect(dt.lawEnforcer);
obj.remark = dt.remark;
obj.enforce = dt.enforceReason;
if (dt.checkCss!=null) {
for (let i = 0; i < data.enforceReasonList.length; i++) {
if(dt.checkCss===data.enforceReasonList[i].value){
obj.enforce = data.enforceReasonList[i].text
}
}
}
obj.lawFieldText = dt.lawFieldText;
obj.checkCategoryText = dt.checkCategoryText;
obj.lawEnforceCategoryText = dt.lawEnforceCategoryText;
obj.enforcementTime = formattedDate(dt.enforcementTime);
obj.lawEnforcementBasis = dt.lawEnforcementBasis;
obj.lawEnforcementBasisText = dt.lawEnforcementBasisText;
// console.log("-----> 评价 : ", dt.enterpriseEvaluate);
// 执法依据
let lawList = [];
if (
null != obj.lawEnforcementBasis &&
obj.lawEnforcementBasis.length > 0 &&
null != obj.lawEnforcementBasisText &&
obj.lawEnforcementBasisText.length > 0
) {
var tmpBasis = obj.lawEnforcementBasis.split(",");
var tmpBasisText = obj.lawEnforcementBasisText.split(",");
lawList = [];
for (var i = 0; i < tmpBasis.length; i++) {
lawList.push({ text: tmpBasisText[i], id: tmpBasis[i] });
}
}
obj.lawList = lawList;
// 执法人员
let lawCer = [];
obj.lawEnforcerIdTwo = dt.lawEnforcerIdTwo;
obj.lawEnforcerTwo = dt.lawEnforcerTwo;
var lawEnforcer2ShowStr = dt.lawEnforcer2Show;
if (
null != obj.lawEnforcerIdTwo &&
obj.lawEnforcerIdTwo.length > 0 &&
null != obj.lawEnforcerTwo &&
obj.lawEnforcerTwo.length > 0
) {
var tmpEnforceId = obj.lawEnforcerIdTwo.split(",");
var tmpEnforceText = obj.lawEnforcerTwo.split(",");
var lawEnforcer2Show = lawEnforcer2ShowStr.split(",");
data.lawCer = [];
for (var i = 0; i < tmpEnforceId.length; i++) {
lawCer.push({
text: tmpEnforceText[i],
id: tmpEnforceId[i],
show: nameCorrect(lawEnforcer2Show[i]),
});
}
}
obj.lawCer = lawCer;
// 附件
getAttr(
obj.id,
(success) => {
proFlag++;
if (success.data.filePreview != null) {
let images = [];
// if (success.data.filePreview.fileList != null) {
// for (var i = 0; i < success.data.filePreview.fileList.length; i++) {
// data.imgstr += success.data.filePreview.fileList[i] + ",";
// }
// data.imgstr = data.imgstr.substring(0, data.imgstr.length - 1);
// }
for (const key in success.data.filePreview.fileList) {
images[key] = baseUrl + success.data.filePreview.fileList[key];
data.imageList.push(
baseUrl + success.data.filePreview.fileList[key]
);
}
obj.images = images;
data.regList.push(obj);
}
if (proFlag == regs.length) {
res();
}
console.log(data.imageList);
},
(error) => {}
);
}
});
};
const convertLaw = (laws) => {
return new Promise((res) => {
for (var k = 0; k < laws.length; k++) {
let dt = laws[k];
let obj = {};
obj.enterpriseName = dt.enterpriseName;
obj.enterpriseNumber = dt.enterpriseNumber;
obj.bureauDeptName = dt.bureauDeptName;
obj.lawEnforcerTwo = dt.lawEnforcerTwo;
obj.subsidiaryer = dt.subsidiaryer;
obj.lawEnforcementId = dt.lawEnforcementId;
obj.lawEnforcementItem = dt.lawEnforcementItem;
obj.lawEnforcementItemText = dt.lawEnforcementItemText;
obj.lawEnforcer = nameCorrect(dt.lawEnforcer);
obj.remark = dt.remark;
obj.enforce = dt.enforceReason;
if (dt.checkCss!=null) {
for (let i = 0; i < data.enforceReasonList.length; i++) {
if(dt.checkCss===data.enforceReasonList[i].value){
obj.enforce = data.enforceReasonList[i].text
}
}
}
obj.lawFieldText = dt.lawFieldText;
obj.checkCategoryText = dt.checkCategoryText;
obj.lawEnforceCategoryText = dt.lawEnforceCategoryText;
obj.enforcementTime = formattedDate(dt.checkTime);
obj.lawEnforcementBasis = dt.lawEnforcementBasis;
obj.lawEnforcementBasisText = dt.lawEnforcementBasisText;
// 执法依据
let lawList = [];
if (
null != obj.lawEnforcementBasis &&
obj.lawEnforcementBasis.length > 0 &&
null != obj.lawEnforcementBasisText &&
obj.lawEnforcementBasisText.length > 0
) {
var tmpBasis = obj.lawEnforcementBasis.split(",");
var tmpBasisText = obj.lawEnforcementBasisText.split(",");
data.lawList = [];
for (var i = 0; i < tmpBasis.length; i++) {
obj.lawList.push({ text: tmpBasisText[i], id: tmpBasis[i] });
}
}
obj.lawList = lawList;
// 执法人员
let lawCer = [];
obj.lawEnforcerIdTwo = dt.lawEnforcerTwoId;
obj.lawEnforcerTwo = dt.lawEnforcerTwo;
var lawEnforcer2ShowStr = dt.lawEnforcer2Show;
if (
null != obj.lawEnforcerIdTwo &&
obj.lawEnforcerIdTwo.length > 0 &&
null != obj.lawEnforcerTwo &&
obj.lawEnforcerTwo.length > 0
) {
var tmpEnforceId = obj.lawEnforcerIdTwo.split(",");
var tmpEnforceText = obj.lawEnforcerTwo.split(",");
var lawEnforcer2Show = lawEnforcer2ShowStr.split(",");
data.lawCer = [];
for (var i = 0; i < tmpEnforceId.length; i++) {
lawCer.push({
text: tmpEnforceText[i],
id: tmpEnforceId[i],
show: nameCorrect(lawEnforcer2Show[i]),
});
}
}
obj.lawCer = lawCer;
data.regList.push(obj);
}
res();
});
};
// 返回
const goBack = () => {
router.go(-1);
};
const uploadFiles = (file) => {
if(Array.isArray(file)){
file.forEach((item,index)=>{
uploadFile(item, (res) => {
submitData.fileList.push(res.url)
});
});
}else{
uploadFile(file, (res) => {
submitData.fileList.push(res.url)
});
}
};
const deleteFile = (file, index) => {
console.log(index);
submitData.fileListObj.filter((item, indexs) => {
if (index.index == indexs) {
submitData.fileListObj.splice(indexs, 1); //splice 删除
}
});
submitData.fileList.filter((item, indexs) => {
if (index.index == indexs) {
submitData.fileList.splice(indexs, 1); //splice 删除
}
});
console.log(submitData.fileList);
return true;
};
const submit = () => {
addEnforcementRegistration(
submitData,
(success) => {
//跳转首页
if (success.success) {
showSuccessToast("登记成功");
router.push({ path: "/home" });
}
},
(error) => {
console.log("登记失败");
}
);
};
const showPopup = () => {
data.popupVisible = true;
};
const showPopup2 = () => {
data.popupVisible2 = true;
};
const closePopup = () => {
data.popupVisible = false;
data.popupVisible2 = false;
};
const reciveData = (item) => {
submitData.lawEnforcerTwo = item.userName;
submitData.lawEnforcerIdTwo = item.userId;
};
const reciveData2 = (item) => {
submitData.subsidiaryer = item.userName;
submitData.subsidiaryerId = item.userId;
};
</script>
<script>
export default {
data() {
return {
is_show: false,
};
},
computed: {
words() {
if (this.is_show === false) return "展开";
else if (this.is_show === true) return "收起";
else if (this.is_show === "") return null;
else return null;
},
},
};
</script>
<style lang="less" scoped>
.address_edit {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
background-color: #ebf3fb;
}
.warp_body {
margin: 3%;
padding-bottom: 3rem;
width: 94%;
height: 100%;
//border-radius: 0.25rem;
background-image: linear-gradient(to bottom, #ebf3fb, #fff);
overflow-y: auto;
}
.qy-name {
margin: 0 0.27rem;
font-size: 0.42rem;
height: 1.2rem;
background-color: white;
font-weight: 600;
line-height: 3.5;
}
.zf-name {
padding: 0 0.27rem;
font-size: 0.42rem;
height: 1.2rem;
background-color: white;
font-weight: 600;
line-height: 3.5;
}
/* vant4的 Toast 和 Popup 样式冲突,会导致 Toast 变成白底 */
.van-popup.van-toast {
background: var(--van-toast-background) !important;
box-sizing: content-box !important;
/* 下面3条css,影响不大 */
transition: all var(--van-duration-fast) !important;
width: var(--van-toast-default-width) !important;
max-width: var(--van-toast-max-width) !important;
}
.van-popup.van-toast .van-toast__icon {
font-size: var(--van-toast-icon-size) !important;
}
.divdsty {
margin: auto;
width: 100%;
height: 0.25rem;
background-color: #f4f4f4;
border: 0;
}
.file-upload {
position: relative;
min-height: 3rem;
// max-height: 6.5rem;
padding: 1rem 0.27rem 0.27rem 0.43rem;
box-sizing: border-box;
border-top: 5px solid #f4f4f4;
}
.file-upload-center {
position: absolute;
top: 0.27rem;
left: 0.43rem;
width: 90%;
height: 0.65rem;
font-size: 0.37rem;
span {
font-size: 0.32rem;
color: rgb(221, 229, 227);
}
}
.file {
position: relative;
width: 100%;
height: calc(100% - 1.5rem);
}
/deep/ .van-uploader__upload,
/deep/ .van-uploader__preview-image {
width: 1.95rem !important;
}
.preview-cover {
position: absolute;
bottom: 0;
box-sizing: border-box;
width: 100%;
padding: 4px;
color: #fff;
font-size: 0.32rem;
text-align: center;
background: rgba(0, 0, 0, 0.3);
}
.zoom {
/*margin-top: 0.65rem;
padding-top: 0.27rem;
padding-left: 0.27rem;*/
img {
width: 1.95rem;
height: 2rem;
// margin: 0 0.21rem 0.21rem 0;
margin: 0 0.6rem 0.21rem 0;
font-size: 0.35rem;
}
}
/deep/ .van-picker-column__item--selected {
background: #e5eef9;
color: #000;
font-weight: 600;
}
/deep/ .van-field .van-field__control {
color: #666;
}
/deep/ .van-field__label--required:before {
margin-left: -0.2rem;
}
/deep/ .mult-line .van-field__label {
padding-right: 0.5rem;
line-height: 1.25;
}
.complaint-cont {
margin: -1px 0.43rem 2%;
padding: 0 0 0.5rem;
width: calc(100% - 0.86rem);
border-radius: 0.15rem;
box-sizing: border-box;
line-height: 1.5;
font-size: 0.37rem;
}
/deep/ .complaint-cont textarea.van-field__control {
padding: 0.1rem 0.2rem;
background: #f5f6f7;
border-radius: 0.15rem;
line-height: 1.25;
}
.fold-div {
position: relative;
display: flex;
padding: 0 0.43rem 0.13rem;
width: 100%;
box-sizing: border-box;
color: rgb(50, 50, 51);
font-size: 0.37rem;
}
.fold-div::after {
position: absolute;
left: 0.43rem;
bottom: 0;
width: calc(100% - 0.86rem);
border-bottom: 1px solid #f5f6f7;
content: "";
}
.fold-div label {
width: 2.6rem;
padding: 0.27rem 0px 0.27rem 0;
}
.fold-div .van-text-ellipsis {
padding: 0.27rem 0;
width: calc(100% - 2.6rem);
color: #666;
}
.one-label {
position: relative;
padding-bottom: 0.25rem;
}
.one-label::after {
position: absolute;
left: 0.43rem;
bottom: 0;
width: calc(100% - 0.86rem);
border-bottom: 1px solid #ebedf0;
content: "";
transform: scaleY(0.5);
}
.one-label .van-cell {
padding-bottom: 0;
}
.one-label .no-label {
margin-top: -1px;
padding-top: 0;
padding-bottom: 0;
}
.joint-mark {
position: relative;
top: -0.05rem;
display: inline-block;
margin: 0 0.25rem;
width: 0.55rem;
height: 0.55rem;
background: #2d94fa;
border-radius: 50%;
color: #fff;
font-size: 0.35rem;
line-height: 1.65;
text-align: center;
}
/***折叠**/
.look_all {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 0.75rem;
font-size: 0.3rem;
color: #666;
cursor: pointer;
user-select: none;
border-radius: 0.05rem;
background-color: #fff;
}
.look_all i {
margin: 0 0.2rem;
padding: 0.1rem 0.3rem 0;
color: rgba(0, 0, 0, 0.35);
font-size: 0.4rem;
height: 0.5rem;
/*background: linear-gradient(to bottom, rgba(0, 0, 0, .1), transparent);*/
border-radius: 0.2rem 0.2rem 0 0;
}
.new_detail {
padding-top: 0.3rem;
height: 100%;
transition: height 2s linear;
}
.work_detail {
padding-top: 0.3rem;
height: 0.2rem;
overflow: hidden;
}
.new_up {
position: absolute;
bottom: 0;
}
/***/
/*.eval-star {
margin: 0 0.7rem 0 0.2rem;
}
.eval-star i {
margin: 0 0.3rem;
color: #ddd;
font-size: 0.5rem;
}
.eval-star i.active {
color: #fbb516;
}
.eval-star-font{
font-weight: bold;
font-size: 0.4rem;
}*/
.eval-list {
display: flex;
justify-content: space-between;
margin: 0 3% 8%;
}
.eval-list > div {
width: 30%;
text-align: center;
}
.eval-list > div > label {
margin: 0.2rem 0;
color: #999;
// font-size: 0.35rem;
}
.eval-list > div.active > label {
color: #323233;
font-weight: 600;
}
.eval-list > div > span {
display: block;
margin: 0.5rem auto 0.2rem;
width: 0.8rem;
height: 1rem;
}
.eval-list > div#evalBad > span {
background: url("../../assets/images/eval-bad-dis.png") no-repeat;
background-size: 100%;
opacity: 0.5;
}
.eval-list > div#evalGood > span {
background: url("../../assets/images/eval-good-dis.png") no-repeat;
background-size: 100%;
opacity: 0.5;
}
.eval-list > div#evalVeryGood > span {
background: url("../../assets/images/eval-verygood-dis.png") no-repeat;
background-size: 100%;
opacity: 0.5;
}
.eval-list > div#evalBad.active > span {
background: url("../../assets/images/eval-bad.png") no-repeat;
background-size: 100%;
opacity: 1;
}
.eval-list > div#evalGood.active > span {
background: url("../../assets/images/eval-good.png") no-repeat;
background-size: 100%;
opacity: 1;
}
.eval-list > div#evalVeryGood.active > span {
background: url("../../assets/images/eval-verygood.png") no-repeat;
background-size: 100%;
opacity: 1;
}
.van-hairline--top-bottom:after,
.van-hairline-unset--top-bottom:after {
border: 0;
}
.evaluateText {
font-size: 0.42rem;
}
.cardsty {
margin: 3% 0;
width: 100%;
padding: 5%;
background: #fff;
border-radius: 0.2rem;
font-size: 0.37rem;
box-sizing: border-box;
}
.cardsty label {
margin-right: 0.3rem;
width: 1.5rem;
text-align-last: justify;
white-space: nowrap;
color: #323233;
}
.eval-star {
margin: 0 0.7rem 0 0.2rem;
}
.eval-item {
display: flex;
align-items: center;
margin: 0.27rem 0;
font-weight: 800;
}
.otherProBlem {
margin: 5% 0 3% 0;
width: 100%;
background: #fff;
border-radius: 0.2rem;
box-sizing: border-box;
}
// .otherProBlem span{
// font-size: 0.37rem;
// }
.otherProBlemItem {
padding: 7px;
line-height: 30px;
}
.otherProBlemText {
display: flex;
align-items: center;
font-size: 0.43rem;
margin-right: 0.27rem;
}
.otherProBlemText span {
margin-right: 0.27rem;
}
.otherProBlemItemIconList {
padding-right: 15px;
display: flex;
float: right;
}
.otherProBlemItemIcon {
display: flex;
align-items: center;
padding: 3px;
}
.onbad {
background: url("../../assets/images/onbad.png") no-repeat;
background-size: 100%;
height: 20px;
width: 20px;
opacity: 1;
}
.ongood {
background: url("../../assets/images/ongood.png") no-repeat;
background-size: 100%;
height: 20px;
width: 20px;
opacity: 1;
}
.bad {
background: url("../../assets/images/bad.png") no-repeat;
background-size: 100%;
height: 20px;
width: 20px;
opacity: 1;
}
.good {
background: url("../../assets/images/good.png") no-repeat;
background-size: 100%;
height: 20px;
width: 20px;
opacity: 1;
}
</style>