|
|
@ -375,7 +375,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup name="basetyre">
|
|
|
|
<script setup name="basetyre">
|
|
|
|
import {addBaseCar, delBaseCar, getBaseCar, listBaseCar, updateBaseCar} from "@/api/basecar/cartype";
|
|
|
|
import {addCartype, delCartype, getCartype, listCartype, updateCartype} from "@/api/basecar/cartype";
|
|
|
|
|
|
|
|
|
|
|
|
import {useI18n} from 'vue-i18n';
|
|
|
|
import {useI18n} from 'vue-i18n';
|
|
|
|
import Cookies from "js-cookie";
|
|
|
|
import Cookies from "js-cookie";
|
|
|
@ -462,7 +462,7 @@ const form = ref({
|
|
|
|
/** 查询岗位列表 */
|
|
|
|
/** 查询岗位列表 */
|
|
|
|
function getList() {
|
|
|
|
function getList() {
|
|
|
|
loading.value = true;
|
|
|
|
loading.value = true;
|
|
|
|
listBaseCar(queryParams.value).then(response => {
|
|
|
|
listCartype(queryParams.value).then(response => {
|
|
|
|
postList.value = response.rows;
|
|
|
|
postList.value = response.rows;
|
|
|
|
total.value = response.total;
|
|
|
|
total.value = response.total;
|
|
|
|
loading.value = false;
|
|
|
|
loading.value = false;
|
|
|
@ -530,7 +530,7 @@ function handleAdd() {
|
|
|
|
function handleUpdate(row) {
|
|
|
|
function handleUpdate(row) {
|
|
|
|
reset();
|
|
|
|
reset();
|
|
|
|
const postId = row.postId || ids.value;
|
|
|
|
const postId = row.postId || ids.value;
|
|
|
|
getBaseCar(postId).then(response => {
|
|
|
|
getCartype(postId).then(response => {
|
|
|
|
form.value = response.data;
|
|
|
|
form.value = response.data;
|
|
|
|
open.value = true;
|
|
|
|
open.value = true;
|
|
|
|
title.value = t('baseCar.carType.editTitle');
|
|
|
|
title.value = t('baseCar.carType.editTitle');
|
|
|
@ -542,13 +542,13 @@ function submitForm() {
|
|
|
|
proxy.$refs["postRef"].validate(valid => {
|
|
|
|
proxy.$refs["postRef"].validate(valid => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
if (form.value.postId != undefined) {
|
|
|
|
if (form.value.postId != undefined) {
|
|
|
|
updateBaseCar(form.value).then(response => {
|
|
|
|
updateCartype(form.value).then(response => {
|
|
|
|
proxy.$modal.msgSuccess("修改成功");
|
|
|
|
proxy.$modal.msgSuccess("修改成功");
|
|
|
|
open.value = false;
|
|
|
|
open.value = false;
|
|
|
|
getList();
|
|
|
|
getList();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
addBaseCar(form.value).then(response => {
|
|
|
|
addCartype(form.value).then(response => {
|
|
|
|
proxy.$modal.msgSuccess("新增成功");
|
|
|
|
proxy.$modal.msgSuccess("新增成功");
|
|
|
|
open.value = false;
|
|
|
|
open.value = false;
|
|
|
|
getList();
|
|
|
|
getList();
|
|
|
@ -562,7 +562,7 @@ function submitForm() {
|
|
|
|
function handleDelete(row) {
|
|
|
|
function handleDelete(row) {
|
|
|
|
const postIds = row.postId || ids.value;
|
|
|
|
const postIds = row.postId || ids.value;
|
|
|
|
proxy.$modal.confirm('是否确认删除岗位编号为"' + postIds + '"的数据项?').then(function () {
|
|
|
|
proxy.$modal.confirm('是否确认删除岗位编号为"' + postIds + '"的数据项?').then(function () {
|
|
|
|
return delBaseCar(postIds);
|
|
|
|
return delCartype(postIds);
|
|
|
|
}).then(() => {
|
|
|
|
}).then(() => {
|
|
|
|
getList();
|
|
|
|
getList();
|
|
|
|
proxy.$modal.msgSuccess("删除成功");
|
|
|
|
proxy.$modal.msgSuccess("删除成功");
|
|
|
|