charles
2024-05-06 bad4f431d9287c31da042ada125910e9b3e8c3b8
fix:修复uibug
5个文件已修改
78 ■■■■ 已修改文件
src/main.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/home/components/audioAnalysis/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/home/components/textManager/index.vue 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js
@@ -9,4 +9,4 @@
  router,
  store,
  render: h => h(App)
}).$mount('#app')
}).$mount('#app');
src/router/index.js
@@ -24,8 +24,9 @@
        ]
    }
];
const mode = process.env.NODE_ENV==='testing'||'production'?'hash':'history';
const router = new VueRouter({
  mode: 'hash',
  mode,
  routes
});
export default router
src/views/home/components/audioAnalysis/index.vue
@@ -122,7 +122,7 @@
                        <div class="status">异常</div>
                    </div>
                    <div style="text-align: right;margin-right: 10px">
                        <el-rate max="1"></el-rate>
                        <el-rate :max="1"></el-rate>
                    </div>
                    <div class="tag">
                        <div>火车到站</div>
src/views/home/components/textManager/index.vue
@@ -1,14 +1,43 @@
<template>
    <div>
        <div class="search">
            <el-form :inline="true" class="demo-form-inline">
                <el-form-item label="文字内容/车号:">
                    <el-input v-model="keyword" size="small" placeholder="请输入"></el-input>
        <!--添加的模态框-->
        <el-dialog
                title="添加"
                :visible.sync="addModal"
                width="40%"
                :close-on-click-modal="false"
                @close="addModal=false"
                :destroy-on-close="true"
                >
            <el-form  ref="textForm" class="demo-form-inline" label-width="120px" :model="textObj" :rules="textRules">
                <el-form-item label="文字内容:" prop="textContent">
                    <el-input v-model="textObj.textContent" placeholder="请输入文字内容"/>
                </el-form-item>
                <el-form-item>
                    <el-button  @click="searchCar" size="mini" type="primary" style="border:none;background-color: rgba(24, 144, 255, 1)">查询</el-button>
                <el-form-item label="车号:">
                    <el-input v-model="textObj.carNo" placeholder="请输入车号"/>
                </el-form-item>
            </el-form>
            <span slot="footer" class="dialog-footer">
                <el-button @click="addModal = false">取 消</el-button>
                <el-button type="primary" @click="addText">确 定</el-button>
            </span>
        </el-dialog>
        <div class="search">
            <el-row type="flex" justify="center">
                <el-col :span="18">
                    <el-form :inline="true" class="demo-form-inline">
                        <el-form-item label="文字内容/车号:">
                            <el-input v-model="keyword" size="small" placeholder="请输入"></el-input>
                        </el-form-item>
                        <el-form-item>
                            <el-button  @click="searchCar" size="mini" type="primary" style="border:none;background-color: rgba(24, 144, 255, 1)">查询</el-button>
                        </el-form-item>
                    </el-form>
                </el-col>
                <el-col :span="6" style="text-align: right">
                    <el-button  size="mini" @click="addModal=true" type="primary" style="border:none;background-color: rgba(24, 144, 255, 1)">添加</el-button>
                </el-col>
            </el-row>
        </div>
        <div>
            <el-table :data="pageInfo.textList" >
@@ -40,7 +69,14 @@
        name: "textManager",
        data(){
            return{
                textRules:{
                    textContent: [
                        { required: true, message: '内容不能为空', trigger: 'blur' },
                    ],
                },
                addModal:false,
                keyword:'',
                textObj:{textContent:'',carNo:''},
                pageInfo:{
                  total:100,
                  textList:[]
@@ -74,6 +110,13 @@
            },
            handleCurrentChange(page){
                this.pageData.page=page;
            },
            addText(){
                this.$refs.textForm.validate((valid) => {
                    if(valid){
                    }
                })
            }
        },
        mounted(){
vue.config.js
@@ -1,9 +1,7 @@
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
const { defineConfig } = require('@vue/cli-service');
const buildConfig ={outputDir:"dist", publicPath:"./", assetsDir:"static"};
const config={
    transpileDependencies: true,
    outputDir:"dist",
    publicPath:"./",
    assetsDir:"static",
    devServer:{
        host:"localhost",
        open:true,
@@ -20,9 +18,13 @@
                target: process.env.VUE_APP_BASE_URL,
                changeOrigin: true,
                pathRewrite: {
                   ['^'+process.env.VUE_APP_BASE_API]: ''
                    ['^'+process.env.VUE_APP_BASE_API]: ''
                }
            }
        }
    }
});
};
if(process.env.NODE_ENV==='testing'||'production'){
    Object.assign(config,buildConfig);
}
module.exports = defineConfig(config);