Merge branch 'main' of http://123.132.248.154:10000/HC_YFZX/CaiYuanYiTiHua
commit
7a31be0495
|
|
@ -95,9 +95,10 @@
|
||||||
}}</a-descriptions-item>
|
}}</a-descriptions-item>
|
||||||
</a-descriptions>
|
</a-descriptions>
|
||||||
<div
|
<div
|
||||||
style="display: flex; justify-content: right; margin-top: 10px"
|
|
||||||
v-if="isKeepSupervision"
|
v-if="isKeepSupervision"
|
||||||
|
style="display: flex; justify-content: right; margin-top: 10px; gap: 10px"
|
||||||
>
|
>
|
||||||
|
<a-button type="primary" @click="funCheckCxjgPic"> 继续持续监管 </a-button>
|
||||||
<a-button type="primary" @click="moveInIllegalSubejctOpen = true">
|
<a-button type="primary" @click="moveInIllegalSubejctOpen = true">
|
||||||
转入违法用地
|
转入违法用地
|
||||||
</a-button>
|
</a-button>
|
||||||
|
|
@ -509,7 +510,7 @@
|
||||||
import { defineProps, ref, computed, onBeforeMount, watch } from 'vue';
|
import { defineProps, ref, computed, onBeforeMount, watch } from 'vue';
|
||||||
import MapboxMap from '@/components/MapboxMaps/MapComponent.vue';
|
import MapboxMap from '@/components/MapboxMaps/MapComponent.vue';
|
||||||
import { getConfig, getGeom } from '@/api/sys/layerManagement';
|
import { getConfig, getGeom } from '@/api/sys/layerManagement';
|
||||||
import { MoveInIllegalSubject } from '@/api/demo/system';
|
import { MoveInIllegalSubject, CheckCxjgPic } from '@/api/demo/system';
|
||||||
import { getLoadCaseImgList } from '@/api/tiankongdi';
|
import { getLoadCaseImgList } from '@/api/tiankongdi';
|
||||||
import { useMessage } from '@/hooks/web/useMessage';
|
import { useMessage } from '@/hooks/web/useMessage';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
@ -809,6 +810,18 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 继续持续监管
|
||||||
|
const funCheckCxjgPic = async () => {
|
||||||
|
let querys = {
|
||||||
|
id: props.showInfoData.case_no,
|
||||||
|
};
|
||||||
|
await CheckCxjgPic(querys).then((res) => {
|
||||||
|
if (res) {
|
||||||
|
createMessage.success('图片审核成功,持续监管中!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ export const columns: BasicColumn[] = [
|
||||||
{
|
{
|
||||||
title: '图斑编号',
|
title: '图斑编号',
|
||||||
dataIndex: 'caseno',
|
dataIndex: 'caseno',
|
||||||
width: 200,
|
width: 250,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '图斑类型',
|
title: '图斑类型',
|
||||||
|
|
@ -120,16 +120,15 @@ export const searchFormSchema: FormSchema[] = [
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
field: 'picihao',
|
// field: 'picihao',
|
||||||
label: '批次',
|
// label: '批次',
|
||||||
component: 'Select',
|
// component: 'Select',
|
||||||
colProps: { span: 4 },
|
// colProps: { span: 4 },
|
||||||
componentProps: {
|
// componentProps: {
|
||||||
options: [],
|
// options: [],
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'typename',
|
field: 'typename',
|
||||||
label: '图斑类型',
|
label: '图斑类型',
|
||||||
|
|
@ -187,37 +186,37 @@ export const searchFormSchema: FormSchema[] = [
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
field: 'nowStatus',
|
// field: 'nowStatus',
|
||||||
label: '当前状态',
|
// label: '当前状态',
|
||||||
component: 'Select',
|
// component: 'Select',
|
||||||
componentProps: {
|
// componentProps: {
|
||||||
options: nowStatusOptions,
|
// options: nowStatusOptions,
|
||||||
},
|
// },
|
||||||
colProps: { span: 4 },
|
// colProps: { span: 4 },
|
||||||
slot: 'dangqianzhuangtai',
|
// slot: 'dangqianzhuangtai',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
field: 'isIllegal',
|
// field: 'isIllegal',
|
||||||
label: '判定结果',
|
// label: '判定结果',
|
||||||
component: 'Select',
|
// component: 'Select',
|
||||||
colProps: { span: 4 },
|
// colProps: { span: 4 },
|
||||||
componentProps: {
|
// componentProps: {
|
||||||
options: mapTypeOptions,
|
// options: mapTypeOptions,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
field: 'weifaleixing',
|
// field: 'weifaleixing',
|
||||||
label: '违法类型',
|
// label: '违法类型',
|
||||||
component: 'Select',
|
// component: 'Select',
|
||||||
colProps: { span: 4 },
|
// colProps: { span: 4 },
|
||||||
componentProps: {
|
// componentProps: {
|
||||||
options: [
|
// options: [
|
||||||
{ label: '非农化违法用地', value: '0' },
|
// { label: '非农化违法用地', value: '0' },
|
||||||
{ label: '非粮化违法用地', value: '1' },
|
// { label: '非粮化违法用地', value: '1' },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
field: 'measureName',
|
field: 'measureName',
|
||||||
label: '整改措施',
|
label: '整改措施',
|
||||||
|
|
@ -256,6 +255,19 @@ export const searchFormSchema: FormSchema[] = [
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
colProps: { span: 4 },
|
colProps: { span: 4 },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'picCheck',
|
||||||
|
label: '审核状态',
|
||||||
|
component: 'Select',
|
||||||
|
colProps: { span: 4 },
|
||||||
|
componentProps: {
|
||||||
|
options: [
|
||||||
|
{ label: '未上传', value: '0' },
|
||||||
|
{ label: '待审核', value: '1' },
|
||||||
|
{ label: '已审核', value: '2' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: '[startTime, endTime]',
|
field: '[startTime, endTime]',
|
||||||
label: '下发时间',
|
label: '下发时间',
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
v-model:file-list="fileList"
|
v-model:file-list="fileList"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
multiple
|
multiple
|
||||||
|
:accept="'.jpg,.jpeg,.png'"
|
||||||
:showUploadList="false"
|
:showUploadList="false"
|
||||||
:custom-request="customRequest"
|
:custom-request="customRequest"
|
||||||
>
|
>
|
||||||
|
|
@ -79,17 +80,6 @@
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
<div class="updateDiv">
|
<div class="updateDiv">
|
||||||
<a-tooltip
|
|
||||||
v-if="
|
|
||||||
fileList && fileList.length > 0 && fileList.find((item) => item.status == 'updateError')
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<template #title>在报【有未审核的图片,不允许上传】的错误时,可以点击</template>
|
|
||||||
<a-button type="primary" @click="funCheckCxjgPic" style="margin-right: 10px">
|
|
||||||
审核图片
|
|
||||||
</a-button>
|
|
||||||
</a-tooltip>
|
|
||||||
<!-- {{ .length }} -->
|
|
||||||
<a-button type="primary" @click="startUploadCXJGData">
|
<a-button type="primary" @click="startUploadCXJGData">
|
||||||
将上传成功的图片插入到数据库
|
将上传成功的图片插入到数据库
|
||||||
</a-button>
|
</a-button>
|
||||||
|
|
@ -102,7 +92,7 @@
|
||||||
import { PlusOutlined, CheckCircleOutlined, CloseCircleOutlined } from '@ant-design/icons-vue';
|
import { PlusOutlined, CheckCircleOutlined, CloseCircleOutlined } from '@ant-design/icons-vue';
|
||||||
import { getAppEnvConfig } from '@/utils/env';
|
import { getAppEnvConfig } from '@/utils/env';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { UpdateCxjgData, CheckCxjgPic } from '@/api/demo/system';
|
import { UpdateCxjgData } from '@/api/demo/system';
|
||||||
import { uploadColumns } from './keepSupervision.data';
|
import { uploadColumns } from './keepSupervision.data';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
|
||||||
|
|
@ -156,80 +146,15 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
// 持续监管-图片插入启动
|
// 持续监管-图片插入启动
|
||||||
|
let uoloadArray: any = [];
|
||||||
async function startUploadCXJGData() {
|
async function startUploadCXJGData() {
|
||||||
const list = fileList.value;
|
const list = fileList.value;
|
||||||
|
uoloadArray = [];
|
||||||
|
|
||||||
if (!list || list.length === 0) return;
|
if (!list || list.length === 0) return;
|
||||||
for (let i = 0; i < list.length; i++) {
|
list.forEach((item) => {
|
||||||
const item = list[i];
|
|
||||||
if (item.status === 'done' || item.status === 'updateError') {
|
if (item.status === 'done' || item.status === 'updateError') {
|
||||||
// 等待上传完成并返回 true 后,再继续下一个循环
|
// 三个参数
|
||||||
await UpdateUploadCXJGData(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 持续监管-图片插入
|
|
||||||
async function UpdateUploadCXJGData(value) {
|
|
||||||
let caseid = value.name.split('.').slice(0, -1).join('.');
|
|
||||||
let flag = false;
|
|
||||||
if (caseid.includes('_CX')) {
|
|
||||||
flag = true;
|
|
||||||
}
|
|
||||||
if (caseid.includes('_')) {
|
|
||||||
caseid = caseid.split('_').slice(0, 1).join('_');
|
|
||||||
}
|
|
||||||
if (flag) {
|
|
||||||
caseid = caseid + '_CX';
|
|
||||||
}
|
|
||||||
const index = fileList.value.findIndex((item) => item.uid === value.uid);
|
|
||||||
if (index === -1) return false; // 如果找不到对应文件项,直接返回
|
|
||||||
let querys = {
|
|
||||||
caseid: caseid,
|
|
||||||
path: value.url,
|
|
||||||
};
|
|
||||||
try {
|
|
||||||
const res1 = await UpdateCxjgData(querys);
|
|
||||||
if (res1) {
|
|
||||||
// 图片上传成功,开始审核
|
|
||||||
const res2 = await CheckCxjgPic({ id: caseid });
|
|
||||||
if (res2) {
|
|
||||||
// 审核通过
|
|
||||||
fileList.value[index] = {
|
|
||||||
...fileList.value[index],
|
|
||||||
status: 'updateSuccess',
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
// 审核失败
|
|
||||||
fileList.value[index] = {
|
|
||||||
...fileList.value[index],
|
|
||||||
status: 'updateError',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 上传失败
|
|
||||||
fileList.value[index] = {
|
|
||||||
...fileList.value[index],
|
|
||||||
status: 'updateError',
|
|
||||||
};
|
|
||||||
message.error('有未审核的图片,不允许上传');
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error('上传或审核出错:', error);
|
|
||||||
fileList.value[index] = {
|
|
||||||
...fileList.value[index],
|
|
||||||
status: 'updateError',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 持续监管-图片审核
|
|
||||||
async function funCheckCxjgPic() {
|
|
||||||
const list = fileList.value;
|
|
||||||
if (!list || list.length === 0) return;
|
|
||||||
for (let i = 0; i < list.length; i++) {
|
|
||||||
const item = list[i];
|
|
||||||
if (item.status === 'updateError') {
|
|
||||||
// 等待上传完成并返回 true 后,再继续下一个循环
|
|
||||||
let caseid = item.name.split('.').slice(0, -1).join('.');
|
let caseid = item.name.split('.').slice(0, -1).join('.');
|
||||||
let flag = false;
|
let flag = false;
|
||||||
if (caseid.includes('_CX')) {
|
if (caseid.includes('_CX')) {
|
||||||
|
|
@ -241,13 +166,66 @@
|
||||||
if (flag) {
|
if (flag) {
|
||||||
caseid = caseid + '_CX';
|
caseid = caseid + '_CX';
|
||||||
}
|
}
|
||||||
await CheckCxjgPic({ id: caseid });
|
const index = fileList.value.findIndex((l) => l.uid === item.uid);
|
||||||
const index = fileList.value.findIndex((item) => item.uid === item.uid);
|
const path = item.url;
|
||||||
|
// 按图斑编号分组
|
||||||
|
const uoloadArrayIndex = uoloadArray.findIndex((l) => l.caseid === caseid);
|
||||||
|
if (uoloadArrayIndex != -1) {
|
||||||
|
uoloadArray[uoloadArrayIndex].index += ',' + index;
|
||||||
|
uoloadArray[uoloadArrayIndex].path += ',' + path;
|
||||||
|
} else {
|
||||||
|
uoloadArray.push({
|
||||||
|
caseid: caseid,
|
||||||
|
index: index.toString(),
|
||||||
|
path: path,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 持续监管-图片插入
|
||||||
|
if (!uoloadArray || uoloadArray.length === 0) return;
|
||||||
|
for (let i = 0; i < uoloadArray.length; i++) {
|
||||||
|
await UpdateUploadCXJGData(uoloadArray[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 持续监管-图片插入
|
||||||
|
async function UpdateUploadCXJGData(value) {
|
||||||
|
let querys = {
|
||||||
|
caseid: value.caseid,
|
||||||
|
path: value.path,
|
||||||
|
};
|
||||||
|
try {
|
||||||
|
await UpdateCxjgData(querys).then((res) => {
|
||||||
|
if (res) {
|
||||||
|
const indexs = value.index.split(',');
|
||||||
|
indexs?.forEach((index) => {
|
||||||
fileList.value[index] = {
|
fileList.value[index] = {
|
||||||
...fileList.value[index],
|
...fileList.value[index],
|
||||||
status: 'updateSuccess',
|
status: 'updateSuccess',
|
||||||
};
|
};
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
const indexs = value.index.split(',');
|
||||||
|
indexs?.forEach((index) => {
|
||||||
|
fileList.value[index] = {
|
||||||
|
...fileList.value[index],
|
||||||
|
status: 'updateError',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
message.error(`当前图斑【${value.caseid}】有未审核的图片,不允许继续上传,请先审核!`);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
const indexs = value.index.split(',');
|
||||||
|
indexs?.forEach((index) => {
|
||||||
|
fileList.value[index] = {
|
||||||
|
...fileList.value[index],
|
||||||
|
status: 'updateError',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
console.error('上传或审核出错:', error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue