|
|
|
@ -290,7 +290,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup name="basetyre">
|
|
|
|
|
import {addPost, delPost, getPost, listPost, updatePost} from "@/api/basetyre/basetyre";
|
|
|
|
|
import {addBasetyre, delBasetyre, getBasetyre, listBasetyre, updateBasetyre} from "@/api/basetyre/basetyre";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const {proxy} = getCurrentInstance();
|
|
|
|
@ -355,7 +355,7 @@ const form = ref({});
|
|
|
|
|
/** 查询岗位列表 */
|
|
|
|
|
function getList() {
|
|
|
|
|
loading.value = true;
|
|
|
|
|
listPost(queryParams.value).then(response => {
|
|
|
|
|
listBasetyre(queryParams.value).then(response => {
|
|
|
|
|
postList.value = response.rows;
|
|
|
|
|
total.value = response.total;
|
|
|
|
|
loading.value = false;
|
|
|
|
@ -428,7 +428,7 @@ function handleAdd() {
|
|
|
|
|
function handleUpdate(row) {
|
|
|
|
|
reset();
|
|
|
|
|
const postId = row.postId || ids.value;
|
|
|
|
|
getPost(postId).then(response => {
|
|
|
|
|
getBasetyre(postId).then(response => {
|
|
|
|
|
form.value = response.data;
|
|
|
|
|
open.value = true;
|
|
|
|
|
title.value = "修改轮胎基础信息";
|
|
|
|
@ -440,13 +440,13 @@ function submitForm() {
|
|
|
|
|
proxy.$refs["postRef"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (form.value.postId != undefined) {
|
|
|
|
|
updatePost(form.value).then(response => {
|
|
|
|
|
updateBasetyre(form.value).then(response => {
|
|
|
|
|
proxy.$modal.msgSuccess("修改成功");
|
|
|
|
|
open.value = false;
|
|
|
|
|
getList();
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
addPost(form.value).then(response => {
|
|
|
|
|
addBasetyre(form.value).then(response => {
|
|
|
|
|
proxy.$modal.msgSuccess("新增成功");
|
|
|
|
|
open.value = false;
|
|
|
|
|
getList();
|
|
|
|
@ -460,7 +460,7 @@ function submitForm() {
|
|
|
|
|
function handleDelete(row) {
|
|
|
|
|
const postIds = row.postId || ids.value;
|
|
|
|
|
proxy.$modal.confirm('是否确认删除岗位编号为"' + postIds + '"的数据项?').then(function () {
|
|
|
|
|
return delPost(postIds);
|
|
|
|
|
return delBasetyre(postIds);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
getList();
|
|
|
|
|
proxy.$modal.msgSuccess("删除成功");
|
|
|
|
|