修改车辆基础信息界面

master
夜笙歌 2 years ago
parent 06353b131e
commit 0048f21a9f

@ -1,7 +1,7 @@
import request from '@/utils/request' import request from '@/utils/request'
// 查询轮胎基础信息列表 // 查询轮胎基础信息列表
export function listBaseCar(query) { export function listCartype(query) {
return request({ return request({
url: '/cartype/cartype/list', url: '/cartype/cartype/list',
method: 'get', method: 'get',
@ -10,7 +10,7 @@ export function listBaseCar(query) {
} }
// 查询轮胎基础信息详细 // 查询轮胎基础信息详细
export function getBaseCar(id) { export function getCartype(id) {
return request({ return request({
url: '/basetyre/basetyre/' + id, url: '/basetyre/basetyre/' + id,
method: 'get' method: 'get'
@ -18,7 +18,7 @@ export function getBaseCar(id) {
} }
// 新增轮胎基础信息 // 新增轮胎基础信息
export function addBaseCar(data) { export function addCartype(data) {
return request({ return request({
url: '/basetyre/basetyre', url: '/basetyre/basetyre',
method: 'post', method: 'post',
@ -27,7 +27,7 @@ export function addBaseCar(data) {
} }
// 修改轮胎基础信息 // 修改轮胎基础信息
export function updateBaseCar(data) { export function updateCartype(data) {
return request({ return request({
url: '/basetyre/basetyre', url: '/basetyre/basetyre',
method: 'put', method: 'put',
@ -36,7 +36,7 @@ export function updateBaseCar(data) {
} }
// 删除轮胎基础信息 // 删除轮胎基础信息
export function delBaseCar(id) { export function delCartype(id) {
return request({ return request({
url: '/basetyre/basetyre/' + id, url: '/basetyre/basetyre/' + id,
method: 'delete' method: 'delete'

@ -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("删除成功");

@ -1,58 +1,59 @@
import { defineConfig, loadEnv } from 'vite' import {defineConfig, loadEnv} from 'vite'
import path from 'path' import path from 'path'
import createVitePlugins from './vite/plugins' import createVitePlugins from './vite/plugins'
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig(({ mode, command }) => { export default defineConfig(({mode, command}) => {
const env = loadEnv(mode, process.cwd()) const env = loadEnv(mode, process.cwd())
const { VITE_APP_ENV } = env const {VITE_APP_ENV} = env
return { return {
// 部署生产环境和开发环境下的URL。 // 部署生产环境和开发环境下的URL。
// 默认情况下vite 会假设你的应用是被部署在一个域名的根路径上 // 默认情况下vite 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
base: VITE_APP_ENV === 'production' ? '/' : '/', base: VITE_APP_ENV === 'production' ? '/' : '/',
plugins: createVitePlugins(env, command === 'build'), plugins: createVitePlugins(env, command === 'build'),
resolve: { resolve: {
// https://cn.vitejs.dev/config/#resolve-alias // https://cn.vitejs.dev/config/#resolve-alias
alias: { alias: {
// 设置路径 // 设置路径
'~': path.resolve(__dirname, './'), '~': path.resolve(__dirname, './'),
// 设置别名 // 设置别名
'@': path.resolve(__dirname, './src') '@': path.resolve(__dirname, './src')
}, },
// https://cn.vitejs.dev/config/#resolve-extensions // https://cn.vitejs.dev/config/#resolve-extensions
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'] extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
}, },
// vite 相关配置 // vite 相关配置
server: { server: {
port: 80, port: 80,
host: true, host: true,
open: true, open: true,
proxy: { proxy: {
// https://cn.vitejs.dev/config/#server-proxy // https://cn.vitejs.dev/config/#server-proxy
'/dev-api': { '/dev-api': {
target: 'http://localhost:8080', target: 'http://10.11.41.249:8080',
changeOrigin: true, // target: 'http://localhost:8080',
rewrite: (p) => p.replace(/^\/dev-api/, '') changeOrigin: true,
} rewrite: (p) => p.replace(/^\/dev-api/, '')
}
},
//fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file
css: {
postcss: {
plugins: [
{
postcssPlugin: 'internal:charset-removal',
AtRule: {
charset: (atRule) => {
if (atRule.name === 'charset') {
atRule.remove();
} }
}
} }
} },
] //fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file
} css: {
postcss: {
plugins: [
{
postcssPlugin: 'internal:charset-removal',
AtRule: {
charset: (atRule) => {
if (atRule.name === 'charset') {
atRule.remove();
}
}
}
}
]
}
}
} }
}
}) })

Loading…
Cancel
Save