fixed
This commit is contained in:
@ -81,7 +81,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!--
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="需求提交人:" prop="commitUserName">
|
||||
@ -99,7 +99,7 @@
|
||||
></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>
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<!-- <el-checkbox label="0" @change="handleCheck">其他</el-checkbox> -->
|
||||
<el-form-item label="需求类别:">
|
||||
<el-checkbox-group v-model="form.kinds">
|
||||
<el-checkbox
|
||||
@ -27,7 +28,6 @@
|
||||
:label="item.name"
|
||||
>{{ item.name }}</el-checkbox
|
||||
>
|
||||
<!-- <el-checkbox label="0" @change="handleCheck">其他</el-checkbox> -->
|
||||
</el-checkbox-group>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="20">
|
||||
@ -129,7 +129,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<!-- <el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="需求提交人:" prop="commitUserName">
|
||||
<el-input
|
||||
@ -146,7 +146,7 @@
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
@ -170,13 +170,19 @@
|
||||
</template>
|
||||
<script setup>
|
||||
// import { expert } from "@/api/identity/index";
|
||||
import { insertTechnologyDemand } from "@/api/admin/enterprise";
|
||||
// import { insertTechnologyDemand } from "@/api/admin/enterprise";
|
||||
import CityOptions from "@/views/components/CityOptions";
|
||||
import FieldOptions from "@/views/components/FieldOptions";
|
||||
import InputBoxAdd from "@/views/components/InputBoxAdd";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import {
|
||||
getTechnologyDemand,
|
||||
updateTechnologyDemand,
|
||||
insertTechnologyDemand,
|
||||
} from "@/api/admin/enterprise/demand";
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const data = reactive({
|
||||
form: {
|
||||
check: [],
|
||||
@ -241,7 +247,6 @@ const fieldFormRef = ref(null);
|
||||
const directionsFormRef = ref(null);
|
||||
const checkInput = ref("");
|
||||
const submitForm = async () => {
|
||||
// await formRef.value.validate();
|
||||
let formValid;
|
||||
try {
|
||||
formValid = await formRef.value.validate();
|
||||
@ -251,8 +256,13 @@ const submitForm = async () => {
|
||||
const fieldFormValid = await fieldFormRef.value.validateForm();
|
||||
const directionsFormValid = await directionsFormRef.value.validateForm();
|
||||
if (formValid && fieldFormValid && directionsFormValid) {
|
||||
await insertTechnologyDemand(form.value);
|
||||
ElMessage.success("新增企业需求成功");
|
||||
if (route.query.id) {
|
||||
await updateTechnologyDemand(form.value);
|
||||
ElMessage.success("修改企业需求成功");
|
||||
} else {
|
||||
await insertTechnologyDemand(form.value);
|
||||
ElMessage.success("新增企业需求成功");
|
||||
}
|
||||
router.go(-1);
|
||||
} else {
|
||||
console.log("校验未通过");
|
||||
@ -293,4 +303,16 @@ function addCheck() {
|
||||
checkInput.value = "";
|
||||
}
|
||||
}
|
||||
|
||||
if (route.query.id) {
|
||||
getTechnologyDemand({ id: route.query.id }).then((resp) => {
|
||||
form.value = resp.data;
|
||||
if (!form.value.kinds) {
|
||||
form.value.kinds = resp.data.kind?.split(",") ?? [];
|
||||
}
|
||||
if (!form.value.wants) {
|
||||
form.value.wants = resp.data.want?.split(",") ?? [];
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
@ -25,7 +25,7 @@
|
||||
<el-table v-loading="loading" :data="dataList" style="margin-top: 20px">
|
||||
<el-table-column label="需求名称" align="center" prop="title" />
|
||||
<el-table-column label="需求类别" align="center" prop="kind" />
|
||||
<el-table-column label="状态" align="center" prop="status" />
|
||||
<!-- <el-table-column label="状态" align="center" prop="status" /> -->
|
||||
<el-table-column label="联系人" align="center" prop="name" />
|
||||
<el-table-column label="手机号" align="center" prop="mobile" />
|
||||
<el-table-column
|
||||
@ -163,7 +163,7 @@ function handleDelete(id) {
|
||||
.catch(() => {});
|
||||
}
|
||||
function handleEdit(id) {
|
||||
router.push({ path: "./release", query: { id } });
|
||||
router.push({ path: "./releaseService", query: { id } });
|
||||
}
|
||||
getList();
|
||||
onActivated(() => {
|
||||
|
@ -53,7 +53,7 @@
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<router-link
|
||||
:to="{ path: './released', query: { id: row.id } }"
|
||||
:to="{ path: './releaseTechnology', query: { id: row.id } }"
|
||||
v-if="queryParams.status == 0"
|
||||
>
|
||||
<el-button size="small" type="text" icon="Edit">编辑</el-button>
|
||||
@ -64,7 +64,7 @@
|
||||
size="small"
|
||||
type="text"
|
||||
icon="Delete"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
@click="handleDelete(row.id)"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button
|
||||
@ -72,7 +72,7 @@
|
||||
size="small"
|
||||
type="text"
|
||||
icon="View"
|
||||
@click="handleResults(scope.row.id)"
|
||||
@click="handleResults(row.id)"
|
||||
>查看匹配结果</el-button
|
||||
>
|
||||
<el-button
|
||||
@ -97,7 +97,10 @@
|
||||
</template>
|
||||
|
||||
<script setup name="technologyDemand">
|
||||
import { technologyDemandList } from "@/api/admin/enterprise";
|
||||
import {
|
||||
technologyDemandList,
|
||||
deleteTechnologyDemand,
|
||||
} from "@/api/admin/enterprise/demand";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
@ -167,13 +170,16 @@ function handleQuery() {
|
||||
function handleDelete(id) {
|
||||
ElMessageBox.confirm('是否确认删除数据编号为"' + id + '"的需求项?')
|
||||
.then(function () {
|
||||
return achievementDelete({ id });
|
||||
console.log("delete");
|
||||
return deleteTechnologyDemand(id);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
ElMessage.success("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
function handleShelf(row) {
|
||||
let text = row.shelf_status == 2 ? "上架" : "下架";
|
||||
|
Reference in New Issue
Block a user