尾部导航

This commit is contained in:
cxc
2022-11-17 17:29:47 +08:00
parent c2327f30cb
commit 7dc27a03ea
54 changed files with 956 additions and 433 deletions

View File

@ -9,13 +9,13 @@
>
<p><b>基本信息</b></p>
<el-row>
<!-- <el-row>
<el-col :span="24">
<el-form-item label="需求名称:" prop="title">
<el-input v-model="form.title"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-row> -->
<el-row>
<el-col :span="24">
@ -52,16 +52,17 @@
v-model="form.description"
width="100%"
min-height="150px"
@blur="formRef.validateField(`description`)"
></wangEditor>
</el-form-item>
</el-col>
</el-row>
<CityOptions
<!-- <CityOptions
v-model="form"
:labelWidth="labelWidth"
ref="cityFormRef"
/>
/> -->
<el-row>
<el-col :span="12">
@ -81,7 +82,7 @@
</el-form-item>
</el-col>
</el-row>
<!--
<el-row>
<el-col :span="12">
<el-form-item label="需求提交人:" prop="commitUserName">
@ -99,10 +100,10 @@
></el-input>
</el-form-item>
</el-col>
</el-row> -->
</el-row>
</el-form>
<div :style="{ marginLeft: labelWidth + 'px' }">
<el-button @click="$router.go(-1)">取消</el-button>
<el-button @click="backToList">取消</el-button>
<el-button type="primary" @click="submitForm">提交</el-button>
</div>
</el-card>
@ -110,14 +111,16 @@
</template>
<script setup>
// import { insertDemand } from "@/api/admin/enterprise";
import tab from "../../../../plugins/tab";
import {
insertDemand,
getDemand,
updateDemand,
} from "@/api/admin/enterprise/demand";
import CityOptions from "@/views/components/CityOptions";
// import CityOptions from "@/views/components/CityOptions";
import { ElMessage } from "element-plus";
import { onActivated } from "vue";
// import { onActivated } from "vue";
import { useRoute, useRouter } from "vue-router";
const router = useRouter();
@ -125,7 +128,7 @@ const route = useRoute();
const data = reactive({
form: {
check: [],
status: 0,
status: 1,
},
queryParams: {
pageNum: 1,
@ -188,6 +191,11 @@ const submitForm = () => {
}
});
};
// 返回服务需求列表
const backToList = () => {
tab.closeOpenPage({ path: "/demand/serviceDemand" });
};
// 添加需求类别时验证
function addCheck() {
if (!checkInput.value.trim().length) return ElMessage.error("请输入");
@ -219,6 +227,14 @@ onMounted(() => {
}
form.value = resp.data;
});
} else {
form.value = {
check: [],
status: 1,
};
if (formRef.value) {
formRef.value.resetFields();
}
}
});
</script>