|
@@ -26,10 +26,24 @@
|
|
|
<el-radio :label="0" size="large">是</el-radio>
|
|
|
<el-radio :label="1" size="large">否</el-radio>
|
|
|
</el-radio-group>
|
|
|
- <div class="splitbtns" v-if="!hgxform.splitType && action">
|
|
|
- <el-button type="primary">上传拆分数据</el-button>
|
|
|
+ <div class="splitbtns" v-if="hgxform.splitType == 0 && action">
|
|
|
+ <el-upload
|
|
|
+ multiple
|
|
|
+ :action="uploadFileUrl"
|
|
|
+ :file-list="upfileList"
|
|
|
+ :limit="1"
|
|
|
+ :on-error="handleUploadError"
|
|
|
+ :on-success="uploadSuccess"
|
|
|
+ :show-file-list="false"
|
|
|
+ :headers="headers"
|
|
|
+ class="upload-file"
|
|
|
+ ref="splitfileUpload"
|
|
|
+ >
|
|
|
+ <el-button type="primary">上传拆分数据</el-button>
|
|
|
+ </el-upload>
|
|
|
+
|
|
|
<el-button type="primary">在线拆分</el-button>
|
|
|
- <el-button type="primary">清除</el-button>
|
|
|
+ <el-button type="primary" @click="clear">清除</el-button>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<tablePage
|
|
@@ -45,6 +59,7 @@
|
|
|
v-model="row.decide"
|
|
|
placeholder="请选择"
|
|
|
:disabled="!action"
|
|
|
+ @change="getdecideTree"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="dict in hgx_decide"
|
|
@@ -57,14 +72,14 @@
|
|
|
<template #decideType="{ row }">
|
|
|
<el-tree-select
|
|
|
v-model="row.decideType"
|
|
|
- :data="deptOptions"
|
|
|
+ :data="decList[row.decide]"
|
|
|
:props="{
|
|
|
- value: 'deptId',
|
|
|
- label: 'deptName',
|
|
|
+ value: 'dictValue',
|
|
|
+ label: 'dictLabel',
|
|
|
children: 'children',
|
|
|
}"
|
|
|
- value-key="deptId"
|
|
|
- check-strictly
|
|
|
+ value-key="dictValue"
|
|
|
+ default-expanded-keys
|
|
|
:disabled="!action"
|
|
|
/>
|
|
|
</template>
|
|
@@ -79,12 +94,13 @@
|
|
|
<span class="usable" @click="fly(row)">定位</span>
|
|
|
</template>
|
|
|
</tablePage>
|
|
|
- <div v-else>
|
|
|
+ <div v-if="hgxform.splitType">
|
|
|
<el-form-item label="判定结论:" prop="decide" :disabled="!action">
|
|
|
<el-select
|
|
|
- v-model="hgxform.hgxVoList[0].decide"
|
|
|
+ v-model="hgxform.decide"
|
|
|
placeholder="请选择"
|
|
|
:disabled="!action"
|
|
|
+ @change="getdecideTree"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="dict in hgx_decide"
|
|
@@ -101,15 +117,15 @@
|
|
|
label-width="160px"
|
|
|
>
|
|
|
<el-tree-select
|
|
|
- v-model="hgxform.hgxVoList[0].decideType"
|
|
|
- :data="deptOptions"
|
|
|
+ v-model="hgxform.decideType"
|
|
|
+ :data="decList[hgxform.decide]"
|
|
|
:props="{
|
|
|
- value: 'deptId',
|
|
|
- label: 'deptName',
|
|
|
+ value: 'dictValue',
|
|
|
+ label: 'dictLabel',
|
|
|
children: 'children',
|
|
|
}"
|
|
|
- value-key="deptId"
|
|
|
- check-strictly
|
|
|
+ value-key="dictValue"
|
|
|
+ default-expanded-keys
|
|
|
:disabled="!action"
|
|
|
/>
|
|
|
</el-form-item>
|
|
@@ -125,6 +141,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="附件材料:">
|
|
|
<el-upload
|
|
|
+ v-if="action"
|
|
|
multiple
|
|
|
:action="uploadFileUrl"
|
|
|
:file-list="hgxform.fjs"
|
|
@@ -149,7 +166,9 @@
|
|
|
<template #faction="{ row, $index }">
|
|
|
<span class="usable" @click="preview(row)">查看</span>
|
|
|
<span class="usable" @click="download(row)"> 下载 </span>
|
|
|
- <span class="usable" @click="handleDelete($index)"> 删除 </span>
|
|
|
+ <span class="usable" v-if="action" @click="handleDelete($index)">
|
|
|
+ 删除
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</tablePage>
|
|
|
</el-form>
|
|
@@ -164,7 +183,12 @@
|
|
|
|
|
|
<script setup name="details">
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
-import { hgxinfo, hgxDkjbxx } from "@/api/rsmonitoring/dkjbxx";
|
|
|
+import {
|
|
|
+ hgxinfo,
|
|
|
+ hgxDkjbxx,
|
|
|
+ getdecTree,
|
|
|
+ hgxSplit,
|
|
|
+} from "@/api/rsmonitoring/dkjbxx";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const { hgx_decide } = proxy.useDict("hgx_decide");
|
|
@@ -190,10 +214,13 @@ const resultdata = reactive({
|
|
|
open: false,
|
|
|
action: false,
|
|
|
diatitle: "",
|
|
|
+ decList: {},
|
|
|
+ upfileList: [],
|
|
|
hgxform: { hgxVoList: [], fjs: [] },
|
|
|
});
|
|
|
|
|
|
-const { open, action, diatitle, hgxform } = toRefs(resultdata);
|
|
|
+const { open, action, diatitle, decList, upfileList, hgxform } =
|
|
|
+ toRefs(resultdata);
|
|
|
const emit = defineEmits(["reset"]);
|
|
|
function moreAct(actitem, infoObj) {
|
|
|
diatitle.value = `合法性判定结果`;
|
|
@@ -208,6 +235,13 @@ function moreAct(actitem, infoObj) {
|
|
|
hgxform.value = res.data || {};
|
|
|
});
|
|
|
}
|
|
|
+function getdecideTree(val) {
|
|
|
+ if (!decList.value[val])
|
|
|
+ getdecTree({ dictType: `hgx_decide:${val}` }).then((res) => {
|
|
|
+ decList.value[val] = res.data;
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
function operate(infoObj, aStep) {
|
|
|
diatitle.value = `合法性判定`;
|
|
|
open.value = true;
|
|
@@ -216,19 +250,29 @@ function operate(infoObj, aStep) {
|
|
|
hgxform.value.dkbh = infoObj.dkbh;
|
|
|
hgxform.value.dkmj = infoObj.dkmj;
|
|
|
hgxform.value.auditflowStep = aStep;
|
|
|
-
|
|
|
- // } else if (oname == "002")
|
|
|
- // scDkjbxx(pram).then((res) => {
|
|
|
- // hgxform.value = res.data || {};
|
|
|
- // });
|
|
|
- // else if (oname == "003")
|
|
|
- // tjDkjbxx(pram).then((res) => {
|
|
|
- // hgxform.value = res.data || {};
|
|
|
- // });
|
|
|
}
|
|
|
function radioChange(val) {
|
|
|
hgxform.value.hgxVoList = [];
|
|
|
- if (val == "1") hgxform.value.hgxVoList = [{ decide: "", decideType: "" }];
|
|
|
+}
|
|
|
+function clear() {
|
|
|
+ hgxform.value.hgxVoList = [];
|
|
|
+ upfileList.value = [];
|
|
|
+}
|
|
|
+function uploadSuccess(res, file) {
|
|
|
+ if (res.code === 200) {
|
|
|
+ // proxy.$modal.closeLoading();
|
|
|
+ upfileList.value = [];
|
|
|
+ // hgxform.value.dkbh
|
|
|
+ hgxSplit({ path: res.data.path, dkbh: "1501252024050806280002" }).then(
|
|
|
+ (res) => {
|
|
|
+ if (res.code == 200) hgxform.value.hgxVoList = res.data;
|
|
|
+ }
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ proxy.$modal.closeLoading();
|
|
|
+ proxy.$modal.msgError(res.msg);
|
|
|
+ proxy.$refs.splitfileUpload.handleRemove(file);
|
|
|
+ }
|
|
|
}
|
|
|
// 审核;
|
|
|
function submitForm() {
|
|
@@ -236,6 +280,11 @@ function submitForm() {
|
|
|
open.value = false;
|
|
|
return;
|
|
|
}
|
|
|
+ if (hgxform.value.splitType == 1) {
|
|
|
+ hgxform.value.hgxVoList = [
|
|
|
+ { decide: hgxform.value.decide, decideType: hgxform.value.decideType },
|
|
|
+ ];
|
|
|
+ }
|
|
|
proxy.$refs["dkjbxxRef"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
hgxDkjbxx(hgxform.value).then((res) => {
|
|
@@ -248,13 +297,13 @@ function submitForm() {
|
|
|
});
|
|
|
}
|
|
|
function reset() {
|
|
|
- hgxform.value = {};
|
|
|
+ hgxform.value = { hgxVoList: [], fjs: [] };
|
|
|
}
|
|
|
function download(row) {
|
|
|
- window.open(row.fjPath);
|
|
|
+ window.open(row.fjUrl || row.fjPath);
|
|
|
}
|
|
|
function preview(row) {
|
|
|
- window.open(row.fjPath, "_blank");
|
|
|
+ window.open(row.fjUrl || row.fjPath, "_blank");
|
|
|
}
|
|
|
defineExpose({ moreAct, operate });
|
|
|
|
|
@@ -262,12 +311,12 @@ defineExpose({ moreAct, operate });
|
|
|
function handleUploadError(err) {
|
|
|
proxy.$modal.msgError("上传文件失败");
|
|
|
}
|
|
|
-function handleUploadSuccess(res, file, UploadFile, uploadFiles) {
|
|
|
+function handleUploadSuccess(res, file) {
|
|
|
if (res.code === 200) {
|
|
|
hgxform.value.fjs.push({
|
|
|
fjName: file.name,
|
|
|
- fjPath: res.data.url,
|
|
|
- // url: res.data.path,
|
|
|
+ fjPath: res.data.path,
|
|
|
+ fjUrl: res.data.url,
|
|
|
fjSize: Number((file.size / 1024 / 1024).toFixed(2)),
|
|
|
fjType: file.name.split(".").pop(),
|
|
|
});
|
|
@@ -291,5 +340,6 @@ function handleDelete(index) {
|
|
|
}
|
|
|
.upload-file {
|
|
|
display: inline-block;
|
|
|
+ margin-right: 20px;
|
|
|
}
|
|
|
</style>
|