bug修复

This commit is contained in:
BianLzhaoMin 2025-06-19 15:10:30 +08:00
parent ab6c20aa6f
commit 76e162abd4
9 changed files with 71 additions and 32 deletions

View File

@ -74,9 +74,18 @@ export function getDictTableOption(data = {}) {
}
// 监理单位-下拉
// export function selectSupervisionUnit(data = {}) {
// return request({
// url: '/system/select/selectSupervisionUnit',
// method: 'post',
// data
// })
// }
// 2025-3-4 更换接口 原接口无数据 已同步与web端一致
export function selectSupervisionUnit(data = {}) {
return request({
url: '/system/select/selectSupervisionUnit',
url: '/system/select/selectSupervisionUnitUser',
method: 'post',
data
})
@ -516,7 +525,7 @@ export function checkIsExistProName(data) {
export function getQxToken() {
return request({
url: '/schedule/job/getQxToken',
method: 'get',
method: 'get'
})
}

View File

@ -1,17 +1,18 @@
// 应用全局配置
module.exports = {
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
baseUrl: 'http://218.21.27.6:1999/nxdt-api', // 正式环境
// baseUrl: 'http://192.168.0.14:21626/prod-api', // 测试环境
// baseUrl: 'http://218.21.27.6:1999/prod-api', // 正式环境
baseUrl: 'http://192.168.0.14:21626/nxdt-api', // 测试环境
// baseUrl: 'http://192.168.0.60:18080', // 赵福海
// baseUrl: 'http://192.168.0.58:19090', // 杰
// baseUrl: 'http://192.168.0.176:18080', // 强
// baseUrl: 'http://192.168.0.38:18080', // 强
// fileUrl: 'http://192.168.0.14:21626/file/statics/', // 测试环境
// fileUrl2: 'http://192.168.0.14:21626/file/statics', // 测试环境
fileUrl: 'http://192.168.0.14:21626/file/statics/', // 测试环境
fileUrl2: 'http://192.168.0.14:21626/file/statics', // 测试环境
// 课件: 文件视频路径
coursewareUrl: 'http://192.168.0.14:9090/nxdt-courseware',
fileUrl: 'http://218.21.27.6:1999/file/statics/', // 产线环境
fileUrl2: 'http://218.21.27.6:1999/file/statics', // 产线环境
// fileUrl: 'http://218.21.27.6:1999/file/statics/', // 产线环境
// fileUrl2: 'http://218.21.27.6:1999/file/statics', // 产线环境
// baseUrl: 'http://localhost:8080',
// 应用信息
appInfo: {

View File

@ -5,6 +5,7 @@
"versionName" : "1.1.0",
"versionCode" : "100",
"transformPx" : false,
"sassImplementationName" : "node-sass",
"app-plus" : {
"usingComponents" : true,
"nvueCompiler" : "uni-app",

View File

@ -22,7 +22,7 @@
<div class="list-btn">
<div><u-button type="primary" size="mini" @click="handleSeeEdit(1, item)">查看</u-button></div>
<div>
<u-button v-if="item.status == '1'" type="primary" size="mini" @click="handleSeeEdit(2, item)">
<u-button v-if="item.intoStatus == '1'" type="primary" size="mini" @click="handleSeeEdit(2, item)">
审批
</u-button>
</div>

View File

@ -22,7 +22,7 @@
<div class="list-btn">
<div><u-button type="primary" size="mini" @click="handleSeeEdit(1, item)">查看</u-button></div>
<div>
<u-button v-if="item.status == '1'" type="primary" size="mini" @click="handleSeeEdit(2, item)">
<u-button v-if="item.intoStatus == '1'" type="primary" size="mini" @click="handleSeeEdit(2, item)">
审批
</u-button>
</div>

View File

@ -9,7 +9,9 @@
<span class="line"></span>
<span class="title">工程基本信息</span>
</div>
<div v-if="formData.projectTypeId == 2"><u-button text="新建" type="primary" size="mini" @click="addSupervision"></u-button></div>
<div v-if="formData.projectTypeId == 2">
<u-button text="新建" type="primary" size="mini" @click="addSupervision"></u-button>
</div>
</div>
<!-- 表单 -->

View File

@ -18,14 +18,20 @@
isLink
:label="formData.proName ? '' : '请选择工程名称'"
@click="showPicker1 = true"
:disabled="opt.type === 'view'"
:disabled="opt.pageType === 'view'"
></u-cell>
</u-cell-group>
</u-form-item>
<u-form-item label="问题描述" prop="description" required>
<u-textarea v-model="formData.description" clearable placeholder="请输入问题描述" @blur="filter" :disabled="opt.type === 'view'"/>
<u-textarea
v-model="formData.description"
clearable
placeholder="请输入问题描述"
@blur="filter"
:disabled="opt.pageType === 'view'"
/>
</u-form-item>
<u-form-item label="照片" prop="photoList">
<u-form-item label="照片" prop="photoList" required>
<uni-file-picker
v-model="formData.photoList"
:auto-upload="false"
@ -33,17 +39,27 @@
limit="9"
@select="selectImg"
@delete="deleteImg"
:readonly="opt.type === 'view'"
:readonly="opt.pageType === 'view'"
/>
</u-form-item>
</u-form>
<u-button class="btn" type="primary" shape="circle" v-if="opt.type !== 'view'" @click="submitForm">
提交
</u-button>
<u-button class="btn" v-if="opt.type === 'edit' && opt.status === '已保存'" type="primary" shape="circle" @click="changeStatus(2)">
<u-button class="btn" type="primary" shape="circle" v-if="opt.type !== 'view'" @click="submitForm">提交</u-button>
<u-button
class="btn"
v-if="opt.pageType === 'edit' && opt.status === '已保存'"
type="primary"
shape="circle"
@click="changeStatus(2)"
>
转违章
</u-button>
<u-button class="btn" v-if="opt.type === 'edit' && opt.status === '已保存'" type="primary" shape="circle" @click="changeStatus(3)">
<u-button
class="btn"
v-if="opt.pageType === 'edit' && opt.status === '已保存'"
type="primary"
shape="circle"
@click="changeStatus(3)"
>
转隐患
</u-button>
</div>
@ -87,8 +103,8 @@ export default {
proOptions: [],
rules: {
proName: { required: true, message: '请输入检查标题', trigger: ['blur'] },
description: [{ required: true, message: '请输入问题描述', trigger: ['blur', 'change'] }],
},
description: [{ required: true, message: '请输入问题描述', trigger: ['blur', 'change'] }]
}
}
},
onLoad(opt) {
@ -96,10 +112,12 @@ export default {
console.log('🚀 ~ onLoad ~ this.opt:', this.opt)
this.token = uni.getStorageSync('App-Token')
this.getProOptions()
if (this.opt.type === 'edit' || this.opt.type === 'view') {
if (this.opt.pageType === 'edit' || this.opt.pageType === 'view') {
this.formData = this.opt
this.formData.photoList.forEach(item => {
item.filePath = item.url = config.fileUrl + item.filePath
console.log(item.filePath, '************', item.url)
})
}
},
@ -200,7 +218,7 @@ export default {
async submit() {
console.log('🚀 ~ submit ~ this.formData:', this.formData)
try {
if (this.opt.type === 'edit') {
if (this.opt.pageType === 'edit') {
this.formData.id = this.opt.id
}
const res = await addSnapshotForm(this.formData)
@ -221,7 +239,7 @@ export default {
let code = type === 2 ? '违章' : '隐患'
const res = updateSnapshotStatus({ snapshotId: this.opt.snapshotId, status: type })
uni.showToast({
title: '转' + code + '成功',
title: '转' + code + '成功',
icon: 'success',
duration: 1500
})

View File

@ -19,9 +19,17 @@
<div class="list-item">问题描述{{ item.description }}</div>
<div class="list-item">状态{{ item.status }}</div>
<div class="list-btn">
<div><u-button type="primary" size="mini" v-if="item.status !== '已保存'" @click="handleSeeEdit(1, item)">查看</u-button></div>
<div><u-button type="primary" size="mini" v-if="item.status === '已保存'" @click="handleSeeEdit(2, item)">编辑</u-button></div>
<!-- <div><u-button type="primary" size="mini" @click="handleAdd(item)">新增隐患</u-button></div>-->
<div>
<u-button type="primary" size="mini" v-if="item.status !== '已保存'" @click="handleSeeEdit(1, item)">
查看
</u-button>
</div>
<div>
<u-button type="primary" size="mini" v-if="item.status === '已保存'" @click="handleSeeEdit(2, item)">
编辑
</u-button>
</div>
<!-- <div><u-button type="primary" size="mini" @click="handleAdd(item)">新增隐患</u-button></div>-->
</div>
</div>
<u-empty mode="data" v-if="tableList.length === 0"></u-empty>
@ -54,7 +62,7 @@ export default {
chickIcon() {
console.log('🚀 ~ 点击右侧按钮chickIcon')
const params = {
type: 'add',
type: 'add'
}
uni.navigateTo({
url: '/pages/randomlySnapPicture/addSnapPhoto?params=' + JSON.stringify(params)
@ -79,9 +87,9 @@ export default {
console.log('🚀 ~ 查看编辑 ~ item:', item)
let params = {}
if (type === 1) {
params = { type: 'view', ...item }
params = { pageType: 'view', ...item }
} else if (type === 2) {
params = { type: 'edit', ...item }
params = { pageType: 'edit', ...item }
}
uni.navigateTo({
url: '/pages/randomlySnapPicture/addSnapPhoto?params=' + JSON.stringify(params)

View File

@ -21,7 +21,7 @@
<div class="list-btn">
<div><u-button type="primary" size="mini" @click="handleSeeEdit(1, item)">查看</u-button></div>
<div>
<u-button v-if="item.status == '1'" type="primary" size="mini" @click="handleSeeEdit(2, item)">
<u-button v-if="item.intoStatus == '1'" type="primary" size="mini" @click="handleSeeEdit(2, item)">
审批
</u-button>
</div>