-
+
{})
+ await this.getDeptTreeSelect().catch(() => {
+ })
const params = this.$route.query
this.queryParams.propertyUnitId = params?.deptId || ''
const ids = []
@@ -532,12 +546,21 @@ export default {
},
methods: {
handleUnitChange(value) {
+ this.queryParams.propertyUnitId = undefined
if (value.length === 0) {
this.queryParams.propertyUnitId = undefined
return
}
this.queryParams.propertyUnitId = value[value.length - 1]
},
+
+ handleCompanyIdsChange(value) {
+ if (value.length === 0) {
+ this.dialogForm.companyIds = undefined
+ return
+ }
+ this.dialogForm.companyId = value[value.length - 1]
+ },
// 获取产权单位
async getDeptTreeSelect() {
const res = await deptTreeSelect()
@@ -585,6 +608,7 @@ export default {
this.queryParams.pageSize = 10
this.queryParams.parentId = '0'
this.queryParams.level = '1'
+ this.queryParams.propertyUnitId = undefined
this.$refs.queryForm.resetFields()
this.getList()
},
@@ -655,9 +679,9 @@ export default {
this.download(
'/material-mall/toolLedger/export',
{
- ...this.queryParams,
+ ...this.queryParams
},
- `编码工具台账_${new Date().getTime()}.xlsx`,
+ `编码工具台账_${new Date().getTime()}.xlsx`
)
},
@@ -666,13 +690,14 @@ export default {
try {
const res = await getManufacturerSelectApi()
this.manufacturerSelect = res.data
- } catch (error) {}
+ } catch (error) {
+ }
},
handleProperty(type, index) {
if (type == 'add') {
this.dialogForm.propertyVoList.push({
propertyName: '',
- propertyValue: '',
+ propertyValue: ''
})
} else {
this.dialogForm.propertyVoList.splice(index, 1)
@@ -688,13 +713,21 @@ export default {
this.$refs.dialogForm.resetFields()
// 深拷贝行数据
this.dialogForm = { ...this.dialogForm, ...JSON.parse(JSON.stringify(row)) }
+ const ids = []
+ if (row?.parentId) {
+ ids.push(row.parentId)
+ }
+ if (row?.propertyUnitId) {
+ ids.push(row.propertyUnitId)
+ }
+ this.dialogForm.companyIds = [...ids.map(Number)]
// 处理状态名称
const statusMap = { 0: '在库', 1: '在用', 2: '在修', 3: '已报废' }
this.dialogForm.statusName = statusMap[this.dialogForm.status] || '未知状态'
if (!this.dialogForm.propertyVoList || this.dialogForm.propertyVoList.length === 0) {
this.dialogForm.propertyVoList.push({
propertyName: '',
- propertyValue: '',
+ propertyValue: ''
})
}
@@ -764,7 +797,7 @@ export default {
const newFile = {
name: res.data.url.split('/').pop(),
url: res.data.url,
- uid: file.uid,
+ uid: file.uid
}
this.dialogForm.fileList.push(newFile)
this.$message.success('文件上传成功')
@@ -778,7 +811,7 @@ export default {
this.$confirm('确定要删除该文件吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
- type: 'warning',
+ type: 'warning'
})
.then(() => {
this.dialogForm.fileList.splice(index, 1)
@@ -835,7 +868,7 @@ export default {
const parts = item.split('/')
return {
fileName: parts[parts.length - 1],
- fileUrl: item,
+ fileUrl: item
}
})
console.log('🚀 ~ handleSubmit ~ certificates:', certificates)
@@ -850,7 +883,7 @@ export default {
const parts = item.split('/')
return {
fileName: parts[parts.length - 1],
- fileUrl: item,
+ fileUrl: item
}
})
console.log('🚀 ~ handleSubmit ~ inspectionReports:', inspectionReports)
@@ -865,7 +898,7 @@ export default {
const parts = item.split('/')
return {
fileName: parts[parts.length - 1],
- fileUrl: item,
+ fileUrl: item
}
})
console.log('🚀 ~ handleSubmit ~ purchaseInvoices:', purchaseInvoices)
@@ -875,14 +908,14 @@ export default {
...this.dialogForm,
certificates,
inspectionReports,
- purchaseInvoices,
+ purchaseInvoices
// fileList: this.dialogForm.fileList.map(file => file.url).join(',')
}
console.log('🚀 ~ submitForm:', submitForm)
await updateByIdApi(submitForm)
this.$message({
type: 'success',
- message: '操作成功!',
+ message: '操作成功!'
})
this.dialogVisible = false
this.getList()
@@ -892,8 +925,8 @@ export default {
} finally {
this.isLoading = false
}
- },
- },
+ }
+ }
}
@@ -966,10 +999,12 @@ export default {
// 确保删除按钮样式正确
::v-deep .file-action .el-link {
color: #f56c6c;
+
&:hover {
color: #ff4d4f;
}
}
+
.content-box {
border-radius: 8px;
//height: calc(100vh - 290px);
@@ -984,6 +1019,7 @@ export default {
padding: 20px;
}
}
+
::v-deep .el-input-number.is-without-controls .el-input__inner {
text-align: left;
}
diff --git a/vue.config.js b/vue.config.js
index a8b84a45..b8e5519b 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -18,7 +18,7 @@ module.exports = {
// 部署生产环境和开发环境下的URL。
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.bonus.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.bonus.vip/admin/,则设置 baseUrl 为 /admin/。
- publicPath: process.env.VUE_APP_BASE_API == '/iws/jiju-api' ? '/iws/glweb/' : '/', // 宏源打包时无需更改
+ publicPath: process.env.VUE_APP_BASE_API == '/iws/jiju-api' ? '/iws/glweb/' : '/iws/glweb/', // 宏源打包时无需更改
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
outputDir: 'dist',
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
@@ -29,7 +29,7 @@ module.exports = {
productionSourceMap: false,
// webpack-dev-server 相关配置
devServer: {
- host: '0.0.0.0',
+ host: '127.0.0.1',
port: port,
open: true,
proxy: {
@@ -38,9 +38,9 @@ module.exports = {
// target: `http://localhost:18080`,
// target: `http://192.168.0.96:28080`,//马
// target: `http://192.168.0.110:18080`,//洪
- // target: `http://192.168.0.41:28080`,//蒋
+ target: `http://127.0.0.1:28080`,//蒋
// target: `http://36.33.26.201:17788/proxyApi`, //测试
- target: `http://36.33.26.201:21999/prod-api`, //测试
+ //target: `http://36.33.26.201:21999/prod-api`, //测试
// target: `http://192.168.137.1:18080`,//
changeOrigin: true,
pathRewrite: {