add 项目搭建

This commit is contained in:
zhoujj
2025-11-21 13:45:03 +08:00
parent 97195d0588
commit 0f979310d7
1926 changed files with 183294 additions and 498 deletions

View File

@@ -2,6 +2,6 @@ ENV = 'production'
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇Nginx 配置
# 接口地址,注意协议,如果你没有配置 ssl需要将 https 改为 http
VUE_APP_BASE_API = 'http://10.93.41.201:8011'
VUE_APP_BASE_API = 'http://10.62.3.156:8011'
# 如果接口是 http 形式, wss 需要改为 ws
VUE_APP_WS_API = 'ws://10.93.41.201:8010'
VUE_APP_WS_API = 'ws://10.62.3.156:8011'

View File

@@ -31,6 +31,16 @@
>
导入
</el-button>
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-position"
size="mini"
@click="materialSync()"
>
同步
</el-button>
</crudOperation>
<!--表单组件-->
<el-dialog

View File

@@ -275,7 +275,7 @@
<el-table-column label="是否启用" align="center" prop="is_used">
<template slot-scope="scope">
<el-switch
:value="format_is_used(scope.row.is_used)"
:value="scope.row.is_used"
active-color="#409EFF"
inactive-color="#F56C6C"
@change="changeEnabled(scope.row, scope.row.is_used)"
@@ -502,26 +502,32 @@ export default {
},
// 改变状态
format_is_used(is_used) {
return is_used === '1'
return Boolean(is_used);
},
changeEnabled(data, val) {
let msg = '此操作将停用,是否继续!'
if (val !== '1') {
msg = '此操作将启用,是否继续!'
let msg = '此操作将停用,是否继续!';
if (!val) {
msg = '此操作将启用,是否继续!';
}
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// 更新 data.is_used 的值
data.is_used = !val;
// 调用后端 API 更新数据
crudStructattr.changeActive(data).then(res => {
this.crud.toQuery()
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery();
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS);
}).catch(() => {
data.is_used = !data.is_used
})
// 如果更新失败,恢复原来的值
data.is_used = val;
});
}).catch(() => {
})
// 用户取消操作
});
}
}
}

View File

@@ -281,10 +281,21 @@
<el-table-column prop="point_name" label="点位名称" :min-width="flexWidth('point_name',crud.data,'点位名称')" />
<el-table-column prop="region_code" label="区域编码" :min-width="flexWidth('region_code',crud.data,'区域编码')" />
<el-table-column prop="region_name" label="区域名称" :min-width="flexWidth('region_name',crud.data,'区域名称')" />
<el-table-column prop="point_type_name" label="点位类型" :min-width="flexWidth('point_type_name',crud.data,'点位类型')"/>
<el-table-column prop="point_status_name" label="点位状态" :min-width="flexWidth('point_status_name',crud.data,'点位类型')"/>
<!-- <el-table-column prop="point_type" label="点位类型" :min-width="flexWidth('point_type',crud.data,'点位类型')" />-->
<!-- <el-table-column prop="point_status" label="点位状态" :min-width="flexWidth('point_status',crud.data,'点位状态')" />-->
<el-table-column prop="point_type" label="点位类型" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ dict.label.point_type[scope.row.point_type] }}
</template>
</el-table-column>
<el-table-column prop="point_status" label="点位状态" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ dict.label.point_status[scope.row.point_status] }}
</template>
</el-table-column>
<!-- <el-table-column prop="point_type" label="点位名称" min-width="120" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ dict.label.point_type[scope.row.point_type] }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型', 30)">
<template slot-scope="scope">
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
@@ -395,7 +406,7 @@ const defaultForm = {
}
export default {
name: 'Point',
dicts: ['vehicle_type', 'TrueOrFalse'],
dicts: ['vehicle_type', 'TrueOrFalse', 'point_type', 'point_status'],
components: { PointDialog, ViewDialog, pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {

View File

@@ -68,7 +68,7 @@
</el-form>
</el-card>
<div class="crud-opts2">
<span class="role-span">盘点明细</span>
<span class="role-span">盘点明细12</span>
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
@@ -78,7 +78,7 @@
<!--表格渲染-->
<el-table
ref="table"
:data="form1.tableData"
:data="this.form1.tableData"
style="width: 100%;"
max-height="300"
border
@@ -179,6 +179,7 @@ export default {
})
check.getDtl({ 'check_id': this.form1.check_id }).then(res => {
this.form1.tableData = res
debugger;
// 将明细变成不可编辑
for (let i = 0; i < this.form1.tableData.length; i++) {
const row = this.form1.tableData[i]