|
@@ -554,6 +554,7 @@ const props = defineProps({ caseId: Number, title: String });
|
|
|
console.log(props);
|
|
|
const isDisableExport = ref(false);
|
|
|
const data = reactive({
|
|
|
+ title: "",
|
|
|
inquestNum: "", //现场勘验号
|
|
|
deptName: "", //单位名称
|
|
|
sendDept: "", //发送单位
|
|
@@ -564,7 +565,7 @@ const data = reactive({
|
|
|
reportDept: "", //报告单位
|
|
|
times: [], // startTime ,endTime
|
|
|
address: "", // 勘验地址
|
|
|
-
|
|
|
+ inquestTime: "", //勘验时间
|
|
|
protector: {
|
|
|
name: "",
|
|
|
unit: "",
|
|
@@ -582,6 +583,8 @@ const data = reactive({
|
|
|
windDirection: "",
|
|
|
}, //天气情况
|
|
|
light: [], //光线
|
|
|
+ painter: "",
|
|
|
+ photographer: "",
|
|
|
inquestCommander: {
|
|
|
name: "",
|
|
|
unit: "",
|
|
@@ -594,10 +597,8 @@ const data = reactive({
|
|
|
photographySecNum: 0, //摄影数量
|
|
|
recorderInfo: [...recorderInfoType, recorderInfoType[4]],
|
|
|
signatureInfo: [], //现场勘验人员
|
|
|
-
|
|
|
witnessInfo: [],
|
|
|
-
|
|
|
- remark: '',
|
|
|
+ remark: "",
|
|
|
});
|
|
|
const signatureInfoNum = 4;
|
|
|
const witnessInfoNum = 2;
|
|
@@ -614,19 +615,21 @@ const initInfo = async () => {
|
|
|
for (var k in data) {
|
|
|
if (res.data && res.data.hasOwnProperty(k)) {
|
|
|
console.log("Key is " + k);
|
|
|
- data[k] = res.data[k];
|
|
|
+ if (res.data[k]) {
|
|
|
+ data[k] = res.data[k];
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
const initSignatureAndWitInfo = () => {
|
|
|
- data.signatureInfo.length === 0 &&
|
|
|
+ (data.signatureInfo.length === 0 || !data.signatureInfo) &&
|
|
|
Array.from(new Array(signatureInfoNum)).forEach(() => {
|
|
|
data.signatureInfo.push({
|
|
|
unit: "",
|
|
|
job: "",
|
|
|
});
|
|
|
});
|
|
|
- data.witnessInfo.length === 0 &&
|
|
|
+ (data.witnessInfo.length === 0 || !data.witnessInfo) &&
|
|
|
Array.from(new Array(witnessInfoNum)).forEach(() => {
|
|
|
data.witnessInfo.push({
|
|
|
sex: 0,
|
|
@@ -688,7 +691,6 @@ const removeWitnessInfo = async (index) => {
|
|
|
const handleSave = async () => {
|
|
|
console.log("data", data);
|
|
|
|
|
|
-
|
|
|
const res = await saveCaseInquestInfo(props.caseId, data);
|
|
|
// if (res.code === 0) {
|
|
|
// ElMessage.success("保存成功!");
|