|
@@ -84,39 +84,13 @@ const selectConfig = computed(() => {
|
|
|
return [
|
|
|
{
|
|
|
label: "车间",
|
|
|
- prop: "flowStatus",
|
|
|
- data: [
|
|
|
- {
|
|
|
- label: "审核中",
|
|
|
- value: "1",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "审核通过",
|
|
|
- value: "2",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "审核不通过",
|
|
|
- value: "3",
|
|
|
- },
|
|
|
- ],
|
|
|
+ prop: "workshopId",
|
|
|
+ data: [],
|
|
|
},
|
|
|
{
|
|
|
label: "产线类型",
|
|
|
- prop: "flowStatus",
|
|
|
- data: [
|
|
|
- {
|
|
|
- label: "审核中",
|
|
|
- value: "1",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "审核通过",
|
|
|
- value: "2",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "审核不通过",
|
|
|
- value: "3",
|
|
|
- },
|
|
|
- ],
|
|
|
+ prop: "type",
|
|
|
+ data: [],
|
|
|
},
|
|
|
];
|
|
|
});
|
|
@@ -125,7 +99,7 @@ const config = computed(() => {
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "车间名称",
|
|
|
- prop: "type",
|
|
|
+ prop: "workshopId",
|
|
|
width: 120,
|
|
|
render(type) {
|
|
|
return "华为";
|
|
@@ -135,28 +109,28 @@ const config = computed(() => {
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "产线类型",
|
|
|
- prop: "name",
|
|
|
+ prop: "type",
|
|
|
width: 150,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "产线名称",
|
|
|
- prop: "endPoint",
|
|
|
+ prop: "name",
|
|
|
width: 100,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "负责人",
|
|
|
- prop: "endPoint",
|
|
|
+ prop: "personLiableId",
|
|
|
width: 100,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "产线说明",
|
|
|
- prop: "accessKeyId",
|
|
|
+ prop: "remarks",
|
|
|
},
|
|
|
},
|
|
|
|
|
@@ -200,7 +174,7 @@ const config = computed(() => {
|
|
|
).then(() => {
|
|
|
// 删除
|
|
|
proxy
|
|
|
- .post("/tdaConfig/delete", {
|
|
|
+ .post("/assemblyLine/delete", {
|
|
|
id: row.id,
|
|
|
})
|
|
|
.then((res) => {
|
|
@@ -221,9 +195,8 @@ const config = computed(() => {
|
|
|
|
|
|
let formData = reactive({
|
|
|
data: {
|
|
|
- type: "1",
|
|
|
+ type: "",
|
|
|
},
|
|
|
- treeData: [],
|
|
|
});
|
|
|
const formOption = reactive({
|
|
|
inline: true,
|
|
@@ -237,33 +210,33 @@ const formConfig = computed(() => {
|
|
|
return [
|
|
|
{
|
|
|
type: "select",
|
|
|
- prop: "name",
|
|
|
+ prop: "workshopId",
|
|
|
label: "车间名称",
|
|
|
required: true,
|
|
|
data: [],
|
|
|
},
|
|
|
{
|
|
|
type: "select",
|
|
|
- prop: "name",
|
|
|
+ prop: "type",
|
|
|
label: "产线类型",
|
|
|
required: true,
|
|
|
data: [],
|
|
|
},
|
|
|
{
|
|
|
type: "input",
|
|
|
- prop: "aa",
|
|
|
+ prop: "name",
|
|
|
label: "产线名称",
|
|
|
required: true,
|
|
|
},
|
|
|
{
|
|
|
type: "select",
|
|
|
- prop: "name",
|
|
|
+ prop: "personLiableId",
|
|
|
label: "负责人",
|
|
|
data: [],
|
|
|
},
|
|
|
{
|
|
|
type: "input",
|
|
|
- prop: "secretAccessKey",
|
|
|
+ prop: "remarks",
|
|
|
label: "产线说明",
|
|
|
itemType: "textarea",
|
|
|
},
|
|
@@ -272,53 +245,52 @@ const formConfig = computed(() => {
|
|
|
const getList = async (req) => {
|
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
loading.value = true;
|
|
|
- proxy.post("/tdaConfig/page", sourceList.value.pagination).then((message) => {
|
|
|
- console.log(message);
|
|
|
- sourceList.value.data = message.rows;
|
|
|
- sourceList.value.pagination.total = message.total;
|
|
|
- setTimeout(() => {
|
|
|
- loading.value = false;
|
|
|
- }, 200);
|
|
|
- });
|
|
|
+ proxy
|
|
|
+ .post("/assemblyLine/page", sourceList.value.pagination)
|
|
|
+ .then((message) => {
|
|
|
+ console.log(message);
|
|
|
+ sourceList.value.data = message.rows;
|
|
|
+ sourceList.value.pagination.total = message.total;
|
|
|
+ setTimeout(() => {
|
|
|
+ loading.value = false;
|
|
|
+ }, 200);
|
|
|
+ });
|
|
|
};
|
|
|
const openModal = () => {
|
|
|
dialogVisible.value = true;
|
|
|
modalType.value = "add";
|
|
|
formData.data = {};
|
|
|
};
|
|
|
-const selection = ref({
|
|
|
- data: [],
|
|
|
-});
|
|
|
-const select = (_selection, row) => {
|
|
|
- selection.value.data = _selection;
|
|
|
- console.log(_selection.length);
|
|
|
-};
|
|
|
+
|
|
|
const submitForm = () => {
|
|
|
console.log(byform.value);
|
|
|
byform.value.handleSubmit((valid) => {
|
|
|
submitLoading.value = true;
|
|
|
- proxy.post("/tdaConfig/" + modalType.value, formData.data).then((res) => {
|
|
|
- ElMessage({
|
|
|
- message: modalType.value == "add" ? "添加成功" : "编辑成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- dialogVisible.value = false;
|
|
|
- submitLoading.value = false;
|
|
|
- getList();
|
|
|
- });
|
|
|
+ proxy.post("/assemblyLine/" + modalType.value, formData.data).then(
|
|
|
+ (res) => {
|
|
|
+ ElMessage({
|
|
|
+ message: modalType.value == "add" ? "添加成功" : "编辑成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ dialogVisible.value = false;
|
|
|
+ submitLoading.value = false;
|
|
|
+ getList();
|
|
|
+ },
|
|
|
+ (err) => (submitLoading.value = false)
|
|
|
+ );
|
|
|
});
|
|
|
};
|
|
|
|
|
|
const getDtl = (row) => {
|
|
|
modalType = "edit";
|
|
|
- proxy.post("/tdaConfig/detail", { id: row.id }).then((res) => {
|
|
|
+ proxy.post("/assemblyLine/detail", { id: row.id }).then((res) => {
|
|
|
formData.data = res;
|
|
|
console.log(formData);
|
|
|
dialogVisible.value = true;
|
|
|
});
|
|
|
};
|
|
|
|
|
|
-// getList();
|
|
|
+getList();
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|