fix: BUG修改
This commit is contained in:
parent
45a064af18
commit
330abe56a3
@ -262,15 +262,19 @@ const tooltipContent = ref({
|
||||
name: ""
|
||||
});
|
||||
const getDataList = async () => {
|
||||
const res = await bigItemAll({ engineeringSn: searchSn.value });
|
||||
console.log(res);
|
||||
if (res) {
|
||||
const arr = dealArr(res.result);
|
||||
projects.value = arr;
|
||||
if (searchSn.value) {
|
||||
const res = await bigItemAll({ engineeringSn: searchSn.value });
|
||||
console.log(res);
|
||||
if (res) {
|
||||
const arr = dealArr(res.result);
|
||||
projects.value = arr;
|
||||
}
|
||||
setTimeout(function () {
|
||||
setGantts();
|
||||
}, 300);
|
||||
} else {
|
||||
projects.value = [];
|
||||
}
|
||||
setTimeout(function () {
|
||||
setGantts();
|
||||
}, 300);
|
||||
};
|
||||
const dealArr = arr => {
|
||||
arr.map(item => {
|
||||
|
||||
@ -296,11 +296,18 @@ const rules = reactive<FormRules>({
|
||||
message: "请输入",
|
||||
trigger: "blur"
|
||||
},
|
||||
completeRatio: {
|
||||
required: true,
|
||||
message: "请输入",
|
||||
trigger: "blur"
|
||||
},
|
||||
completeRatio: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入",
|
||||
trigger: "blur"
|
||||
},
|
||||
{
|
||||
pattern: /^[0-9\.]+$/,
|
||||
message: "请输入整数或小数",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
state: {
|
||||
required: true,
|
||||
message: "请选择",
|
||||
@ -383,14 +390,18 @@ const getDataList = async () => {
|
||||
engineeringSn: searchSn.value
|
||||
};
|
||||
delete requestData.timeRange;
|
||||
const res = await bigItemList(requestData);
|
||||
if (res) {
|
||||
tableData.value = res.result.records;
|
||||
pageable.value = reactive({
|
||||
pageNo: +res.result.current,
|
||||
pageSize: +res.result.size,
|
||||
total: +res.result.total
|
||||
});
|
||||
if (requestData.engineeringSn || requestData.projectSn) {
|
||||
const res = await bigItemList(requestData);
|
||||
if (res) {
|
||||
tableData.value = res.result.records;
|
||||
pageable.value = reactive({
|
||||
pageNo: +res.result.current,
|
||||
pageSize: +res.result.size,
|
||||
total: +res.result.total
|
||||
});
|
||||
}
|
||||
} else {
|
||||
tableData.value = [];
|
||||
}
|
||||
console.log(res);
|
||||
};
|
||||
@ -406,8 +417,8 @@ const childrenConfirm = async (formEl: FormInstance | undefined, form: any) => {
|
||||
return;
|
||||
}
|
||||
}
|
||||
form.overdueIssueFile = JSON.stringify(form.overdueIssueFile);
|
||||
form.annexFile = JSON.stringify(form.annexFile);
|
||||
form.overdueIssueFile = form.overdueIssueFile ? JSON.stringify(form.overdueIssueFile) : "";
|
||||
form.annexFile = form.annexFile ? JSON.stringify(form.annexFile) : "";
|
||||
if (form.id) {
|
||||
if (newTitle.value == "编辑子项") {
|
||||
form.parentId = parentObj.value.parentId;
|
||||
|
||||
@ -333,17 +333,19 @@ const getVideoData = async () => {
|
||||
engineeringSn: searchSn.value ? searchSn.value : ""
|
||||
};
|
||||
delete requestData.createTime;
|
||||
const res = await videoList(requestData);
|
||||
if (res.result && res.result.records.length > 0) {
|
||||
res.result.records.map(item => {
|
||||
item.videoUrl = JSON.parse(item.videoUrl);
|
||||
});
|
||||
videoData.value.records = res.result.records;
|
||||
if (requestData.engineeringSn || requestData.projectSn) {
|
||||
const res = await videoList(requestData);
|
||||
if (res.result && res.result.records.length > 0) {
|
||||
res.result.records.map(item => {
|
||||
item.videoUrl = JSON.parse(item.videoUrl);
|
||||
});
|
||||
videoData.value.records = res.result.records;
|
||||
} else {
|
||||
videoData.value.records = [];
|
||||
}
|
||||
} else {
|
||||
videoData.value.records = [];
|
||||
}
|
||||
console.log(videoData.value);
|
||||
console.log(res);
|
||||
};
|
||||
|
||||
const uploadSuccess = (response: any) => {
|
||||
|
||||
@ -327,15 +327,19 @@ const getDataList = async () => {
|
||||
} else {
|
||||
requestData.engineeringSn = searchSn.value;
|
||||
}
|
||||
const res = await bigItemGovermentAll(requestData);
|
||||
console.log(res);
|
||||
if (res) {
|
||||
const arr = dealArr(res.result);
|
||||
projects.value = arr;
|
||||
if (requestData.projectSn || requestData.engineeringSn) {
|
||||
const res = await bigItemGovermentAll(requestData);
|
||||
console.log(res);
|
||||
if (res) {
|
||||
const arr = dealArr(res.result);
|
||||
projects.value = arr;
|
||||
}
|
||||
setTimeout(function () {
|
||||
setGantts();
|
||||
}, 300);
|
||||
} else {
|
||||
projects.value = [];
|
||||
}
|
||||
setTimeout(function () {
|
||||
setGantts();
|
||||
}, 300);
|
||||
};
|
||||
const dealArr = arr => {
|
||||
arr.map(item => {
|
||||
|
||||
@ -353,14 +353,18 @@ const getDataList = async () => {
|
||||
} else {
|
||||
requestData.engineeringSn = searchSn.value;
|
||||
}
|
||||
const res = await bigItemGovermentList(requestData);
|
||||
if (res) {
|
||||
tableData.value = res.result.records;
|
||||
pageable.value = reactive({
|
||||
pageNo: +res.result.current,
|
||||
pageSize: +res.result.size,
|
||||
total: +res.result.total
|
||||
});
|
||||
if (requestData.engineeringSn || requestData.projectSn) {
|
||||
const res = await bigItemGovermentList(requestData);
|
||||
if (res) {
|
||||
tableData.value = res.result.records;
|
||||
pageable.value = reactive({
|
||||
pageNo: +res.result.current,
|
||||
pageSize: +res.result.size,
|
||||
total: +res.result.total
|
||||
});
|
||||
}
|
||||
} else {
|
||||
tableData.value = [];
|
||||
}
|
||||
console.log(res);
|
||||
};
|
||||
|
||||
@ -305,24 +305,27 @@ const refresh = () => {
|
||||
};
|
||||
// 页面的form搜索 这里
|
||||
const handSearch = async () => {
|
||||
const res = await getUnmannedPage(
|
||||
active.value === 0
|
||||
? { ...form.value, ...pageable.value, projectSn: searchSn.value }
|
||||
: { ...form.value, ...pageable.value, engineeringSn: searchSn.value }
|
||||
);
|
||||
if (res.result && res.result.records.length > 0) {
|
||||
res.result.records.map(item => {
|
||||
item.videoUrl = JSON.parse(item.videoUrl);
|
||||
});
|
||||
questList.value = res.result.records;
|
||||
if (searchSn.value) {
|
||||
const res = await getUnmannedPage(
|
||||
active.value === 0
|
||||
? { ...form.value, ...pageable.value, projectSn: searchSn.value }
|
||||
: { ...form.value, ...pageable.value, engineeringSn: searchSn.value }
|
||||
);
|
||||
if (res.result && res.result.records.length > 0) {
|
||||
res.result.records.map(item => {
|
||||
item.videoUrl = JSON.parse(item.videoUrl);
|
||||
});
|
||||
questList.value = res.result.records;
|
||||
} else {
|
||||
questList.value = [];
|
||||
}
|
||||
pageable.value.total = +res.result.total;
|
||||
} else {
|
||||
questList.value = [];
|
||||
}
|
||||
pageable.value.total = +res.result.total;
|
||||
};
|
||||
// 页面的项目名称和工程名称的div点击事件
|
||||
const onSearch = async (params: ResAiProjectPage | ResAiEngineerPage) => {
|
||||
handSearch();
|
||||
active.value === 0
|
||||
? (searchSn.value = (params as ResAiProjectPage).projectSn)
|
||||
: (searchSn.value = (params as ResAiEngineerPage).engineeringSn);
|
||||
@ -336,6 +339,7 @@ const onSearch = async (params: ResAiProjectPage | ResAiEngineerPage) => {
|
||||
startTime: "",
|
||||
endTime: ""
|
||||
};
|
||||
handSearch();
|
||||
// getAiMonitorDevList();
|
||||
};
|
||||
|
||||
@ -377,12 +381,14 @@ const getAIproPage = async () => {
|
||||
const { result } = await getUnmannedProjectPage(pages.value);
|
||||
records.value = result.records;
|
||||
pages.value.total = Number(result.total);
|
||||
searchSn.value = (records.value as ResAiProjectPage[])[0].projectSn;
|
||||
};
|
||||
// 获取工程名称分页
|
||||
const getAIengPage = async () => {
|
||||
const { result } = await getUnmannedEngineeringPage(pages.value);
|
||||
records.value = result.records;
|
||||
pages.value.total = +result.total;
|
||||
searchSn.value = (records.value as ResAiProjectPage[])[0].engineeringSn;
|
||||
};
|
||||
|
||||
// 这里监控名称的下拉框列表
|
||||
|
||||
@ -410,10 +410,16 @@ const getAIproPage = async () => {
|
||||
} else if (activeValue.value == "project") {
|
||||
requestData.projectSn = searchSn.value;
|
||||
}
|
||||
const { result } = await getAIAlarmPage(requestData);
|
||||
questList.value = result;
|
||||
qusLength.value = result.records;
|
||||
pages.value.total = Number(result.total);
|
||||
if (requestData.engineeringSn || requestData.projectSn) {
|
||||
const { result } = await getAIAlarmPage(requestData);
|
||||
questList.value = result;
|
||||
qusLength.value = result.records;
|
||||
pages.value.total = Number(result.total);
|
||||
} else {
|
||||
questList.value = { records: [] };
|
||||
qusLength.value = [];
|
||||
pages.value.total = 0;
|
||||
}
|
||||
};
|
||||
// 监控名称下拉框的value
|
||||
const getAiMonitorDevList = async () => {
|
||||
|
||||
@ -242,6 +242,11 @@ const handleDeleteItem = async (params: jxj_User.ResUserList) => {
|
||||
|
||||
// 页面新增,编辑数据
|
||||
const saveItem = async (form: any) => {
|
||||
if (activeValue.value == "eng") {
|
||||
form.engineeringSn = searchSn.value;
|
||||
} else if (activeValue.value == "project") {
|
||||
form.projectSn = searchSn.value;
|
||||
}
|
||||
if (form.id) {
|
||||
const res = await editDustManagement(form);
|
||||
proTable.value.getTableList();
|
||||
|
||||
@ -345,7 +345,7 @@
|
||||
v-model="form.entryTime"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="datetime"
|
||||
type="date"
|
||||
placeholder="请选择"
|
||||
:disabled="props.title == '查看人员'"
|
||||
/>
|
||||
@ -355,7 +355,7 @@
|
||||
v-model="form.trainingTime"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="datetime"
|
||||
type="date"
|
||||
placeholder="请选择"
|
||||
:disabled="props.title == '查看人员'"
|
||||
/>
|
||||
|
||||
@ -175,7 +175,7 @@ const exitFormData = ref({
|
||||
const formData = ref({
|
||||
personName: "",
|
||||
sex: 1,
|
||||
birthday: "",
|
||||
birthday: null,
|
||||
nation: "",
|
||||
registerAddress: "",
|
||||
idCard: "",
|
||||
@ -208,8 +208,8 @@ const formData = ref({
|
||||
maritalStatus: null,
|
||||
contacts: "",
|
||||
contactsTel: "",
|
||||
entryTime: "",
|
||||
trainingTime: "",
|
||||
entryTime: null,
|
||||
trainingTime: null,
|
||||
personEmail: ""
|
||||
});
|
||||
// 调动-弹窗中的配置
|
||||
@ -408,7 +408,7 @@ const handleAddItem = async (index: number, row: any) => {
|
||||
formData.value = reactive({
|
||||
personName: "",
|
||||
sex: 1,
|
||||
birthday: "",
|
||||
birthday: null,
|
||||
nation: "",
|
||||
registerAddress: "",
|
||||
idCard: "",
|
||||
@ -441,8 +441,8 @@ const handleAddItem = async (index: number, row: any) => {
|
||||
maritalStatus: null,
|
||||
contacts: "",
|
||||
contactsTel: "",
|
||||
entryTime: "",
|
||||
trainingTime: "",
|
||||
entryTime: null,
|
||||
trainingTime: null,
|
||||
personEmail: ""
|
||||
});
|
||||
} else {
|
||||
@ -527,8 +527,10 @@ const saveItem = async (form: any) => {
|
||||
};
|
||||
const res = await addMember(requestData);
|
||||
proTable.value.getTableList();
|
||||
ElMessage.success("添加成功");
|
||||
newMemberDialog.value = false;
|
||||
if (res.success) {
|
||||
ElMessage.success("添加成功");
|
||||
newMemberDialog.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
// 抽屉tab选择时
|
||||
|
||||
@ -295,15 +295,19 @@ const getDataList = async () => {
|
||||
} else if (activeValue.value == "project") {
|
||||
requestData.projectSn = searchSn.value;
|
||||
}
|
||||
const res = await bigItemAll(requestData);
|
||||
console.log(res);
|
||||
if (res) {
|
||||
const arr = dealArr(res.result);
|
||||
projects.value = arr;
|
||||
if (requestData.engineeringSn || requestData.projectSn) {
|
||||
const res = await bigItemAll(requestData);
|
||||
console.log(res);
|
||||
if (res) {
|
||||
const arr = dealArr(res.result);
|
||||
projects.value = arr;
|
||||
}
|
||||
setTimeout(function () {
|
||||
setGantts();
|
||||
}, 300);
|
||||
} else {
|
||||
projects.value = [];
|
||||
}
|
||||
setTimeout(function () {
|
||||
setGantts();
|
||||
}, 300);
|
||||
};
|
||||
const dealArr = arr => {
|
||||
arr.map(item => {
|
||||
|
||||
@ -298,11 +298,18 @@ const rules = reactive<FormRules>({
|
||||
message: "请输入",
|
||||
trigger: "blur"
|
||||
},
|
||||
completeRatio: {
|
||||
required: true,
|
||||
message: "请输入",
|
||||
trigger: "blur"
|
||||
},
|
||||
completeRatio: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入",
|
||||
trigger: "blur"
|
||||
},
|
||||
{
|
||||
pattern: /^[0-9\.]+$/,
|
||||
message: "请输入整数或小数",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
state: {
|
||||
required: true,
|
||||
message: "请选择",
|
||||
@ -407,15 +414,20 @@ const getDataList = async () => {
|
||||
requestData.projectSn = searchSn.value;
|
||||
}
|
||||
delete requestData.timeRange;
|
||||
const res = await bigItemList(requestData);
|
||||
if (res) {
|
||||
tableData.value = res.result.records;
|
||||
pageable.value = reactive({
|
||||
pageNo: +res.result.current,
|
||||
pageSize: +res.result.size,
|
||||
total: +res.result.total
|
||||
});
|
||||
if (requestData.engineeringSn || requestData.projectSn) {
|
||||
const res = await bigItemList(requestData);
|
||||
if (res) {
|
||||
tableData.value = res.result.records;
|
||||
pageable.value = reactive({
|
||||
pageNo: +res.result.current,
|
||||
pageSize: +res.result.size,
|
||||
total: +res.result.total
|
||||
});
|
||||
}
|
||||
} else {
|
||||
tableData.value = [];
|
||||
}
|
||||
|
||||
console.log(res);
|
||||
};
|
||||
const childrenConfirm = async (formEl: FormInstance | undefined, form: any) => {
|
||||
@ -434,8 +446,8 @@ const childrenConfirm = async (formEl: FormInstance | undefined, form: any) => {
|
||||
return;
|
||||
}
|
||||
}
|
||||
form.overdueIssueFile = JSON.stringify(form.overdueIssueFile);
|
||||
form.annexFile = JSON.stringify(form.annexFile);
|
||||
form.overdueIssueFile = form.overdueIssueFile ? JSON.stringify(form.overdueIssueFile) : "";
|
||||
form.annexFile = form.annexFile ? JSON.stringify(form.annexFile) : "";
|
||||
if (form.id) {
|
||||
if (newTitle.value == "编辑子项") {
|
||||
form.parentId = parentObj.value.parentId;
|
||||
|
||||
@ -283,17 +283,19 @@ const getVideoData = async () => {
|
||||
requestData.projectSn = searchSn.value;
|
||||
}
|
||||
delete requestData.createTime;
|
||||
const res = await videoList(requestData);
|
||||
if (res.result && res.result.records.length > 0) {
|
||||
res.result.records.map(item => {
|
||||
item.videoUrl = JSON.parse(item.videoUrl);
|
||||
});
|
||||
videoData.value.records = res.result.records;
|
||||
if (requestData.engineeringSn || requestData.projectSn) {
|
||||
const res = await videoList(requestData);
|
||||
if (res.result && res.result.records.length > 0) {
|
||||
res.result.records.map(item => {
|
||||
item.videoUrl = JSON.parse(item.videoUrl);
|
||||
});
|
||||
videoData.value.records = res.result.records;
|
||||
} else {
|
||||
videoData.value.records = [];
|
||||
}
|
||||
} else {
|
||||
videoData.value.records = [];
|
||||
}
|
||||
console.log(videoData.value);
|
||||
console.log(res);
|
||||
};
|
||||
const handleExceed: UploadProps["onExceed"] = files => {
|
||||
// console.log(1111);
|
||||
|
||||
@ -361,6 +361,7 @@ const getengineering = async () => {
|
||||
if (res.result && res.result.length > 0) {
|
||||
searchSn.value = res.result[0].engineeringSn;
|
||||
}
|
||||
proTable.value.getTableList();
|
||||
console.log(res);
|
||||
};
|
||||
// 点击抽屉的工程名称更新页面
|
||||
@ -370,6 +371,7 @@ const onUpdate = async row => {
|
||||
} else if (activeValue.value == "project") {
|
||||
searchSn.value = row.projectSn;
|
||||
}
|
||||
proTable.value.getTableList();
|
||||
ElMessage.success("页面已更新");
|
||||
};
|
||||
onMounted(async () => {
|
||||
|
||||
@ -296,6 +296,7 @@ const getengineering = async () => {
|
||||
if (res.result && res.result.length > 0) {
|
||||
searchSn.value = res.result[0].engineeringSn;
|
||||
}
|
||||
proTable.value.getTableList();
|
||||
console.log(res);
|
||||
};
|
||||
// 点击抽屉的工程名称更新页面
|
||||
@ -305,6 +306,7 @@ const onUpdate = async row => {
|
||||
} else if (activeValue.value == "project") {
|
||||
searchSn.value = row.projectSn;
|
||||
}
|
||||
proTable.value.getTableList();
|
||||
ElMessage.success("页面已更新");
|
||||
};
|
||||
onMounted(async () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user