|
|
@@ -130,12 +130,12 @@
|
|
|
<el-step title="第二步"></el-step>
|
|
|
<el-step title="第三步"></el-step>
|
|
|
</el-steps>
|
|
|
- <div v-if="active==0">
|
|
|
- <div v-if="active==0" style="margin-left: 1%;margin-top: 1%;display: flex;align-items: center;">
|
|
|
+ <div v-show="active==0">
|
|
|
+ <div style="margin-left: 1%;margin-top: 1%;display: flex;align-items: center;">
|
|
|
<div style="background-color: blue;width: 2px;height: 16px;"></div>
|
|
|
<div style="font-weight: bold;font-size: 16px;margin-left: 0.5%;">基本信息</div>
|
|
|
</div>
|
|
|
- <div v-if="active==0" style="margin-left: 1%;margin-top: 1%;">
|
|
|
+ <div style="margin-left: 1%;margin-top: 1%;">
|
|
|
<el-form :key="tableKey" style="margin-left: 5%;" :model="formJi" label-position="left" ref="formRefJi" class="demo-form-inline" :rules="rulesJi">
|
|
|
<el-row :gutter="40">
|
|
|
<el-col :span="9">
|
|
|
@@ -195,11 +195,11 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
- <div v-if="active==0" style="margin-left: 1%;margin-top: 1%;display: flex;align-items: center;">
|
|
|
+ <div style="margin-left: 1%;margin-top: 1%;display: flex;align-items: center;">
|
|
|
<div style="background-color: blue;width: 2px;height: 16px;"></div>
|
|
|
<div style="font-weight: bold;font-size: 16px;margin-left: 0.5%;">提供单位信息</div>
|
|
|
</div>
|
|
|
- <div v-if="active==0" style="margin-left: 1%;margin-top: 1%;">
|
|
|
+ <div style="margin-left: 1%;margin-top: 1%;">
|
|
|
<el-form style="margin-left: 5%;margin-top: 2%;" :disabled="isEdit" :model="formTi" ref="formRefTi" class="demo-form-inline" :rules="rulesTi">
|
|
|
<el-row :gutter="40">
|
|
|
<el-col :span="12">
|
|
|
@@ -275,8 +275,8 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="内存:" prop="name">
|
|
|
- <el-input v-model="formZu.region" style="width: 50%;" placeholder=""/>
|
|
|
+ <el-form-item label="内存:" prop="nei">
|
|
|
+ <el-input v-model="formZu.nei" style="width: 50%;" placeholder=""/>
|
|
|
<div style="margin-left: 2%;">
|
|
|
M
|
|
|
</div>
|
|
|
@@ -290,9 +290,9 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="平台:" prop="name">
|
|
|
+ <el-form-item label="平台:" prop="ping">
|
|
|
<el-select
|
|
|
- v-model="formZu.name"
|
|
|
+ v-model="formZu.ping"
|
|
|
style="width: 50%;"
|
|
|
>
|
|
|
<el-option
|
|
|
@@ -319,7 +319,7 @@
|
|
|
</el-form>
|
|
|
</div> -->
|
|
|
</div>
|
|
|
- <div v-if="active==2">
|
|
|
+ <div v-show="active==2">
|
|
|
<div style="margin-left: 1%;margin-top: 1%;display: flex;align-items: center;width: 98%;">
|
|
|
<div style="background-color: blue;width: 2px;height: 16px;"></div>
|
|
|
<div style="font-weight: bold;font-size: 16px;margin-left: 0.5%;">输入参数</div>
|
|
|
@@ -621,14 +621,11 @@ const formRefTi = ref();
|
|
|
const formZu = ref({
|
|
|
mirrorImageEurl:'',
|
|
|
mdCPU:'',
|
|
|
- mdContact:'',
|
|
|
-
|
|
|
+ mdGPU:''
|
|
|
});
|
|
|
const rulesZu = reactive({
|
|
|
- name: [{ required: true, message: '必填', trigger: 'blur' }],
|
|
|
mirrorImageEurl: [{ required: true, message: '必填', trigger: 'blur' }],
|
|
|
mdCPU: [{ required: true, message: '必填', trigger: 'blur' }],
|
|
|
- mdContact: [{ required: true, message: '必填', trigger: 'blur' }],
|
|
|
});
|
|
|
const formRefZu = ref();
|
|
|
|
|
|
@@ -738,11 +735,13 @@ async function showEdit(row){
|
|
|
formZu.value = updateSameProperties(formZu.value,res.data)
|
|
|
})
|
|
|
}
|
|
|
+function mergeObjects(...objects) {
|
|
|
+ return { ...objects.reduce((acc, obj) => ({ ...acc, ...obj }), {}) };
|
|
|
+}
|
|
|
function subEdit(){
|
|
|
const formTotal = { ...formJi.value,...formTi.value,...formZu.value,...parForm.value };
|
|
|
- var par = updateSameProperties(parForm.value,formJi.value)
|
|
|
- par = updateSameProperties(par,formTi.value)
|
|
|
- par = updateSameProperties(par,formZu.value)
|
|
|
+ const par = mergeObjects(parForm.value, formJi.value, formTi.value,formZu.value)
|
|
|
+ console.log(par)
|
|
|
updateModel(par).then(res=>{
|
|
|
if(res.code===200){
|
|
|
proxy.$modal.msgSuccess("修改成功");
|
|
|
@@ -752,6 +751,7 @@ function subEdit(){
|
|
|
}
|
|
|
async function submit(){
|
|
|
const formTotal = { ...formJi.value,...formTi.value,...formZu.value,};
|
|
|
+ // debugger
|
|
|
await addModel(formTotal).then(res=>{
|
|
|
upload.updateSupport = res.msg
|
|
|
})
|
|
|
@@ -762,6 +762,7 @@ async function submit(){
|
|
|
proxy.$modal.msgSuccess("保存成功");
|
|
|
dialogVisible.value = false
|
|
|
}
|
|
|
+ getModelList()
|
|
|
}
|
|
|
async function handleFileSuccess(response, file, fileList){
|
|
|
console.log(response)
|
|
|
@@ -780,7 +781,7 @@ async function handleFileSuccess(response, file, fileList){
|
|
|
dialogVisible.value = false
|
|
|
}
|
|
|
})
|
|
|
- getModelList()
|
|
|
+ getModelListTable()
|
|
|
};
|
|
|
function clearForm(){
|
|
|
formJi.value = {
|
|
|
@@ -791,26 +792,24 @@ function clearForm(){
|
|
|
intro:'',
|
|
|
type:''
|
|
|
}
|
|
|
- formTi.value = ref({
|
|
|
+ formTi.value = {
|
|
|
developer:'',
|
|
|
mdContact:'',
|
|
|
mdUnit:''
|
|
|
- });
|
|
|
- formTi.value = ref({
|
|
|
+ }
|
|
|
+ formZu.value = {
|
|
|
developer:'',
|
|
|
mdContact:'',
|
|
|
mdUnit:''
|
|
|
- });
|
|
|
+ }
|
|
|
active.value = 0
|
|
|
- // tableKey.value++
|
|
|
- // dialogVisible.value = false
|
|
|
}
|
|
|
function reg(){
|
|
|
isAdd.value = true
|
|
|
isEdit.value = false
|
|
|
dialogVisible.value = true
|
|
|
}
|
|
|
-function changePage(a){
|
|
|
+function changePage(a){
|
|
|
|
|
|
currentPage.value = a
|
|
|
getModelListTable()
|
|
|
@@ -841,6 +840,8 @@ const next = () => {
|
|
|
if(active.value==0){
|
|
|
formRefJi.value.validate((valid) => {
|
|
|
formRefTi.value.validate((valid1) => {
|
|
|
+ // console.log(formTi.value)
|
|
|
+ console.log(valid1)
|
|
|
if(active.value<2&&valid&&valid1){
|
|
|
active.value++
|
|
|
}
|