|
|
|
@ -36,12 +36,14 @@ |
|
|
|
@click="showPopup2" |
|
|
|
/> |
|
|
|
<van-field |
|
|
|
v-model="submitData.lawEnforcementItem" |
|
|
|
v-model="data.lawEnforcementItemText" |
|
|
|
required |
|
|
|
label="执法事项" |
|
|
|
:rules="[{ required: true, message: '必填项' }]" |
|
|
|
placeholder="必填 执法事项" |
|
|
|
@click="data.showItem = true" |
|
|
|
/> |
|
|
|
<van-field v-model="submitData.lawEnforcementItem" v-show="false" /> |
|
|
|
<van-field |
|
|
|
v-model="data.lawEnforcementBasisText" |
|
|
|
required |
|
|
|
@ -119,12 +121,20 @@ |
|
|
|
<Popup :visible="data.popupVisible" :content="data.popupContent" @close="closePopup" @reciveData="reciveData" /> |
|
|
|
<Popup :visible="data.popupVisible2" :content="data.popupContent2" @close="closePopup" @reciveData="reciveData2" /> |
|
|
|
|
|
|
|
|
|
|
|
<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" |
|
|
|
@change="gaChange" |
|
|
|
/> |
|
|
|
</van-popup> |
|
|
|
</div> |
|
|
|
@ -140,6 +150,7 @@ import {uploadFile} from "../../util/fileUpload"; |
|
|
|
//用户筛选弹窗 |
|
|
|
import Popup from './userFilter.vue'; |
|
|
|
import {getDict} from "../../api/Home"; |
|
|
|
import { queryLinkage, queryLinkageDictByValueAndParentId } from "../../api/linkage"; |
|
|
|
|
|
|
|
const { useMy } = $globalStore |
|
|
|
|
|
|
|
@ -158,9 +169,13 @@ const data = reactive({ |
|
|
|
popupVisible2: false, |
|
|
|
popupContent2: '', |
|
|
|
|
|
|
|
|
|
|
|
showGA:false, |
|
|
|
showItem:false, |
|
|
|
lawEnforcementBasisText:"", |
|
|
|
lawEnforcementItemText: "", |
|
|
|
ga_columns: [], |
|
|
|
item_columns: [], |
|
|
|
}); |
|
|
|
//保存参数 |
|
|
|
const submitData = reactive({ |
|
|
|
@ -204,6 +219,42 @@ const tapBad = () => { |
|
|
|
data.bad = "#7FFFD4"; |
|
|
|
submitData.reslut = 1; |
|
|
|
} |
|
|
|
|
|
|
|
const getLinkageByValueAndParentId = (value, parentId) => { |
|
|
|
// 查询检查要求字典信息 |
|
|
|
queryLinkageDictByValueAndParentId({"value":value, "parentId": parentId}, success => { |
|
|
|
getLinkageByParentIdToItem(success.id) |
|
|
|
},error=>{}); |
|
|
|
} |
|
|
|
|
|
|
|
const getLinkageByParentIdToItem = (parentId) => { |
|
|
|
// 查询检查要求字典信息 |
|
|
|
queryLinkage({"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.lawEnforcementItemText = success[i].title; |
|
|
|
submitData.lawEnforcementItem = 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.lawEnforcementBasisText = success[i].title; |
|
|
|
submitData.lawEnforcementBasis = success[i].id; |
|
|
|
} |
|
|
|
} |
|
|
|
},error=>{}); |
|
|
|
} |
|
|
|
|
|
|
|
//3a0096181c184e5aa56f70923680856d$6e74ceda1463c165fd43eeeadce4f7cd |
|
|
|
//初始化参数,获取扫码的企业统一信用编码 |
|
|
|
onMounted(() =>{ |
|
|
|
@ -228,12 +279,7 @@ onMounted(() =>{ |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
// 查询检查要求字典信息 |
|
|
|
getDict({"dictType": "lawEnforcementBasis"}, 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=>{}); |
|
|
|
getLinkageByValueAndParentId("law_item", "100"); |
|
|
|
}) |
|
|
|
|
|
|
|
// 返回 |
|
|
|
@ -264,18 +310,29 @@ const deleteFile = (file,index) =>{ |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
/* 执法依据 start */ |
|
|
|
/* 检查要求 start */ |
|
|
|
const gaConfirm = ({ selectedOptions }) => { |
|
|
|
data.lawEnforcementBasisText = selectedOptions[0].text; |
|
|
|
submitData.lawEnforcementBasis = selectedOptions[0].value; |
|
|
|
data.showGA = false; |
|
|
|
data.showItem = false; |
|
|
|
}; |
|
|
|
const gaChange = ({ selectedValues }) => { |
|
|
|
|
|
|
|
/* 检查要求 start */ |
|
|
|
const itemConfirm = ({ selectedOptions }) => { |
|
|
|
data.lawEnforcementItemText = selectedOptions[0].text; |
|
|
|
submitData.lawEnforcementItem = selectedOptions[0].value; |
|
|
|
data.showGA = false; |
|
|
|
data.showItem = false; |
|
|
|
}; |
|
|
|
const itemChange =({ selectedOptions }) => { |
|
|
|
getLinkageByParentIdToGA(selectedOptions[0].id); |
|
|
|
} |
|
|
|
const gaCancel = () => { |
|
|
|
data.showGA = false; |
|
|
|
data.showItem = false; |
|
|
|
} |
|
|
|
/* 执法依据 end */ |
|
|
|
/* 检查要求 end */ |
|
|
|
|
|
|
|
const submit = () =>{ |
|
|
|
addEnforcementRegistration(submitData,success =>{ |
|
|
|
|