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.
951 lines
32 KiB
951 lines
32 KiB
<template>
|
|
<div class="address_edit">
|
|
<!-- 中间 -->
|
|
<div class="warp_body">
|
|
<van-form @failed="onFailed" @submit="submit">
|
|
<van-cell-group>
|
|
<van-field
|
|
v-model="submitData.enterpriseName"
|
|
label="企业名称"
|
|
readonly
|
|
required
|
|
:rules="[{ required: true, message: '必填项' }]"
|
|
is-link
|
|
placeholder="请选择"
|
|
@click="showPopupCompony"
|
|
/>
|
|
<Popup :visible="popupVisible" :content="popupContent" @close="closePopupCompony"
|
|
@reciveData="reciveData"/>
|
|
<van-field
|
|
v-model="submitData.linkMan"
|
|
required
|
|
:rules="[{ required: true, message: '必填项' }]"
|
|
label="企业联系人"
|
|
readonly
|
|
/>
|
|
<van-field
|
|
v-model="submitData.linkTel"
|
|
label="联系人电话"
|
|
required
|
|
:rules="[{ validator, message: '请输入正确手机号' }]"
|
|
/>
|
|
<van-notice-bar :scrollable="false" text="请确认联系电话无误" />
|
|
<div class="flex-div">
|
|
<van-field
|
|
v-model="submitData.checkTime"
|
|
required
|
|
is-link
|
|
label="执法时间"
|
|
placeholder="日期"
|
|
readonly
|
|
:rules="[{ required: true, message: '必填项' }]"
|
|
@click="data.showTimePicker = true"
|
|
/>
|
|
<van-field
|
|
v-model="data.checkHourStart"
|
|
required
|
|
label=""
|
|
placeholder="开始时间"
|
|
readonly
|
|
:rules="[{ required: true, message: '必填项' }]"
|
|
@click="data.hourStartPicker = true"
|
|
/>
|
|
<van-field
|
|
v-model="data.checkHourEnd"
|
|
required
|
|
label=""
|
|
placeholder="结束时间"
|
|
readonly
|
|
:rules="[{ required: true, message: '必填项' }]"
|
|
@click="data.hourEndPicker = true"
|
|
/>
|
|
</div>
|
|
|
|
<van-field
|
|
v-model="submitData.checkItemText"
|
|
label="执法事项"
|
|
rows="2"
|
|
autosize
|
|
type="textarea"
|
|
maxlength="1000"
|
|
placeholder="请输入执法事项"
|
|
required
|
|
:rules="[{ required: true, message: '请输入 执法事项' }]"
|
|
show-word-limit
|
|
/>
|
|
<van-field
|
|
v-model="submitData.checkRequireText"
|
|
label="执法要求"
|
|
rows="2"
|
|
autosize
|
|
type="textarea"
|
|
maxlength="100"
|
|
placeholder="请输入执法要求"
|
|
show-word-limit
|
|
/>
|
|
|
|
<van-field
|
|
v-model="submitData.bureauDeptName"
|
|
readonly
|
|
required
|
|
:rules="[{ required: true, message: '必填项' }]"
|
|
label="执法单位"
|
|
/>
|
|
<van-field
|
|
v-model="submitData.lawEnforcerText"
|
|
readonly
|
|
label="执法人员"
|
|
/>
|
|
<div class="add-box">
|
|
<div v-for="(item, index) in data.lawCer" :key="index">
|
|
<!-- <div class="item-delete" v-if="index>0" @click.stop="cancelUser(index)"><label>执法人员
|
|
{{index+1}}</label> <a>删除</a></div> -->
|
|
<van-field
|
|
v-model="item.show"
|
|
label=" "
|
|
readonly
|
|
clickable
|
|
:right-icon="(data.lawCer.length - index ) == 1 ? 'add-o' : 'close'"
|
|
@click-right-icon="(data.lawCer.length - index ) == 1 ? addLawCer(index) : cancelUser(index)"
|
|
:rules="[{ required: true, message: '必填项' }]"
|
|
placeholder="请选择"
|
|
@click-input="showPopup(index)"
|
|
/>
|
|
</div>
|
|
<!-- <div class="addbtn" @click.stop="addLawCer"><van-icon name="add-o" /></div> -->
|
|
</div>
|
|
<div class="add-inspect" v-if="data.checked">
|
|
<!-- <p v-if="submitData.userObjs.length > 0"><label>联合执法部门+人员</label></p> -->
|
|
<div class="add-inspect-item" v-for="(item, index) in submitData.userObjs" :key="index">
|
|
<p>
|
|
<span class="add-name">{{nameCorrect(item.userName)}}</span>
|
|
<span class="add-law">{{item.lawCertificateNum}}</span>
|
|
</p>
|
|
<span class="add-dept">{{item.zzDisplayPath}}</span>
|
|
<van-icon class="remove-v" name="cross" @click.stop="removeDeptAndUser(index)" />
|
|
</div>
|
|
<div class="addbtn" @click.stop="data.deptChecked=true"><van-icon name="add-o" /></div>
|
|
</div>
|
|
|
|
</van-cell-group>
|
|
|
|
<van-action-bar>
|
|
<van-button round block type="info" native-type="submit" @click="tmpSave">保存</van-button>
|
|
<van-button round block type="info" native-type="submit" @click="submit112">提交</van-button>
|
|
</van-action-bar>
|
|
|
|
</van-form>
|
|
</div>
|
|
|
|
<van-popup v-model:show="data.showLawEnforcerFlag" position="bottom" :style="{ height: '30%' }"/>
|
|
<UserPopup :visible="data.popupVisible" :content="data.popupContent" :lawEDid="submitData.lawEnforcerId" :LawEDs="data.lawCer" :isShowCardId="0" @close="closePopup"
|
|
@reciveData="reciveVisible"/>
|
|
|
|
<van-popup v-model:show="data.showTimePicker" position="bottom" :style="{ height: '30%' }">
|
|
<van-date-picker
|
|
type="time"
|
|
v-model="data.currentDate"
|
|
:min-date="data.minDate"
|
|
@confirm="onConfirm"
|
|
@cancel="data.showTimePicker = false"
|
|
/>
|
|
</van-popup>
|
|
<van-popup v-model:show="data.showItem" position="bottom" :style="{ height: '30%' }">
|
|
<van-picker title="事项"
|
|
:columns="data.item_columns"
|
|
@confirm="itemConfirm"
|
|
@change="itemChange"
|
|
@cancel="gaCancel"
|
|
/>
|
|
</van-popup>
|
|
<van-popup v-model:show="data.showGA" position="bottom" :style="{ height: '30%' }">
|
|
<van-picker title="要求"
|
|
:columns="data.ga_columns"
|
|
@confirm="gaConfirm"
|
|
@cancel="gaCancel"
|
|
/>
|
|
</van-popup>
|
|
|
|
<DeptPopup :visible="data.deptChecked" :content="data.deptContent" @close="closePopup"
|
|
@reciveData="reciveDept"/>
|
|
<van-popup v-model:show="data.hourStartPicker" round position="bottom">
|
|
<van-time-picker v-model="data.currentHour" :columns-type='data.checkHourType'
|
|
@cancel="data.hourStartPicker = false"
|
|
@confirm="hourStartConfirm"
|
|
/>
|
|
</van-popup>
|
|
<van-popup v-model:show="data.hourEndPicker" round position="bottom">
|
|
<van-time-picker v-model="data.currentHour" :columns-type='data.checkHourType'
|
|
@cancel="data.hourEndPicker = false"
|
|
@confirm="hourEndConfirm"
|
|
/>
|
|
</van-popup>
|
|
<van-notify v-model:show="data.notifyShow" type="success">
|
|
<van-icon name="bell" style="margin-right: 4px;" />
|
|
<span>{{data.notifyContent}}</span>
|
|
<van-icon @click="data.notifyShow = false" name="cross" style="margin-right: 4px;" />
|
|
</van-notify>
|
|
|
|
<van-overlay :show="data.overlayShow">
|
|
<div class="wrapper">
|
|
<div class="block"><van-loading size="100" type="spinner" color="#1989fa" /></div>
|
|
</div>
|
|
</van-overlay>
|
|
<!-- 底部 -->
|
|
<div class="shop_footer_body">
|
|
<footer-enforcement-nav></footer-enforcement-nav>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup name="register">
|
|
import {nameCorrect,encryptPhone} from'@/util/fileUpload';
|
|
import {showSuccessToast} from 'vant';
|
|
import 'vant/es/toast/style';
|
|
import {
|
|
getByUserIdAndZero,
|
|
addEnterpriseLawEnforcement,
|
|
editEnterpriseLawEnforcement,
|
|
queryEnterpriseLawEnforcementList
|
|
} from '../../api/enforce/administrative'
|
|
import {queryUserInfo} from '../../api/enforce'
|
|
import {queryEnterpriseInfoList} from '../../api/enterprise'
|
|
import {reactive, ref} from "vue";
|
|
import {getDict} from "../../api/Home";
|
|
import {queryLinkage, queryLinkageDictByValueAndParentId} from "../../api/linkage";
|
|
import {uploadFile} from "../../util/fileUpload";
|
|
import { showNotify } from 'vant';
|
|
//用户筛选弹窗
|
|
import UserPopup from './userFilter.vue';
|
|
import DeptPopup from './deptFilter.vue';
|
|
|
|
|
|
const {useCommon} = $globalStore;
|
|
|
|
const router = useRouter();
|
|
let queryaddressId = ref("");
|
|
const data = reactive({
|
|
showLawEnforcerFlag: false,
|
|
showTimePicker: false,
|
|
popupVisible: false,
|
|
popupContent: '',
|
|
showGA: false,
|
|
showItem: false,
|
|
checkItemText: "",
|
|
checkRequireText: "",
|
|
ga_columns: [],
|
|
item_columns: [],
|
|
currentDate: [],
|
|
minDate: [],
|
|
checked: false,
|
|
deptChecked: false,
|
|
deptContent: '',
|
|
notifyShow: false,
|
|
notifyContent: "",
|
|
overlayShow: false,
|
|
tempDate: null,
|
|
lawCerFlag: 0,
|
|
lawCer:[{ text:"", id:"", show:"", num:"" }],
|
|
|
|
hourStartPicker: ref(false),
|
|
hourEndPicker: ref(false),
|
|
currentHour:ref(['00','00']),
|
|
checkHourType:ref(['hour', 'minute']),
|
|
checkHourStart:"",
|
|
checkHourEnd:""
|
|
|
|
// lawCer:[],
|
|
});
|
|
//保存参数
|
|
const submitData = reactive({
|
|
/** ID */
|
|
id: "",
|
|
/** 登记编号 */
|
|
lawEnforcementCode: "",
|
|
/** 企业名称 */
|
|
enterpriseName: "",
|
|
/**统一社会信用代码 */
|
|
enterpriseNumber: "",
|
|
/** 企业ID */
|
|
enterpriseId: "",
|
|
/** 企业联系人 */
|
|
linkMan: "",
|
|
/** 联系人电话 */
|
|
linkTel: "",
|
|
/** 执法时间 */
|
|
checkTime: "",
|
|
/** 执法事项 */
|
|
checkItem: "",
|
|
checkItemText: "",
|
|
/** 执法要求 */
|
|
checkRequire: "",
|
|
checkRequireText: "",
|
|
/** 执法单位 */
|
|
lawEnforcement: "",
|
|
/** 执法部门ID */
|
|
lawEnforcementId: "",
|
|
/** 执法人员 */
|
|
lawEnforcer: "",
|
|
lawCertificateNum: "",
|
|
lawEnforcerText: "",
|
|
/** 执法人员ID */
|
|
lawEnforcerId: "",
|
|
/** 执法人员2 */
|
|
lawEnforcerTwo: "",
|
|
lawCertificateNumTwo: "",
|
|
lawEnforcerTextTwo: "",
|
|
/** 执法人员2ID */
|
|
lawEnforcerTwoId: "",
|
|
/** 备注 */
|
|
remark: "",
|
|
userId: useCommon.userId,
|
|
deptTexts: "",
|
|
deptObjs: [],
|
|
userObjs: [],
|
|
isUnite: 0,
|
|
bureauDeptId:"",
|
|
bureauDeptName:"",
|
|
/**
|
|
* 执法时段
|
|
*/
|
|
checkTimeOrder: 0,
|
|
checkTimeOrderText:"",
|
|
checkHourStart:"",
|
|
checkHourEnd:""
|
|
})
|
|
|
|
const currentDate =() => {
|
|
const now = new Date();
|
|
const year = now.getFullYear();
|
|
const month = (now.getMonth() + 1).toString().padStart(2, '0');
|
|
const day = now.getDate().toString().padStart(2, '0');
|
|
data.currentDate = [year, month, day]
|
|
data.minDate = new Date(year, month-1, day);
|
|
}
|
|
|
|
const onConfirm = (time) => {
|
|
if (time != null) {
|
|
var times = time.selectedValues;
|
|
submitData.checkTime = times[0] + "-" + times[1] + "-" + times[2];
|
|
data.tempDate = times[1] + "月" + times[2] + "号";
|
|
}
|
|
data.showTimePicker = false;
|
|
|
|
// 查询设定的执法时间是否有别的企业对该部门进行执法, 如果有这提示可进行联合执法
|
|
if (null != submitData.enterpriseNumber && null != data.tempDate) {
|
|
let params = {
|
|
enterpriseNumber: submitData.enterpriseNumber,
|
|
checkTime: submitData.checkTime,
|
|
}
|
|
queryEnterpriseLawEnforcementList(params, success => {
|
|
var deptName = "";
|
|
for (var i = 0; i < success.data.length; i++) {
|
|
deptName += success.data[i].lawEnforcement + ", ";
|
|
}
|
|
if (success.data.length > 0) {
|
|
data.notifyContent = "您在" + data.tempDate + "和" + deptName + "执法部门有相同的执法企业,可以发起联合执法"
|
|
data.notifyShow = true;
|
|
// setTimeout(() => {
|
|
// data.notifyShow = false;
|
|
// }, 2000);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 执法时间 时段选择
|
|
*/
|
|
const hourStartConfirm = ({ selectedOptions }) => {
|
|
data.hourStartPicker = false;
|
|
data.checkHourStart = selectedOptions[0].value+":"+selectedOptions[1].value;
|
|
};
|
|
|
|
const hourEndConfirm = ({ selectedOptions }) => {
|
|
data.hourEndPicker = false;
|
|
data.checkHourEnd = selectedOptions[0].value+":"+selectedOptions[1].value;;
|
|
};
|
|
const validator = (val) => /^1[34578]\d{9}$/.test(val);
|
|
|
|
const onFailed = (errorInfo) => {
|
|
console.log('failed', errorInfo);
|
|
};
|
|
|
|
/* const cancelUser = (index) =>{
|
|
data.lawCer.splice(index, 1);
|
|
}
|
|
const addLawCer = () =>{
|
|
data.lawCer.push({ text:"", id:"", show:"", num:"" });
|
|
}*/
|
|
const cancelUser = (index) => {
|
|
data.lawCer.splice(index, 1);
|
|
}
|
|
const addLawCer = (index) => {
|
|
data.lawCer.push({text: "", id: ""});
|
|
showUserAdd.value = false;
|
|
showNextUserAdd.value = true;
|
|
}
|
|
const showPopup = (flag) => {
|
|
data.lawCerFlag = flag;
|
|
data.popupVisible = true;
|
|
}
|
|
const closePopup = () => {
|
|
data.popupVisible = false;
|
|
data.deptChecked = false;
|
|
}
|
|
const reciveVisible = (item) => {
|
|
data.lawCer[data.lawCerFlag].id = item.userId;
|
|
data.lawCer[data.lawCerFlag].text = item.userName;
|
|
data.lawCer[data.lawCerFlag].num = item.lawCertificateNum;
|
|
if(null==item.lawCertificateNum || "" == item.lawCertificateNum){
|
|
data.lawCer[data.lawCerFlag].show = nameCorrect(item.userName + " " + encryptPhone(item.decryptPhoneNum));
|
|
}else{
|
|
data.lawCer[data.lawCerFlag].show = nameCorrect(item.userName + " " + item.lawCertificateNum);
|
|
}
|
|
|
|
|
|
// submitData.lawEnforcerTwo = item.userName
|
|
// submitData.lawCertificateNumTwo = item.lawCertificateNum;
|
|
// submitData.lawEnforcerTwoId = item.userId;
|
|
// submitData.lawEnforcerTextTwo = submitData.lawEnforcerTwo +" "+ submitData.lawCertificateNumTwo
|
|
// submitData.lawEnforcerTextTwo = submitData.lawEnforcerTwo
|
|
}
|
|
|
|
const checkUnite = () => {
|
|
if (data.checked) {
|
|
data.deptChecked=true;
|
|
} else {
|
|
data.deptChecked=false;
|
|
}
|
|
}
|
|
|
|
const reciveDept = (item) => {
|
|
submitData.deptTexts = "";
|
|
submitData.deptObjs = [];
|
|
submitData.userObjs = [];
|
|
for (var i=0; i<item.length; i++) {
|
|
submitData.deptTexts += item[i].deptName+";";
|
|
submitData.deptObjs.push({deptId: item[i].deptId, deptName: item[i].deptName });
|
|
submitData.userObjs.push({
|
|
strUserId: item[i].userId,
|
|
userName: item[i].userName,
|
|
deptId: item[i].deptId,
|
|
deptName: item[i].deptName,
|
|
zzDisplayPath:item[i].zzDisplayPath,
|
|
lawCertificateNum: item[i].lawCertificateNum
|
|
});
|
|
}
|
|
}
|
|
|
|
/* 执法要求 start */
|
|
const gaConfirm = ({selectedOptions}) => {
|
|
data.checkRequireText = selectedOptions[0].text;
|
|
submitData.checkRequire = selectedOptions[0].value;
|
|
data.showGA = false;
|
|
data.showItem = false;
|
|
};
|
|
|
|
/* 执法要求 start */
|
|
const itemConfirm = ({selectedOptions}) => {
|
|
data.checkItemText = selectedOptions[0].text;
|
|
submitData.checkItem = selectedOptions[0].value;
|
|
data.showGA = false;
|
|
data.showItem = false;
|
|
|
|
getLinkageByParentIdToGA(selectedOptions[0].id);
|
|
};
|
|
const itemChange = ({selectedOptions}) => {
|
|
// getLinkageByParentIdToGA(selectedOptions[0].id);
|
|
}
|
|
const gaCancel = () => {
|
|
data.showGA = false;
|
|
data.showItem = false;
|
|
}
|
|
/* 执法要求 end */
|
|
|
|
// 返回
|
|
const goBack = () => {
|
|
router.go(-1);
|
|
};
|
|
|
|
const dataFillIn = () => {
|
|
getByUserIdAndZero(useCommon.userId, success => {
|
|
//跳转企业二维码地址
|
|
if (success.success) {
|
|
Object.keys(submitData).forEach((item) => {
|
|
submitData[item] = success.data[item] ? success.data[item] : "";
|
|
})
|
|
data.checkItemText = success.data['params'].checkItemText;
|
|
data.checkRequireText = success.data['params'].checkRequireText;
|
|
submitData.lawEnforcerText = success.data['lawEnforcer'];
|
|
submitData.lawEnforcerTextTwo = success.data['lawEnforcerTwo'];
|
|
// showSuccessToast('保存成功');
|
|
}
|
|
}, error => {
|
|
console.log("保存失败")
|
|
})
|
|
}
|
|
|
|
const tmpSave = () => {
|
|
if (submitData.enterpriseName.length<=0
|
|
|| submitData.linkMan.length<=0
|
|
|| submitData.linkTel.length<=0
|
|
|| submitData.checkTime.length<=0
|
|
|| submitData.bureauDeptName.length<=0
|
|
|| data.lawCer[0].id.length<=0) { return null; }
|
|
data.overlayShow = true; // 遮罩层
|
|
submitData.lawCertificateNum = null;
|
|
submitData.isUnite = 0;
|
|
if (data.checked) { submitData.isUnite = 1; }
|
|
// 执法人员
|
|
submitData.lawEnforcerTwoId = "";
|
|
submitData.lawEnforcerTwo = "";
|
|
submitData.lawCertificateNum = "";
|
|
submitData.lawEnforcerTextTwo = "";
|
|
submitData.lawEnforcerText="";
|
|
for (var i=0; i<data.lawCer.length; i++) {
|
|
submitData.lawEnforcerTwoId += data.lawCer[i].id +",";
|
|
submitData.lawEnforcerTwo += data.lawCer[i].text +",";
|
|
submitData.lawCertificateNum += data.lawCer[i].num +",";
|
|
}
|
|
submitData.lawEnforcerTwoId = submitData.lawEnforcerTwoId.substring(0, submitData.lawEnforcerTwoId.length - 1);
|
|
submitData.lawEnforcerTwo = submitData.lawEnforcerTwo.substring(0, submitData.lawEnforcerTwo.length - 1);
|
|
submitData.lawCertificateNum = submitData.lawCertificateNum.substring(0, submitData.lawCertificateNum.length - 1);
|
|
submitData.checkHourStart=data.checkHourStart;
|
|
submitData.checkHourEnd=data.checkHourEnd;
|
|
addEnterpriseLawEnforcement(submitData, success => {
|
|
data.overlayShow = false;
|
|
//跳转企业二维码地址
|
|
if (success.success) {
|
|
showSuccessToast('保存成功');
|
|
router.push(
|
|
{
|
|
path: "/appointmentList"
|
|
});
|
|
}
|
|
}, error => {
|
|
console.log("保存失败")
|
|
})
|
|
}
|
|
|
|
const submit112 = () => {
|
|
if (submitData.enterpriseName.length<=0
|
|
|| submitData.linkMan.length<=0
|
|
|| submitData.linkTel.length<=0
|
|
|| submitData.checkTime.length<=0
|
|
|| submitData.bureauDeptName.length<=0
|
|
|| data.lawCer[0].id.length<=0) { return null; }
|
|
data.overlayShow = true; // 遮罩层
|
|
// showSuccessToast('登记成功');
|
|
submitData.lawCertificateNum = null;
|
|
submitData.isUnite = 0;
|
|
if (data.checked) { submitData.isUnite = 1; }
|
|
// 执法人员
|
|
submitData.lawEnforcerTwoId = "";
|
|
submitData.lawEnforcerTwo = "";
|
|
submitData.lawCertificateNum = "";
|
|
submitData.lawEnforcerTextTwo = "";
|
|
submitData.lawEnforcerText="";
|
|
for (var i=0; i<data.lawCer.length; i++) {
|
|
submitData.lawEnforcerTwoId += data.lawCer[i].id +",";
|
|
submitData.lawEnforcerTwo += data.lawCer[i].text +",";
|
|
submitData.lawCertificateNum += data.lawCer[i].num +",";
|
|
}
|
|
submitData.lawEnforcerTwoId = submitData.lawEnforcerTwoId.substring(0, submitData.lawEnforcerTwoId.length - 1);
|
|
submitData.lawEnforcerTwo = submitData.lawEnforcerTwo.substring(0, submitData.lawEnforcerTwo.length - 1);
|
|
submitData.lawCertificateNum = submitData.lawCertificateNum.substring(0, submitData.lawCertificateNum.length - 1);
|
|
submitData.checkHourStart=data.checkHourStart;
|
|
submitData.checkHourEnd=data.checkHourEnd;
|
|
editEnterpriseLawEnforcement(submitData, success => {
|
|
data.overlayShow = false;
|
|
//跳转企业二维码地址
|
|
if (success.success) {
|
|
showSuccessToast('登记成功');
|
|
router.push(
|
|
{
|
|
path: "/appointmentList"
|
|
});
|
|
}
|
|
}, error => {
|
|
console.log("登记失败")
|
|
})
|
|
}
|
|
|
|
const getLinkageByValueAndParentId = (value, parentId) => {
|
|
// 查询执法要求字典信息
|
|
queryLinkageDictByValueAndParentId({"dataScopeId": useCommon.userId, "value": value, "parentId": parentId}, success => {
|
|
getLinkageByParentIdToItem(success.id)
|
|
}, error => {
|
|
});
|
|
}
|
|
|
|
const getLinkageByParentIdToItem = (parentId) => {
|
|
// 查询执法要求字典信息
|
|
queryLinkage({"dataScopeId": useCommon.userId, "parentId": parentId}, success => {
|
|
for (var i = 0; i < success.length; i++) {
|
|
data.item_columns.push({text: success[i].title, value: success[i].id, id: success[i].id})
|
|
// if (i==0) {
|
|
// data.checkItemText = success[i].title;
|
|
// submitData.checkItem = success[i].id;
|
|
// getLinkageByParentIdToGA(success[i].id);
|
|
// }
|
|
}
|
|
}, error => {
|
|
});
|
|
}
|
|
|
|
const getLinkageByParentIdToGA = (parentId) => {
|
|
// 查询执法要求字典信息
|
|
data.ga_columns = [];
|
|
queryLinkage({"parentId": parentId}, success => {
|
|
for (var i = 0; i < success.length; i++) {
|
|
data.ga_columns.push({text: success[i].title, value: success[i].id, id: success[i].id})
|
|
// if (i==0) {
|
|
// data.checkRequireText = success[i].title;
|
|
// submitData.checkRequire = success[i].id;
|
|
// }
|
|
}
|
|
}, error => {
|
|
});
|
|
}
|
|
|
|
//初始化参数,获取扫码的企业统一信用编码
|
|
onMounted(() => {
|
|
// 数据填充
|
|
// dataFillIn();
|
|
|
|
currentDate();
|
|
|
|
//查询当前登录人员信息
|
|
queryUserInfo(useCommon.userId, success => {
|
|
console.log(success.data)
|
|
submitData.lawEnforcer = success.data.userName;
|
|
submitData.lawCertificateNum = success.data.lawCertificateNum
|
|
if(null==submitData.lawCertificateNum || "" ==submitData.lawCertificateNum){
|
|
submitData.lawEnforcerText = nameCorrect(submitData.lawEnforcer +" "+ encryptPhone(success.data.decryptPhoneNum))
|
|
}else{
|
|
submitData.lawEnforcerText = nameCorrect(submitData.lawEnforcer +" "+ submitData.lawCertificateNum)
|
|
}
|
|
|
|
// submitData.lawEnforcerText = submitData.lawEnforcer
|
|
submitData.lawEnforcerId = success.data.userId;
|
|
submitData.lawEnforcement = success.data.dept.deptName;
|
|
submitData.lawEnforcementId = success.data.dept.deptId;
|
|
//局级部门
|
|
submitData.bureauDeptName = success.data.bureauDept.deptName;
|
|
submitData.bureauDeptId = success.data.bureauDept.deptId;
|
|
}, error => {
|
|
});
|
|
|
|
getLinkageByValueAndParentId("check_item", "100");
|
|
|
|
// 查询执法要求字典信息
|
|
// getDict({"dictType": "checkRequire"}, success => {
|
|
// for(var i=0; i<success.data.length; i++) {
|
|
// data.ga_columns.push({ text: success.data[i].dictLabel, value: success.data[i].dictValue })
|
|
// }
|
|
// },error=>{});
|
|
|
|
// 查询执法要求字典信息
|
|
// getDict({"dictType": "checkItem"}, success => {
|
|
// for(var i=0; i<success.data.length; i++) {
|
|
// data.item_columns.push({ text: success.data[i].dictLabel, value: success.data[i].dictValue })
|
|
// }
|
|
// },error=>{});
|
|
})
|
|
|
|
const reciveData = (item) => {
|
|
submitData.enterpriseName = item.enterpriseName;
|
|
submitData.linkTel = item.enterpriseTel;
|
|
submitData.linkMan = nameCorrect(item.legalPerson);
|
|
submitData.enterpriseNumber = item.enterpriseNumber;
|
|
|
|
// 查询设定的执法时间是否有别的企业对该部门进行执法, 如果有这提示可进行联合执法
|
|
if (null != submitData.enterpriseNumber && null != data.tempDate) {
|
|
let params = {
|
|
enterpriseNumber: submitData.enterpriseNumber,
|
|
checkTime: submitData.checkTime,
|
|
}
|
|
queryEnterpriseLawEnforcementList(params, success => {
|
|
var deptName = "";
|
|
for (var i = 0; i < success.data.length; i++) {
|
|
deptName += success.data[i].lawEnforcement + ", ";
|
|
}
|
|
if (success.data.length > 0) {
|
|
data.notifyContent = "您在" + data.tempDate + "和" + deptName + "执法部门有相同的执法企业,可以发起联合执法"
|
|
data.notifyShow = true;
|
|
setTimeout(() => {
|
|
data.notifyShow = false;
|
|
}, 2000);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
const removeDeptAndUser = (index) =>{
|
|
console.log(index)
|
|
submitData.userObjs.splice(index,1);
|
|
}
|
|
</script>
|
|
<script>
|
|
//案件筛选弹窗
|
|
import Popup from '../enterprise/companyFilter.vue';
|
|
|
|
export default {
|
|
components: {
|
|
Popup
|
|
},
|
|
data() {
|
|
return {
|
|
popupVisible: false,
|
|
popupContent: ''
|
|
}
|
|
},
|
|
methods: {
|
|
showPopupCompony() {
|
|
this.popupVisible = true;
|
|
},
|
|
closePopupCompony() {
|
|
this.popupVisible = false;
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style lang="less" scoped>
|
|
.address_edit {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
background-color: #ebf3fb;
|
|
}
|
|
|
|
.warp_body {
|
|
margin: 0 3%;
|
|
padding-bottom: 3rem;
|
|
width: 94%;
|
|
height: 100%;
|
|
background-color: #ebf3fb;
|
|
overflow-y: auto;
|
|
margin-top: 0.15rem;
|
|
}
|
|
|
|
.van-cell-group {
|
|
padding: 0.3rem 0;
|
|
}
|
|
|
|
/* 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;
|
|
}
|
|
|
|
:deep(.van-button) {
|
|
margin: 5% 3%;
|
|
padding: 0;
|
|
width: 94%;
|
|
height: 1rem;
|
|
color: #fff;
|
|
font-size: 0.4rem;
|
|
border-radius: 1rem;
|
|
background: #1367fe;
|
|
border: 1px solid #1367fe;
|
|
text-align: center;
|
|
}
|
|
|
|
.van-action-bar .van-button:first-child {
|
|
background: #fff;
|
|
color: #1367fe;
|
|
/*width: 40%;*/
|
|
}
|
|
|
|
/deep/ .van-action-bar {
|
|
position: relative;
|
|
top: 0.5rem;
|
|
/*box-shadow: 0 0 0.27rem #e5e5e5;/*/
|
|
background: transparent;
|
|
width: 100%;
|
|
float: right;
|
|
}
|
|
|
|
.divdsty {
|
|
margin: auto;
|
|
width: 100%;
|
|
height: 0.25rem;
|
|
background-color: #f4f4f4;
|
|
border: 0;
|
|
}
|
|
|
|
.add-box {
|
|
position: relative;
|
|
margin-top: -1px;
|
|
}
|
|
|
|
.add-box::after {
|
|
position: absolute;
|
|
left: 0.43rem;
|
|
bottom: 0;
|
|
width: calc(100% - 0.86rem);
|
|
border-bottom: 1px solid #ebedf0;
|
|
content: "";
|
|
transform: scaleY(.5);
|
|
}
|
|
|
|
.addbtn {
|
|
margin: 3% 0;
|
|
width: 100%;
|
|
text-align: right;
|
|
}
|
|
|
|
.addbtn i {
|
|
font-size: 0.48rem;
|
|
color: #999;
|
|
}
|
|
|
|
.add-inspect {
|
|
margin: 0 0.425rem;
|
|
padding-bottom: 0.3rem;
|
|
min-height: 2rem;
|
|
font-size: 0.37rem;
|
|
color: #323233;
|
|
}
|
|
|
|
.add-inspect-item {
|
|
position: relative;
|
|
margin: 0.1rem 0;
|
|
padding: 0.2rem 0.1rem;
|
|
background-color: #f3f4f5;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.add-inspect-item i.van-icon-cross {
|
|
position: absolute;
|
|
top: -0.45rem;
|
|
right: -0.45rem;
|
|
color: #fff;
|
|
width: 0.95rem;
|
|
height: 0.95rem;
|
|
background: rgba(0, 0, 0, .5);
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.add-inspect-item i.van-icon-cross:before {
|
|
position: absolute;
|
|
left: 0.15rem;
|
|
bottom: 0.12rem;
|
|
font-size: 0.3rem;
|
|
}
|
|
|
|
.add-inspect-item p {
|
|
display: flex;
|
|
margin: 0 0 0.1rem 0;
|
|
}
|
|
|
|
.add-inspect span {
|
|
display: block;
|
|
margin-right: 0.2rem;
|
|
color: #666;
|
|
}
|
|
|
|
.add-inspect span.add-dept {
|
|
color: #999;
|
|
font-size: 0.3rem;
|
|
line-height: 1.25;
|
|
}
|
|
|
|
.add-inspect label {
|
|
margin-left: -0.1rem;
|
|
}
|
|
|
|
.wrapper {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 100%;
|
|
}
|
|
|
|
.block {
|
|
width: 120px;
|
|
height: 120px;
|
|
text-align: center;
|
|
}
|
|
|
|
.item-delete {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 1% 4.5%;
|
|
width: 100%;
|
|
background: #f3f4f5;
|
|
line-height: 2.0;
|
|
font-size: 0.3rem;
|
|
color: #999;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.item-delete a {
|
|
font-size: 0.35rem;
|
|
color: #1367fe;
|
|
}
|
|
|
|
.flex-div {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: flex-start;
|
|
padding: 0 0.43rem 0 0.23rem;
|
|
color: #666;
|
|
font-size: 0.37rem;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.flex-div::after {
|
|
position: absolute;
|
|
left: 0.43rem;
|
|
bottom: 0;
|
|
width: calc(100% - 0.86rem);
|
|
border-bottom: 1px solid #ebedf0;
|
|
content: "";
|
|
transform: scaleY(.5);
|
|
}
|
|
|
|
.flex-div .van-cell::after {
|
|
border-bottom: 0;
|
|
}
|
|
|
|
.flex-div .van-field {
|
|
float: right;
|
|
padding-right: 0;
|
|
width: 38%;
|
|
}
|
|
|
|
.flex-div .van-field:first-child {
|
|
float: left;
|
|
padding-left: 0.2rem;
|
|
width: 62%;
|
|
}
|
|
|
|
/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/ .van-icon-close:before {
|
|
position: relative;
|
|
}
|
|
</style>
|
|
|