|
@@ -278,7 +278,7 @@
|
|
|
v-for="(item, index) in taskOption"
|
|
|
:key="index"
|
|
|
:label="item.taskCode"
|
|
|
- :value="item.id"
|
|
|
+ :value="Number(item.id)"
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -354,6 +354,7 @@ import {
|
|
|
import Search from "@/components/Search/index.vue";
|
|
|
import { XBarSCompute, collectData } from "@/api/analysis";
|
|
|
import { useCrud } from "@/hooks/userCrud";
|
|
|
+import {ElMessage, ElMessageBox} from "element-plus";
|
|
|
|
|
|
const { Utils } = useCrud({
|
|
|
src: "/api/v1/spc/pDownloadTemplate",
|
|
@@ -635,7 +636,8 @@ const opOptions = ref([...dicts.spc_operation]);
|
|
|
//修改
|
|
|
const updataItem = (row) => {
|
|
|
editStatus.value = true;
|
|
|
- addData.value = row;
|
|
|
+ const data = JSON.parse(JSON.stringify(row));
|
|
|
+ addData.value = data;
|
|
|
addStatus.value = true;
|
|
|
emit("update:addStatus", addStatus.value);
|
|
|
emit("update:editStatus", editStatus.value);
|
|
@@ -679,13 +681,19 @@ const addSubmit = async () => {
|
|
|
});
|
|
|
};
|
|
|
const deleteSubmit = async (id) => {
|
|
|
- const { data, code } = await deleteData({
|
|
|
- id,
|
|
|
+ ElMessageBox.confirm("是否删除所选中数据?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(async () => {
|
|
|
+ const { data, code } = await deleteData({
|
|
|
+ id,
|
|
|
+ });
|
|
|
+ if (code == "200") {
|
|
|
+ ElMessage.success("删除成功!");
|
|
|
+ getTableData();
|
|
|
+ }
|
|
|
});
|
|
|
- if (code == "200") {
|
|
|
- ElMessage.success("删除成功!");
|
|
|
- getTableData();
|
|
|
- }
|
|
|
};
|
|
|
const updateSubmit = async () => {
|
|
|
addData.value.abnormal = null;
|
|
@@ -745,7 +753,7 @@ onMounted(async () => {
|
|
|
lableValue.value = item.dictValue;
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+ await getTaskOption();
|
|
|
await getTableData();
|
|
|
uploadUrl.value =
|
|
|
import.meta.env.VITE_APP_BASE_API +
|