需求省市区
This commit is contained in:
@ -17,6 +17,7 @@
|
||||
<el-radio-button :label="1">已发布</el-radio-button>
|
||||
<el-radio-button :label="2">已驳回</el-radio-button>
|
||||
<el-radio-button :label="3">草稿箱</el-radio-button>
|
||||
<el-radio-button :label="4">已结束</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList" style="margin-top: 20px">
|
||||
@ -80,8 +81,16 @@
|
||||
size="small"
|
||||
type="text"
|
||||
icon="Close"
|
||||
@click="cancelPub(row.id)"
|
||||
>取消发布</el-button
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="text"
|
||||
icon="View"
|
||||
@click="complete(row.id)"
|
||||
>完成</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -100,6 +109,7 @@
|
||||
import {
|
||||
technologyDemandList,
|
||||
deleteTechnologyDemand,
|
||||
updateTechnologyDemand,
|
||||
} from "@/api/admin/enterprise/demand";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
@ -202,5 +212,25 @@ function handleResults(row) {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// 修改为完成状态
|
||||
const complete = (id) => {
|
||||
ElMessageBox.confirm(`是否确认结束编号为${id}的数据项?`)
|
||||
.then(async () => {
|
||||
await updateTechnologyDemand({ id, status: 4 });
|
||||
getList();
|
||||
ElMessage.success("结束成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
const cancelPub = (id) => {
|
||||
ElMessageBox.confirm(`是否确认取消发布编号为${id}的数据项?`)
|
||||
.then(async () => {
|
||||
await updateTechnologyDemand({ id, status: 3 });
|
||||
getList();
|
||||
ElMessage.success("取消发布成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
getList();
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user