|
|
@ -33,26 +33,34 @@ |
|
|
required |
|
|
required |
|
|
:rules="[{ required: true, message: '请选择投诉事项' }]" |
|
|
:rules="[{ required: true, message: '请选择投诉事项' }]" |
|
|
/> |
|
|
/> |
|
|
<!-- <van-popup v-model:show="data.showPicker" position="bottom"> |
|
|
<div class="add-box"> |
|
|
<van-picker |
|
|
<div v-for="(item, index) in data.depts" :key="index"> |
|
|
v-model="data.selectTypeValue" |
|
|
<van-field |
|
|
:columns="data.columns" |
|
|
v-if="isNoScan" |
|
|
@cancel="data.showPicker = false" |
|
|
v-model="item.text" |
|
|
@confirm="onConfirm" |
|
|
label="执法部门" |
|
|
/> |
|
|
readonly |
|
|
</van-popup>--> |
|
|
required |
|
|
|
|
|
clickable |
|
|
|
|
|
:right-icon="(data.depts.length - index ) == 1 ? 'add-o' : 'close'" |
|
|
|
|
|
@click-right-icon="(data.depts.length - index ) == 1 ? addDept(index) : cancelDept(index)" |
|
|
|
|
|
:rules="[{ required: true, message: '请选择执法部门' }]" |
|
|
|
|
|
placeholder="请选择执法部门" |
|
|
|
|
|
@click-input="showPopup(index)" |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
<van-divider class="divdsty"/> |
|
|
<van-divider class="divdsty"/> |
|
|
<van-field |
|
|
<van-field |
|
|
v-model="submitData.complaintTime" |
|
|
v-model="submitData.enforcementTime" |
|
|
label="检查时间" |
|
|
label="检查时间" |
|
|
placeholder="请选择" |
|
|
placeholder="请选择" |
|
|
is-link |
|
|
is-link |
|
|
required |
|
|
required |
|
|
:rules="[{ required: true, message: '请选择执法时间' }]" |
|
|
:rules="[{ required: true, message: '请选择执法时间' }]" |
|
|
@click=""/> |
|
|
@click="selectTime"/> |
|
|
<van-popup v-model:show="data.showTimePicker" position="bottom" :style="{ height: '30%' }"> |
|
|
<van-popup v-model:show="data.showTimePicker" position="bottom" :style="{ height: '30%' }"> |
|
|
<van-date-picker |
|
|
<van-date-picker |
|
|
v-if="data.showNom" |
|
|
|
|
|
type="time" |
|
|
type="time" |
|
|
v-model="data.currentDate" |
|
|
v-model="data.currentDate" |
|
|
@confirm="onConfirm" |
|
|
@confirm="onConfirm" |
|
|
@ -147,6 +155,8 @@ |
|
|
</van-form> |
|
|
</van-form> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<DeptPopup :visible="data.popupVisible" :content="data.deptContent" @close="closePopup" |
|
|
|
|
|
@reciveData="reciveDept"/> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup name="register"> |
|
|
<script setup name="register"> |
|
|
@ -155,10 +165,17 @@ |
|
|
import {addEnterpriseComplaint} from '../../api/enterprise' |
|
|
import {addEnterpriseComplaint} from '../../api/enterprise' |
|
|
import {getDict} from '../../api/Home' |
|
|
import {getDict} from '../../api/Home' |
|
|
import {uploadFile} from '../../util/fileUpload' |
|
|
import {uploadFile} from '../../util/fileUpload' |
|
|
import {reactive, ref} from "vue"; |
|
|
import {reactive, ref,defineProps} from "vue"; |
|
|
|
|
|
import DeptPopup from '@/views/enterprise/compaint/selectDeptFilter.vue'; |
|
|
const {useCommon, useMy} = $globalStore |
|
|
|
|
|
|
|
|
const {useCommon, useMy} = $globalStore; |
|
|
|
|
|
const props = defineProps({ |
|
|
|
|
|
isNoScan: { |
|
|
|
|
|
type: Boolean, |
|
|
|
|
|
default: false |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
const router = useRouter(); |
|
|
const router = useRouter(); |
|
|
const route = useRoute(); |
|
|
const route = useRoute(); |
|
|
let queryaddressId = ref(""); |
|
|
let queryaddressId = ref(""); |
|
|
@ -170,7 +187,14 @@ |
|
|
isSelect: false, |
|
|
isSelect: false, |
|
|
isCheckedon: false, |
|
|
isCheckedon: false, |
|
|
isCheckedoff: true, |
|
|
isCheckedoff: true, |
|
|
showTimePicker:false |
|
|
showTimePicker:false, |
|
|
|
|
|
deptChecked: false, |
|
|
|
|
|
deptContent: false, |
|
|
|
|
|
currentDate: ref(['2024', '08', '01']), |
|
|
|
|
|
depts: [[{text: "", id: ""}]], |
|
|
|
|
|
deptFlag: 0, |
|
|
|
|
|
popupVisible: false, |
|
|
|
|
|
deptContent:"", |
|
|
}); |
|
|
}); |
|
|
//保存参数 |
|
|
//保存参数 |
|
|
const submitData = reactive({ |
|
|
const submitData = reactive({ |
|
|
@ -200,15 +224,17 @@ |
|
|
//vant组件上传照片列表 |
|
|
//vant组件上传照片列表 |
|
|
fileListObj: [], |
|
|
fileListObj: [], |
|
|
//投诉时间 |
|
|
//投诉时间 |
|
|
complaintTime:"", |
|
|
enforcementTime:"", |
|
|
|
|
|
complaintDepartments:"", |
|
|
|
|
|
complaintDepartmentIds:"", |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 返回 |
|
|
// 返回 |
|
|
const goBack = () => { |
|
|
const goBack = () => { |
|
|
// router.go(-1); |
|
|
// router.go(-1); |
|
|
router.push({ name: "Home" }); |
|
|
router.push({ name: "Home" }); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
const validator = (val) => /^1[34578]\d{9}$/.test(val); |
|
|
const validator = (val) => /^1[34578]\d{9}$/.test(val); |
|
|
|
|
|
|
|
|
@ -218,7 +244,19 @@ const goBack = () => { |
|
|
|
|
|
|
|
|
const submit = () => { |
|
|
const submit = () => { |
|
|
// console.log(submitData); |
|
|
// console.log(submitData); |
|
|
|
|
|
const deptNameArr = []; |
|
|
|
|
|
const deptIdArr = []; |
|
|
submitData.enterpriseNumber = useCommon.enterpriseNumber; |
|
|
submitData.enterpriseNumber = useCommon.enterpriseNumber; |
|
|
|
|
|
for (let index = 0; index < data.depts.length; index++) { |
|
|
|
|
|
const element = data.depts[index]; |
|
|
|
|
|
console.log(element) |
|
|
|
|
|
deptNameArr.push(element.text); |
|
|
|
|
|
deptIdArr.push(element.id); |
|
|
|
|
|
} |
|
|
|
|
|
submitData.complaintDepartmentIds = deptIdArr.join(","); |
|
|
|
|
|
submitData.complaintDepartments = deptNameArr.join(","); |
|
|
|
|
|
console.log(submitData) |
|
|
|
|
|
// return; |
|
|
addEnterpriseComplaint(submitData, success => { |
|
|
addEnterpriseComplaint(submitData, success => { |
|
|
|
|
|
|
|
|
console.log(success) |
|
|
console.log(success) |
|
|
@ -255,16 +293,22 @@ const goBack = () => { |
|
|
router.replace({name: "addressList"}); |
|
|
router.replace({name: "addressList"}); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
const onConfirm = (value) => { |
|
|
const onConfirm = (time) => { |
|
|
data.showPicker = false; |
|
|
console.log(time) |
|
|
console.log(value) |
|
|
if (time != null) { |
|
|
submitData.enforceType = value.selectedValues[0]; |
|
|
var times = time.selectedValues; |
|
|
submitData.enforceTypeText = value.selectedOptions[0].text; |
|
|
submitData.enforcementTime = times[0] + "-" + times[1] + "-" + times[2]; |
|
|
|
|
|
// data.tempDate = times[1] + "月" + times[2] + "号"; |
|
|
|
|
|
} |
|
|
|
|
|
data.showTimePicker = false; |
|
|
} |
|
|
} |
|
|
const selectType = () => { |
|
|
const selectType = () => { |
|
|
data.showPicker = true; |
|
|
data.showPicker = true; |
|
|
// console.log(data) |
|
|
// console.log(data) |
|
|
} |
|
|
} |
|
|
|
|
|
const selectTime = () =>{ |
|
|
|
|
|
data.showTimePicker = true; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const selectCh = (val) => { |
|
|
const selectCh = (val) => { |
|
|
@ -300,6 +344,7 @@ const goBack = () => { |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
onMounted(() => { |
|
|
onMounted(() => { |
|
|
|
|
|
console.log(props?.isNoScan) |
|
|
console.log(route?.query?.id); |
|
|
console.log(route?.query?.id); |
|
|
console.log(route?.query?.lawEnforcementIncident); |
|
|
console.log(route?.query?.lawEnforcementIncident); |
|
|
submitData.relId = route?.query?.id; |
|
|
submitData.relId = route?.query?.id; |
|
|
@ -318,30 +363,33 @@ const goBack = () => { |
|
|
submitData.enforceType = 3; |
|
|
submitData.enforceType = 3; |
|
|
submitData.enforceTypeText = "入企不扫码"; |
|
|
submitData.enforceTypeText = "入企不扫码"; |
|
|
}); |
|
|
}); |
|
|
|
|
|
const cancelDept = (index) => { |
|
|
</script> |
|
|
data.depts.splice(index, 1); |
|
|
<script> |
|
|
} |
|
|
//案件筛选弹窗 |
|
|
const addDept = (index) => { |
|
|
import Popup from './caseFilter.vue'; |
|
|
data.depts.push({text: "", id: ""}); |
|
|
|
|
|
} |
|
|
export default { |
|
|
const showPopup = (flag) => { |
|
|
components: { |
|
|
data.deptFlag = flag; |
|
|
Popup |
|
|
data.popupVisible = true; |
|
|
}, |
|
|
} |
|
|
data() { |
|
|
const reciveDept = (item) =>{ |
|
|
return { |
|
|
console.log(item) |
|
|
popupVisible: false, |
|
|
|
|
|
popupContent: '' |
|
|
const arr = []; |
|
|
} |
|
|
for (let index = 0; index < item.length; index++) { |
|
|
}, |
|
|
const element = item[index]; |
|
|
methods: { |
|
|
console.log(element) |
|
|
showPopup() { |
|
|
var obj = {text: element.deptName, id: element.deptId} |
|
|
this.popupVisible = true; |
|
|
arr.push(obj); |
|
|
}, |
|
|
} |
|
|
closePopup() { |
|
|
console.log(arr) |
|
|
this.popupVisible = false; |
|
|
data.depts = arr; |
|
|
} |
|
|
console.log(data.depts.value) |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
const closePopup = () =>{ |
|
|
|
|
|
data.popupVisible = false; |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
@ -660,5 +708,6 @@ const goBack = () => { |
|
|
box-sizing: border-box; |
|
|
box-sizing: border-box; |
|
|
line-height: 1.5; |
|
|
line-height: 1.5; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</style> |
|
|
</style> |
|
|
|