代码提交
This commit is contained in:
parent
c50c97b0df
commit
4e46d5eac3
26
src/App.vue
26
src/App.vue
|
|
@ -25,19 +25,19 @@ export default {
|
|||
// setToken(token[1].slice(1));
|
||||
// this.$router.push({ path: "/" });
|
||||
// }
|
||||
const urlParams = new URLSearchParams(window.location.search)
|
||||
const token = urlParams.get('token')
|
||||
console.log('🚀 ~ created ~ token:', token)
|
||||
if (token) {
|
||||
setToken(token)
|
||||
this.$router.push({ path: '/' })
|
||||
}
|
||||
|
||||
// 确保 Vuex store 中的 token 状态与 Cookie 同步
|
||||
const cookieToken = getToken()
|
||||
if (cookieToken && !this.$store.state.user.token) {
|
||||
this.$store.commit('user/SET_TOKEN', cookieToken)
|
||||
}
|
||||
// const urlParams = new URLSearchParams(window.location.search)
|
||||
// const token = urlParams.get('token')
|
||||
// console.log('🚀 ~ created ~ token:', token)
|
||||
// if (token) {
|
||||
// setToken(token)
|
||||
// this.$router.push({ path: '/' })
|
||||
// }
|
||||
//
|
||||
// // 确保 Vuex store 中的 token 状态与 Cookie 同步
|
||||
// const cookieToken = getToken()
|
||||
// if (cookieToken && !this.$store.state.user.token) {
|
||||
// this.$store.commit('user/SET_TOKEN', cookieToken)
|
||||
// }
|
||||
},
|
||||
metaInfo() {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -3,13 +3,26 @@ import request from '@/utils/request'
|
|||
// 登录方法
|
||||
export function login(data) {
|
||||
return request({
|
||||
url: '/auth/login',
|
||||
// url: '/auth/login',
|
||||
// headers: {
|
||||
// isToken: false,
|
||||
// repeatSubmit: false
|
||||
// },
|
||||
// method: 'post',
|
||||
// data: data
|
||||
})
|
||||
}
|
||||
|
||||
// iws登录
|
||||
export function iwsLogin(data) {
|
||||
return request({
|
||||
url: '/auth/iwsLogin',
|
||||
headers: {
|
||||
isToken: false,
|
||||
repeatSubmit: false
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ export const constantRoutes = [
|
|||
|
||||
]
|
||||
},
|
||||
{
|
||||
/* {
|
||||
path: '',
|
||||
component: Layout,
|
||||
redirect: 'index1',
|
||||
|
|
@ -88,7 +88,7 @@ export const constantRoutes = [
|
|||
},
|
||||
|
||||
]
|
||||
},
|
||||
}, */
|
||||
{
|
||||
path: '/qrCode/qrCodePage',
|
||||
component: () => import('@/views/qrCode/qrCode'),
|
||||
|
|
@ -401,8 +401,8 @@ Router.prototype.replace = function push(location) {
|
|||
}
|
||||
|
||||
export default new Router({
|
||||
mode: 'history', // 去掉url中的# / 宏源为history
|
||||
mode: 'hash', // 去掉url中的# / 宏源为history
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: constantRoutes,
|
||||
base: process.env.NODE_ENV === 'production' ? '/' : '' // 宏源打包时隐藏
|
||||
base: process.env.NODE_ENV === 'production' ? '/iws/glweb' : '' // 宏源打包时隐藏
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<GoBack :title="'退役审核'" @goBack="goBack" />
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<GoBack :title="'退役审核'" @goBack="goBack"/>
|
||||
<el-card style="margin-bottom: 20px">
|
||||
|
||||
<!-- 基本信息 -->
|
||||
<el-form ref="baseForm" :model="baseInfo" label-width="70px" inline style="height: 36px">
|
||||
|
|
@ -18,8 +18,6 @@
|
|||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
|
||||
<el-form-item label="任务状态">
|
||||
<!-- 任务状态:禁用的输入框 + 标签样式 -->
|
||||
<el-input
|
||||
|
|
@ -31,22 +29,20 @@
|
|||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
|
||||
<el-form-item label="申请人">
|
||||
<!-- 申请人:禁用的输入框 -->
|
||||
<el-input v-model="baseInfo.createUser" placeholder="无" disabled style="width: 240px;" />
|
||||
<el-input v-model="baseInfo.createUser" placeholder="无" disabled style="width: 240px;"/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="申请时间">
|
||||
<!-- 申请时间:禁用的输入框 -->
|
||||
<el-input v-model="baseInfo.createTime" placeholder="无" disabled style="width: 240px;" />
|
||||
<el-input v-model="baseInfo.createTime" placeholder="无" disabled style="width: 240px;"/>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</el-card>
|
||||
<!-- 装备和工具列表 -->
|
||||
<!-- 装备和工具列表 -->
|
||||
<el-card>
|
||||
<div class="detail-section">
|
||||
<div class="section-header">
|
||||
|
|
@ -54,10 +50,10 @@
|
|||
<el-col :span="24">
|
||||
<span style="font-size: 20px; font-weight: 800">退役审核列表</span>
|
||||
</el-col>
|
||||
<el-col :span="0" style="display: flex; justify-content: flex-end">
|
||||
<!-- <el-button type="primary" @click="onHandleApproveBatch">通过</el-button> -->
|
||||
<!-- <el-button type="primary" @click="onHandleRejectBatch">驳回</el-button> -->
|
||||
<!-- <el-button @click="onHandleCancel">返回</el-button>-->
|
||||
<el-col :span="0" style="display: flex; justify-content: flex-end">
|
||||
<!-- <el-button type="primary" @click="onHandleApproveBatch">通过</el-button> -->
|
||||
<!-- <el-button type="primary" @click="onHandleRejectBatch">驳回</el-button> -->
|
||||
<!-- <el-button @click="onHandleCancel">返回</el-button>-->
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
|
@ -65,20 +61,26 @@
|
|||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="collapsed ? 23 : 18">
|
||||
<el-table ref="detailTable" :data="detailList" height="546" style="width: 100%" border stripe size="small" fit @selection-change="onSelectionChange">
|
||||
<el-table-column type="selection" width="50" :selectable="row => !row.reviewStatus || (row.reviewStatus !== '1' && row.reviewStatus !== '2')" />
|
||||
<el-table-column align="center" type="index" label="序号" width="80" />
|
||||
<el-table-column align="center" prop="type" label="分类" width="100" />
|
||||
<el-table-column align="center" prop="typeName" label="类目" min-width="100" />
|
||||
<el-table-column align="center" prop="typeModelName" label="规格型号" width="150" />
|
||||
<el-table-column align="center" prop="manageMode" label="管理模式" width="120" />
|
||||
<el-table-column align="center" prop="devCode" label="设备编码" min-width="120" />
|
||||
<el-table-column align="center" prop="scrapQuantity" label="申请报废数量" width="120" />
|
||||
<el-table-column align="center" prop="retireReason" label="退役原因" min-width="120" show-overflow-tooltip />
|
||||
<el-table ref="detailTable" :data="detailList" height="546" style="width: 100%" border stripe size="small"
|
||||
fit @selection-change="onSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50"
|
||||
:selectable="row => !row.reviewStatus || (row.reviewStatus !== '1' && row.reviewStatus !== '2')"
|
||||
/>
|
||||
<el-table-column align="center" type="index" label="序号" width="80"/>
|
||||
<el-table-column align="center" prop="type" label="分类" width="100"/>
|
||||
<el-table-column align="center" prop="typeName" label="类目" min-width="100"/>
|
||||
<el-table-column align="center" prop="typeModelName" label="规格型号" width="150"/>
|
||||
<el-table-column align="center" prop="manageMode" label="管理模式" width="120"/>
|
||||
<el-table-column align="center" prop="devCode" label="设备编码" min-width="120"/>
|
||||
<el-table-column align="center" prop="scrapQuantity" label="申请报废数量" width="120"/>
|
||||
<el-table-column align="center" prop="retireReason" label="退役原因" min-width="120"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column align="center" label="报废附件" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="onHandleViewAttachment(scope.row)">
|
||||
查看附件
|
||||
<el-button type="text" size="mini" @click="onHandleViewAttachment(scope.row)">
|
||||
查看
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -130,7 +132,7 @@
|
|||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 审批操作 -->
|
||||
<div class="approval-actions" v-if="canApprove && !collapsed">
|
||||
<div class="section-header">
|
||||
|
|
@ -154,7 +156,7 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="position: absolute; width: 10px; top: 50%; right: 0">
|
||||
<!-- 右侧折叠/展开按钮 -->
|
||||
<el-button
|
||||
|
|
@ -204,7 +206,7 @@ export default {
|
|||
approveData: {
|
||||
opinion: ''
|
||||
},
|
||||
collapsed: false,
|
||||
collapsed: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -354,13 +356,9 @@ export default {
|
|||
onHandleViewAttachment(row) {
|
||||
if (row.attachments && row.attachments.length > 0) {
|
||||
const file = row.attachments[0]
|
||||
const parts = file.name.split('.')
|
||||
const parts = file.fileName.split('.')
|
||||
const extension = parts.pop()
|
||||
if (extension === 'doc' || extension === 'docx' || extension === 'pdf') {
|
||||
window.open(file.url, file.name)
|
||||
} else {
|
||||
this.$message.info('预览图片: ' + file.name)
|
||||
}
|
||||
window.open(file.fileUrl, file.fileName)
|
||||
} else {
|
||||
this.$message.warning('暂无附件')
|
||||
}
|
||||
|
|
@ -376,7 +374,7 @@ export default {
|
|||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
}).then(async() => {
|
||||
try {
|
||||
await doApprove({
|
||||
instanceId: this.approvalInstance.id,
|
||||
|
|
@ -390,7 +388,8 @@ export default {
|
|||
} catch (error) {
|
||||
this.$message.error('审批失败: ' + error.message)
|
||||
}
|
||||
}).catch(() => {})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
|
||||
async onHandleReject() {
|
||||
|
|
@ -403,7 +402,7 @@ export default {
|
|||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
}).then(async() => {
|
||||
try {
|
||||
await doApprove({
|
||||
instanceId: this.approvalInstance.id,
|
||||
|
|
@ -417,7 +416,8 @@ export default {
|
|||
} catch (error) {
|
||||
this.$message.error('审批失败: ' + error.message)
|
||||
}
|
||||
}).catch(() => {})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
|
||||
onHandleCancel() {
|
||||
|
|
|
|||
|
|
@ -1,75 +1,75 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<GoBack :title="'退役申请'" @goBack="goBack" />
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<GoBack :title="'退役申请'" @goBack="goBack"/>
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{ isNew ? '新增退役申请' : '退役申请明细' }}</span>
|
||||
</div>
|
||||
|
||||
<!-- 基本信息 -->
|
||||
<el-form ref="baseForm" :model="baseInfo" label-width="70px" inline style="height: 36px" >
|
||||
<el-form-item label="申请单号" style="margin-bottom: 0; height: 36px">
|
||||
<!-- 申请单号:禁用的输入框 -->
|
||||
<el-input
|
||||
v-model="baseInfo.code"
|
||||
placeholder="无"
|
||||
disabled
|
||||
:value="!isNew ? baseInfo.code : '新增'"
|
||||
style="width: 240px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务状态">
|
||||
<!-- 任务状态:禁用的输入框 + 标签样式 -->
|
||||
<el-input
|
||||
:value="getStatusLabel()"
|
||||
disabled
|
||||
style="background: transparent; border: none; padding-left: 0; width: 240px;"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请人">
|
||||
<!-- 申请人:禁用的输入框 -->
|
||||
<el-input v-model="baseInfo.createUser" placeholder="无" disabled style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="申请时间">
|
||||
<!-- 申请时间:禁用的输入框 -->
|
||||
<el-input v-model="baseInfo.createTime" placeholder="无" disabled style="width: 240px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form ref="baseForm" :model="baseInfo" label-width="70px" inline style="height: 36px">
|
||||
<el-form-item label="申请单号" style="margin-bottom: 0; height: 36px">
|
||||
<!-- 申请单号:禁用的输入框 -->
|
||||
<el-input
|
||||
v-model="baseInfo.code"
|
||||
placeholder="无"
|
||||
disabled
|
||||
:value="!isNew ? baseInfo.code : '新增'"
|
||||
style="width: 240px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务状态">
|
||||
<!-- 任务状态:禁用的输入框 + 标签样式 -->
|
||||
<el-input
|
||||
:value="getStatusLabel()"
|
||||
disabled
|
||||
style="background: transparent; border: none; padding-left: 0; width: 240px;"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请人">
|
||||
<!-- 申请人:禁用的输入框 -->
|
||||
<el-input v-model="baseInfo.createUser" placeholder="无" disabled style="width: 240px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请时间">
|
||||
<!-- 申请时间:禁用的输入框 -->
|
||||
<el-input v-model="baseInfo.createTime" placeholder="无" disabled style="width: 240px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<!-- 装备和工具列表 -->
|
||||
<el-card>
|
||||
<!-- 装备和工具列表 -->
|
||||
<el-card>
|
||||
<div class="detail-section">
|
||||
<div class="section-header">
|
||||
<el-col :span="4">
|
||||
<span style="font-size: 20px; font-weight: 800">退役申请设备</span>
|
||||
</el-col>
|
||||
<el-col :span="20" style="display: flex; justify-content: flex-end">
|
||||
<el-button type="primary" size="small" :disabled="!canEdit" @click="onHandleAddItem">
|
||||
添加装备/工具
|
||||
</el-button>
|
||||
<!-- 操作按钮 -->
|
||||
<el-button type="primary" size="small" :disabled="!canEdit" @click="onHandleSubmit">确认申请</el-button>
|
||||
<el-col :span="20" style="display: flex; justify-content: flex-end">
|
||||
<el-button type="primary" size="small" :disabled="isNew && !canEdit" @click="onHandleAddItem">
|
||||
添加装备/工具
|
||||
</el-button>
|
||||
<!-- 操作按钮 -->
|
||||
<el-button type="primary" size="small" :disabled="isNew && !canEdit" @click="onHandleSubmit">确认申请</el-button>
|
||||
</el-col>
|
||||
</div>
|
||||
|
||||
<el-table :data="detailList" row-key="id" style="width: 100%" border stripe size="small" fit height="546">
|
||||
<el-table-column align="center" type="index" label="序号" width="70" />
|
||||
<el-table-column align="center" prop="type" label="分类" width="90" />
|
||||
<el-table-column align="center" prop="typeName" label="类目" width="180" />
|
||||
<el-table-column align="center" prop="typeModelName" label="规格型号" width="180" />
|
||||
<el-table-column align="center" prop="manageMode" label="管理模式" width="120" />
|
||||
<el-table-column align="center" prop="devCode" label="设备编码" min-width="120" />
|
||||
<el-table-column v-if="isNew" align="center" prop="inStockNum" label="在库数量" width="80" />
|
||||
<el-table-column align="center" prop="scrapQuantity" label="申请报废数量" width="120" />
|
||||
<el-table-column align="center" type="index" label="序号" width="70"/>
|
||||
<el-table-column align="center" prop="type" label="分类" width="90"/>
|
||||
<el-table-column align="center" prop="typeName" label="类目" width="180"/>
|
||||
<el-table-column align="center" prop="typeModelName" label="规格型号" width="180"/>
|
||||
<el-table-column align="center" prop="manageMode" label="管理模式" width="120"/>
|
||||
<el-table-column align="center" prop="devCode" label="设备编码" min-width="120"/>
|
||||
<el-table-column v-if="isNew" align="center" prop="inStockNum" label="在库数量" width="80"/>
|
||||
<el-table-column align="center" prop="scrapQuantity" label="申请报废数量" width="120"/>
|
||||
<el-table-column align="center" prop="retireReason" label="退役原因" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model="scope.row.retireReason"
|
||||
placeholder="请选择退役原因"
|
||||
size="small"
|
||||
:disabled="!canEdit"
|
||||
:disabled="isNew && !canEdit"
|
||||
>
|
||||
<el-option label="人为" value="人为"></el-option>
|
||||
<el-option label="自然" value="自然"></el-option>
|
||||
|
|
@ -88,15 +88,20 @@
|
|||
accept=".png, .jpg, .jpeg, .pdf, .doc, .docx"
|
||||
:on-success="(res) => handleFileSuccess(res, scope.row)"
|
||||
:auto-upload="true"
|
||||
v-if="!canEdit || !scope.row.bmFileInfos.length > 0"
|
||||
v-if="canEdit && !scope.row.bmFileInfos.length > 0"
|
||||
:file-list="scope.row.bmFileInfos"
|
||||
>
|
||||
<el-button type="primary" size="mini" >上传附件</el-button>
|
||||
<el-button type="primary" size="mini">上传附件</el-button>
|
||||
</el-upload>
|
||||
<el-button v-if="scope.row.bmFileInfos && scope.row.bmFileInfos.length > 0" type="text" size="mini" @click="picturePreview(scope.row)">
|
||||
<el-button v-if="scope.row.bmFileInfos && scope.row.bmFileInfos.length > 0" type="text" size="mini"
|
||||
@click="picturePreview(scope.row)"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button v-if="scope.row.bmFileInfos && scope.row.bmFileInfos.length > 0" type="text" size="mini" style="color: red" @click="deleteFile(scope.row)">
|
||||
<el-button v-if="canEdit && scope.row.bmFileInfos && scope.row.bmFileInfos.length > 0" type="text"
|
||||
size="mini"
|
||||
style="color: red" @click="deleteFile(scope.row)"
|
||||
>
|
||||
删除附件
|
||||
</el-button>
|
||||
</div>
|
||||
|
|
@ -104,7 +109,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" size="mini" :disabled="!canEdit" @click="onHandleDeleteItem(scope.row)">
|
||||
<el-button type="danger" size="mini" :disabled="isNew && !canEdit" @click="onHandleDeleteItem(scope.row)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
|
|
@ -125,7 +130,11 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getRetireApplyDetailAPI, submitRetireApplyTaskAPI, getDeviceByMaIdsAPI } from '@/api/EquipmentRetireApply/index.js'
|
||||
import {
|
||||
getRetireApplyDetailAPI,
|
||||
submitRetireApplyTaskAPI,
|
||||
getDeviceByMaIdsAPI
|
||||
} from '@/api/EquipmentRetireApply/index.js'
|
||||
import AddItemDialog from './components/AddItemDialog'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import GoBack from '@/components/GoBack'
|
||||
|
|
@ -137,7 +146,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
isNew: false,
|
||||
isNew: true,
|
||||
baseInfo: {
|
||||
id: '',
|
||||
code: '',
|
||||
|
|
@ -157,19 +166,17 @@ export default {
|
|||
computed: {
|
||||
// 判断是否可以编辑(新增状态或待审批状态下可以编辑)
|
||||
canEdit() {
|
||||
// 如果是新增页面,允许编辑
|
||||
if (this.isNew) return true;
|
||||
// 从路由参数中获取 mode
|
||||
const mode = this.$route.query.mode;
|
||||
// // 从路由参数中获取 mode
|
||||
const mode = this.$route.query.mode
|
||||
// 如果 mode 是 'edit',允许编辑;如果是 'view' 或其他值,不允许编辑
|
||||
return mode === 'edit';
|
||||
return mode === 'edit'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
this.$router.push({ path: '/business/EquipmentRetireApply/equipment/retire-apply' })
|
||||
},
|
||||
async getInfo(){
|
||||
async getInfo() {
|
||||
try {
|
||||
const res = await getDeviceByMaIdsAPI(this.$route.query.maId)
|
||||
if (!res.data || res.data.length === 0) return
|
||||
|
|
@ -177,7 +184,7 @@ export default {
|
|||
...item,
|
||||
scrapQuantity: item.scrapNum,
|
||||
retireReason: item.reasonVal,
|
||||
bmFileInfos: item.bmFileInfos || [],
|
||||
bmFileInfos: item.bmFileInfos || []
|
||||
}))
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ error:', error)
|
||||
|
|
@ -186,7 +193,7 @@ export default {
|
|||
async getDetail() {
|
||||
const id = this.$route.params.id
|
||||
if (id === 'new') {
|
||||
this.isNew = true
|
||||
this.isNew = false
|
||||
this.baseInfo.createUser = this.$store.state.user?.nickName || '当前用户'
|
||||
this.baseInfo.createTime = new Date().toLocaleString()
|
||||
} else {
|
||||
|
|
@ -257,7 +264,8 @@ export default {
|
|||
this.detailList.splice(index, 1)
|
||||
}
|
||||
this.$message.success('删除成功')
|
||||
}).catch(() => {})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
|
||||
async onHandleSubmit() {
|
||||
|
|
@ -362,9 +370,9 @@ export default {
|
|||
picturePreview(row) {
|
||||
if (row.bmFileInfos && row.bmFileInfos.length > 0) {
|
||||
const file = row.bmFileInfos[0]
|
||||
const parts = file.name.split('.')
|
||||
const parts = file.fileName.split('.')
|
||||
const extension = parts.pop()
|
||||
window.open(file.url, file.name)
|
||||
window.open(file.fileUrl, file.fileName)
|
||||
// if (extension === 'doc' || extension === 'docx' || extension === 'pdf') {
|
||||
// window.open(file.url, file.name)
|
||||
// } else {
|
||||
|
|
@ -374,7 +382,7 @@ export default {
|
|||
},
|
||||
deleteFile(row) {
|
||||
row.bmFileInfos = []
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,8 @@
|
|||
<template>
|
||||
<div class="container">
|
||||
<div class="login">
|
||||
<div class="login" v-if="!isIws">
|
||||
<div class="login-form">
|
||||
<el-form
|
||||
ref="loginForm"
|
||||
:model="loginForm"
|
||||
:rules="loginRules"
|
||||
class="login-form"
|
||||
>
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||
<h3 class="title">机械化施工装备管理(共享)平台</h3>
|
||||
<template v-if="loginMethod === 'password'">
|
||||
<el-form-item prop="username">
|
||||
|
|
@ -15,15 +10,11 @@
|
|||
v-model="loginForm.username"
|
||||
type="text"
|
||||
auto-complete="off"
|
||||
:placeholder="`用户名${
|
||||
config.loginConfig.phonePassword ? '/手机号' : ''
|
||||
}${config.loginConfig.emailPassword ? '/邮箱' : ''}`"
|
||||
:placeholder="`用户名${config.loginConfig.phonePassword ? '/手机号' : ''}${
|
||||
config.loginConfig.emailPassword ? '/邮箱' : ''
|
||||
}`"
|
||||
>
|
||||
<svg-icon
|
||||
slot="prefix"
|
||||
icon-class="user"
|
||||
class="el-input__icon input-icon"
|
||||
/>
|
||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
|
|
@ -34,11 +25,7 @@
|
|||
placeholder="密码"
|
||||
@keyup.enter.native="handleLogin"
|
||||
>
|
||||
<svg-icon
|
||||
slot="prefix"
|
||||
icon-class="password"
|
||||
class="el-input__icon input-icon"
|
||||
/>
|
||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="code" v-if="captchaEnabled">
|
||||
|
|
@ -49,38 +36,25 @@
|
|||
style="width: 63%"
|
||||
@keyup.enter.native="handleLogin"
|
||||
>
|
||||
<svg-icon
|
||||
slot="prefix"
|
||||
icon-class="validCode"
|
||||
class="el-input__icon input-icon"
|
||||
/>
|
||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
<div class="login-code">
|
||||
<img :src="codeUrl" @click="getCode" class="login-code-img" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="isAdmin" prop="verificationCode">
|
||||
<el-input
|
||||
v-model="loginForm.verificationCode"
|
||||
placeholder="请输入验证码"
|
||||
>
|
||||
<el-input v-model="loginForm.verificationCode" placeholder="请输入验证码">
|
||||
<template slot="append">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="sendAdminCode"
|
||||
:disabled="
|
||||
isSendingCode || captchaEnabled ? !loginForm.code : false
|
||||
"
|
||||
:disabled="isSendingCode || captchaEnabled ? !loginForm.code : false"
|
||||
class="send-code-button"
|
||||
>
|
||||
{{ countdown === 0 ? "获取验证码" : `${countdown}s` }}
|
||||
{{ countdown === 0 ? '获取验证码' : `${countdown}s` }}
|
||||
</el-button>
|
||||
</template>
|
||||
<svg-icon
|
||||
slot="prefix"
|
||||
icon-class="message"
|
||||
class="el-input__icon input-icon"
|
||||
/>
|
||||
<svg-icon slot="prefix" icon-class="message" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
|
@ -90,15 +64,11 @@
|
|||
v-model="loginForm.mobile"
|
||||
type="text"
|
||||
auto-complete="off"
|
||||
:placeholder="`${
|
||||
config.loginConfig.phoneCode ? '手机号' : '/'
|
||||
}${config.loginConfig.emailCode ? '邮箱' : ''}`"
|
||||
:placeholder="`${config.loginConfig.phoneCode ? '手机号' : '/'}${
|
||||
config.loginConfig.emailCode ? '邮箱' : ''
|
||||
}`"
|
||||
>
|
||||
<svg-icon
|
||||
slot="prefix"
|
||||
icon-class="user"
|
||||
class="el-input__icon input-icon"
|
||||
/>
|
||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="code" v-if="captchaEnabled">
|
||||
|
|
@ -109,49 +79,31 @@
|
|||
style="width: 63%"
|
||||
@keyup.enter.native="handleLogin"
|
||||
>
|
||||
<svg-icon
|
||||
slot="prefix"
|
||||
icon-class="validCode"
|
||||
class="el-input__icon input-icon"
|
||||
/>
|
||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
<div class="login-code">
|
||||
<img :src="codeUrl" @click="getCode" class="login-code-img" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item prop="verificationCode">
|
||||
<el-input
|
||||
v-model="loginForm.verificationCode"
|
||||
placeholder="请输入验证码"
|
||||
>
|
||||
<el-input v-model="loginForm.verificationCode" placeholder="请输入验证码">
|
||||
<template slot="append">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="sendCode"
|
||||
:disabled="
|
||||
isSendingCode || captchaEnabled ? !loginForm.code : false
|
||||
"
|
||||
:disabled="isSendingCode || captchaEnabled ? !loginForm.code : false"
|
||||
class="send-code-button"
|
||||
>
|
||||
{{ countdown === 0 ? "获取验证码" : `${countdown}s` }}
|
||||
{{ countdown === 0 ? '获取验证码' : `${countdown}s` }}
|
||||
</el-button>
|
||||
</template>
|
||||
<svg-icon
|
||||
slot="prefix"
|
||||
icon-class="message"
|
||||
class="el-input__icon input-icon"
|
||||
/>
|
||||
<svg-icon slot="prefix" icon-class="message" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<div class="login-form-center">
|
||||
<el-link
|
||||
v-if="
|
||||
config.loginConfig.emailCode || config.loginConfig.phoneCode
|
||||
"
|
||||
@click="toggleLoginMethod"
|
||||
>
|
||||
{{ loginMethod === "password" ? "短信登录" : "密码登录" }}
|
||||
<el-link v-if="config.loginConfig.emailCode || config.loginConfig.phoneCode" @click="toggleLoginMethod">
|
||||
{{ loginMethod === 'password' ? '短信登录' : '密码登录' }}
|
||||
</el-link>
|
||||
<!-- <router-link
|
||||
v-if="
|
||||
|
|
@ -209,65 +161,59 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getCodeImg } from "@/api/login";
|
||||
import Cookies from "js-cookie";
|
||||
import { decrypt, encrypt } from "@/utils/jsencrypt";
|
||||
import dingding from "@/assets/images/dingding.svg";
|
||||
import wx from "@/assets/images/wx.svg";
|
||||
import qq from "@/assets/images/QQ.svg";
|
||||
import { getCodeImg, iwsLogin } from '@/api/login'
|
||||
import Cookies from 'js-cookie'
|
||||
import { decrypt, encrypt } from '@/utils/jsencrypt'
|
||||
import dingding from '@/assets/images/dingding.svg'
|
||||
import wx from '@/assets/images/wx.svg'
|
||||
import qq from '@/assets/images/QQ.svg'
|
||||
import { setToken, setExpiresIn } from '@/utils/auth'
|
||||
|
||||
export default {
|
||||
name: "Login",
|
||||
name: 'Login',
|
||||
data() {
|
||||
return {
|
||||
isIws: false,
|
||||
dingding: dingding,
|
||||
wx: wx,
|
||||
qq: qq,
|
||||
codeUrl: "",
|
||||
codeUrl: '',
|
||||
isAdmin: false,
|
||||
loginForm: {
|
||||
username: "",
|
||||
password: "",
|
||||
username: '',
|
||||
password: '',
|
||||
rememberMe: false,
|
||||
code: "",
|
||||
mobile: "",
|
||||
verificationCode: "",
|
||||
uuid: "",
|
||||
loginType: "",
|
||||
phoneUuid: "",
|
||||
mobileCodeType: "LOGIN",
|
||||
code: '',
|
||||
mobile: '',
|
||||
verificationCode: '',
|
||||
uuid: '',
|
||||
loginType: '',
|
||||
phoneUuid: '',
|
||||
mobileCodeType: 'LOGIN',
|
||||
},
|
||||
passwordLoginRules: {
|
||||
username: [
|
||||
{ required: true, trigger: "blur", message: "请输入您的账号" },
|
||||
],
|
||||
password: [
|
||||
{ required: true, trigger: "blur", message: "请输入您的密码" },
|
||||
],
|
||||
code: [{ required: true, trigger: "change", message: "请输入验证码" }],
|
||||
username: [{ required: true, trigger: 'blur', message: '请输入您的账号' }],
|
||||
password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }],
|
||||
code: [{ required: true, trigger: 'change', message: '请输入验证码' }],
|
||||
},
|
||||
mobileLoginRules: {
|
||||
mobile: [
|
||||
{ required: true, trigger: "blur", message: "请输入您的手机号" },
|
||||
],
|
||||
verificationCode: [
|
||||
{ required: true, trigger: "blur", message: "请输入验证码" },
|
||||
],
|
||||
mobile: [{ required: true, trigger: 'blur', message: '请输入您的手机号' }],
|
||||
verificationCode: [{ required: true, trigger: 'blur', message: '请输入验证码' }],
|
||||
},
|
||||
loading: false,
|
||||
captchaEnabled: true,
|
||||
redirect: undefined,
|
||||
isSendingCode: false,
|
||||
countdown: 0,
|
||||
loginMethod: "password", // 'password' or 'mobile'
|
||||
loginMethod: 'password', // 'password' or 'mobile'
|
||||
supportsPhoneLogin: false,
|
||||
supportsEmailLogin: false,
|
||||
};
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
config() {
|
||||
return (
|
||||
JSON.parse(localStorage.getItem("systemConfig")) || {
|
||||
JSON.parse(localStorage.getItem('systemConfig')) || {
|
||||
loginConfig: {
|
||||
phonePassword: true,
|
||||
emailPassword: true,
|
||||
|
|
@ -279,217 +225,252 @@ export default {
|
|||
emailRegisters: true,
|
||||
},
|
||||
}
|
||||
); // 获取 JSON 对象
|
||||
) // 获取 JSON 对象
|
||||
},
|
||||
loginRules() {
|
||||
return this.loginMethod === "password"
|
||||
? this.passwordLoginRules
|
||||
: this.mobileLoginRules;
|
||||
return this.loginMethod === 'password' ? this.passwordLoginRules : this.mobileLoginRules
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler(route) {
|
||||
this.redirect = route.query && route.query.redirect;
|
||||
this.redirect = route.query && route.query.redirect
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getCode();
|
||||
this.getCookie();
|
||||
async created() {
|
||||
const origin = window.location.href
|
||||
|
||||
if (origin.indexOf('ticket') != -1) {
|
||||
this.isIws = true
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '登录中',
|
||||
})
|
||||
try {
|
||||
const res = await iwsLogin({
|
||||
ticket: origin.split('ticket=')[1].split('#/')[0] || origin.split('ticket%3D')[1].split('%26')[0],
|
||||
sysType: 0,
|
||||
})
|
||||
console.log('🚀 ~ created ~ res:', res)
|
||||
if (res.code == 200) {
|
||||
setToken(res.data.access_token)
|
||||
this.$store.commit('SET_TOKEN', res.data.access_token)
|
||||
setExpiresIn(1800)
|
||||
this.$store.commit('SET_EXPIRES_IN', 1800)
|
||||
}
|
||||
loading.close()
|
||||
// 跳转首页
|
||||
setTimeout(() => {
|
||||
this.$router.push({ path: '/' })
|
||||
}, 300)
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ created ~ error:', error)
|
||||
this.$message({
|
||||
message: '登录失败, 即将关闭页面',
|
||||
type: 'error',
|
||||
})
|
||||
loading.close()
|
||||
setTimeout(() => {
|
||||
window.close()
|
||||
}, 1500)
|
||||
}
|
||||
} else {
|
||||
this.isIws = false
|
||||
this.getCode()
|
||||
this.getCookie()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getCode() {
|
||||
getCodeImg().then((res) => {
|
||||
this.captchaEnabled =
|
||||
res.captchaEnabled !== undefined ? res.captchaEnabled : true;
|
||||
this.captchaEnabled = res.captchaEnabled !== undefined ? res.captchaEnabled : true
|
||||
if (this.captchaEnabled) {
|
||||
this.codeUrl = "data:image/gif;base64," + res.img;
|
||||
this.loginForm.uuid = res.uuid;
|
||||
this.codeUrl = 'data:image/gif;base64,' + res.img
|
||||
this.loginForm.uuid = res.uuid
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
getCookie() {
|
||||
const username = Cookies.get("username");
|
||||
const password = Cookies.get("password");
|
||||
const rememberMe = Cookies.get("rememberMe");
|
||||
this.loginForm.username = username || "";
|
||||
this.loginForm.password = password ? decrypt(password) : "";
|
||||
this.loginForm.rememberMe = rememberMe === "true";
|
||||
const username = Cookies.get('username')
|
||||
const password = Cookies.get('password')
|
||||
const rememberMe = Cookies.get('rememberMe')
|
||||
this.loginForm.username = username || ''
|
||||
this.loginForm.password = password ? decrypt(password) : ''
|
||||
this.loginForm.rememberMe = rememberMe === 'true'
|
||||
},
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
this.loading = true
|
||||
if (this.loginForm.rememberMe) {
|
||||
Cookies.set("username", this.loginForm.username, { expires: 30 });
|
||||
Cookies.set("password", encrypt(this.loginForm.password), {
|
||||
Cookies.set('username', this.loginForm.username, { expires: 30 })
|
||||
Cookies.set('password', encrypt(this.loginForm.password), {
|
||||
expires: 30,
|
||||
});
|
||||
Cookies.set("rememberMe", this.loginForm.rememberMe, {
|
||||
})
|
||||
Cookies.set('rememberMe', this.loginForm.rememberMe, {
|
||||
expires: 30,
|
||||
});
|
||||
})
|
||||
} else {
|
||||
Cookies.remove("username");
|
||||
Cookies.remove("password");
|
||||
Cookies.remove("rememberMe");
|
||||
Cookies.remove('username')
|
||||
Cookies.remove('password')
|
||||
Cookies.remove('rememberMe')
|
||||
}
|
||||
this.loginForm.loginMethod = this.loginMethod;
|
||||
this.loginForm.loginMethod = this.loginMethod
|
||||
this.$store
|
||||
.dispatch("Login", this.loginForm)
|
||||
.dispatch('Login', this.loginForm)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
console.log(res)
|
||||
if (res.code === 200) {
|
||||
if (res.isLogin) {
|
||||
this.$modal
|
||||
.confirm("账号已在其他地方登录是否继续登录!!!!")
|
||||
.confirm('账号已在其他地方登录是否继续登录!!!!')
|
||||
.then(function () {
|
||||
return this.$router.push({ path: this.redirect || "/" });
|
||||
return this.$router.push({ path: this.redirect || '/' })
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = false;
|
||||
this.loading = false
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
this.$router.push({ path: this.redirect || "/" });
|
||||
this.$router.push({ path: this.redirect || '/' })
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
if (this.captchaEnabled) this.getCode();
|
||||
});
|
||||
this.loading = false
|
||||
if (this.captchaEnabled) this.getCode()
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
IsAdmin() {
|
||||
this.loginForm.loginMethod = this.loginMethod;
|
||||
this.$store.dispatch("IsAdmin", this.loginForm).then((res) => {
|
||||
this.loginForm.loginMethod = this.loginMethod
|
||||
this.$store.dispatch('IsAdmin', this.loginForm).then((res) => {
|
||||
if (res.data) {
|
||||
this.isAdmin = res.data;
|
||||
this.$message.success("检测到您是超级管理账号,需进行手机检验");
|
||||
this.isAdmin = res.data
|
||||
this.$message.success('检测到您是超级管理账号,需进行手机检验')
|
||||
} else {
|
||||
this.handleLogin();
|
||||
this.handleLogin()
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
isLogin() {
|
||||
this.$refs.loginForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
let that = this;
|
||||
this.loginForm.loginMethod = this.loginMethod;
|
||||
this.loading = true
|
||||
let that = this
|
||||
this.loginForm.loginMethod = this.loginMethod
|
||||
this.$store
|
||||
.dispatch("IsLogin", this.loginForm)
|
||||
.dispatch('IsLogin', this.loginForm)
|
||||
.then((res) => {
|
||||
if (res.data) {
|
||||
this.$modal
|
||||
.confirm("账号已在其他地方登录是否继续登录!!!!")
|
||||
.confirm('账号已在其他地方登录是否继续登录!!!!')
|
||||
.then(function () {
|
||||
return that.handleLogin();
|
||||
return that.handleLogin()
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = false;
|
||||
this.loading = false
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
that.handleLogin();
|
||||
that.handleLogin()
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
if (this.captchaEnabled) this.getCode();
|
||||
});
|
||||
this.loading = false
|
||||
if (this.captchaEnabled) this.getCode()
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
sendAdminCode() {
|
||||
this.loginForm.mobile = this.loginForm.username;
|
||||
this.loginForm.mobile = this.loginForm.username
|
||||
this.$store
|
||||
.dispatch("GetPhoneCode", this.loginForm)
|
||||
.dispatch('GetPhoneCode', this.loginForm)
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.loginForm.phoneUuid = res.data;
|
||||
this.$message.success("验证码发送成功");
|
||||
this.isSendingCode = true;
|
||||
this.countdown = 60;
|
||||
this.loginForm.phoneUuid = res.data
|
||||
this.$message.success('验证码发送成功')
|
||||
this.isSendingCode = true
|
||||
this.countdown = 60
|
||||
const timer = setInterval(() => {
|
||||
this.countdown -= 1;
|
||||
this.countdown -= 1
|
||||
if (this.countdown <= 0) {
|
||||
clearInterval(timer);
|
||||
this.isSendingCode = false;
|
||||
clearInterval(timer)
|
||||
this.isSendingCode = false
|
||||
}
|
||||
}, 1000);
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.loading = false
|
||||
// 如果启用了验证码,则重新获取验证码
|
||||
if (this.captchaEnabled) {
|
||||
this.getCode();
|
||||
this.getCode()
|
||||
}
|
||||
// 其他失败处理逻辑
|
||||
this.isSendingCode = false;
|
||||
this.countdown = 0;
|
||||
});
|
||||
this.isSendingCode = false
|
||||
this.countdown = 0
|
||||
})
|
||||
},
|
||||
sendCode() {
|
||||
if (this.captchaEnabled ? !this.loginForm.code : false) {
|
||||
this.$message.error("请先填写验证码");
|
||||
return;
|
||||
this.$message.error('请先填写验证码')
|
||||
return
|
||||
}
|
||||
if (!this.loginForm.mobile) {
|
||||
this.$message.error(
|
||||
"请先填写" + this.config.loginConfig.phoneCode
|
||||
? "手机号"
|
||||
: "/" + this.config.loginConfig.emailCode
|
||||
? "邮箱"
|
||||
: ""
|
||||
);
|
||||
return;
|
||||
'请先填写' + this.config.loginConfig.phoneCode
|
||||
? '手机号'
|
||||
: '/' + this.config.loginConfig.emailCode
|
||||
? '邮箱'
|
||||
: '',
|
||||
)
|
||||
return
|
||||
}
|
||||
this.$store
|
||||
.dispatch("GetPhoneCode", this.loginForm)
|
||||
.dispatch('GetPhoneCode', this.loginForm)
|
||||
.then(() => {
|
||||
this.isSendingCode = true;
|
||||
this.countdown = 60;
|
||||
this.isSendingCode = true
|
||||
this.countdown = 60
|
||||
const timer = setInterval(() => {
|
||||
this.countdown -= 1;
|
||||
this.countdown -= 1
|
||||
if (this.countdown <= 0) {
|
||||
clearInterval(timer);
|
||||
this.isSendingCode = false;
|
||||
clearInterval(timer)
|
||||
this.isSendingCode = false
|
||||
}
|
||||
}, 1000);
|
||||
}, 1000)
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.loading = false
|
||||
// 如果启用了验证码,则重新获取验证码
|
||||
if (this.captchaEnabled) {
|
||||
this.getCode();
|
||||
this.getCode()
|
||||
}
|
||||
// 其他失败处理逻辑
|
||||
this.isSendingCode = false;
|
||||
this.countdown = 0;
|
||||
});
|
||||
this.isSendingCode = false
|
||||
this.countdown = 0
|
||||
})
|
||||
},
|
||||
toggleLoginMethod() {
|
||||
this.loginMethod =
|
||||
this.loginMethod === "password" ? "mobile" : "password";
|
||||
this.loginForm.username = "";
|
||||
this.loginForm.password = "";
|
||||
this.loginForm.code = "";
|
||||
this.loginForm.verificationCode = "";
|
||||
this.loginForm.loginMethod = "";
|
||||
this.isAdmin = false;
|
||||
this.getCode();
|
||||
this.loginMethod = this.loginMethod === 'password' ? 'mobile' : 'password'
|
||||
this.loginForm.username = ''
|
||||
this.loginForm.password = ''
|
||||
this.loginForm.code = ''
|
||||
this.loginForm.verificationCode = ''
|
||||
this.loginForm.loginMethod = ''
|
||||
this.isAdmin = false
|
||||
this.getCode()
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
|
@ -498,7 +479,7 @@ export default {
|
|||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
background-image: url("../assets/images/bg.png");
|
||||
background-image: url('../assets/images/bg.png');
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
|
|
@ -592,7 +573,7 @@ export default {
|
|||
|
||||
.login-divider::before,
|
||||
.login-divider::after {
|
||||
content: "";
|
||||
content: '';
|
||||
flex: 1;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -684,7 +684,7 @@
|
|||
}
|
||||
|
||||
this.uploadKey = Date.now();
|
||||
this.$message.success('提交成功!');
|
||||
//this.$message.success('提交成功!');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('提交失败:', error);
|
||||
|
|
@ -732,7 +732,7 @@
|
|||
this.businessLicenseFileList.push(objTwo);
|
||||
})
|
||||
} else {
|
||||
this.$modal.msgError(res.msg);
|
||||
//this.$modal.msgError(res.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
// 打开大屏
|
||||
window.open('/screen/cityScreen', '_blank')
|
||||
window.open('iws/glweb/#/screen/cityScreen', '_blank')
|
||||
// 关闭当前标签页
|
||||
this.$tab.closePage()
|
||||
},
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
// 打开大屏
|
||||
window.open('/screen/cityWidescreen', '_blank')
|
||||
window.open('iws/glweb/#/screen/cityWidescreen', '_blank')
|
||||
// 关闭当前标签页
|
||||
this.$tab.closePage()
|
||||
},
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
// 打开大屏
|
||||
window.open('/screen/gwScreen', '_blank')
|
||||
window.open('iws/glweb/#/screen/gwScreen', '_blank')
|
||||
// 关闭当前标签页
|
||||
this.$tab.closePage()
|
||||
},
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
// 打开大屏
|
||||
window.open('/screen/wsScreenWidescreen', '_blank')
|
||||
window.open('iws/glweb/#/screen/wsScreenWidescreen', '_blank')
|
||||
// 关闭当前标签页
|
||||
this.$tab.closePage()
|
||||
},
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
// 打开大屏
|
||||
window.open('/screen/shareScreen', '_blank')
|
||||
window.open('iws/glweb/#/screen/shareScreen', '_blank')
|
||||
// 关闭当前标签页
|
||||
this.$tab.closePage()
|
||||
},
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
// 打开大屏
|
||||
window.open('/screen/wsScreen', '_blank')
|
||||
window.open('iws/glweb/#/screen/wsScreen', '_blank')
|
||||
// 关闭当前标签页
|
||||
this.$tab.closePage()
|
||||
},
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@
|
|||
<el-row>
|
||||
<el-form-item label="审批状态" prop="status">
|
||||
<el-select clearable style="width: 200px" placeholder="请选择审批状态" v-model="queryParams.status">
|
||||
<el-option label="待审批" value="0" />
|
||||
<el-option label="已审批" value="1" />
|
||||
<el-option label="草稿" value="3" />
|
||||
<el-option label="待审批" value="0"/>
|
||||
<el-option label="已审批" value="1"/>
|
||||
<el-option label="草稿" value="3"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="name" label="装备名称">
|
||||
<el-input clearable style="width: 200px" placeholder="请输入内容" v-model.trim="queryParams.name" />
|
||||
<el-input clearable style="width: 200px" placeholder="请输入内容" v-model.trim="queryParams.name"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="specificationModel" label="规格型号">
|
||||
|
|
@ -26,12 +26,12 @@
|
|||
</el-form-item>
|
||||
|
||||
<el-form-item prop="originalCode" label="装备原始编码">
|
||||
<el-input clearable style="width: 200px" placeholder="请输入内容" v-model.trim="queryParams.originalCode" />
|
||||
<el-input clearable style="width: 200px" placeholder="请输入内容" v-model.trim="queryParams.originalCode"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="manufacturerId" label="生产厂家">
|
||||
<el-select v-model="queryParams.manufacturerId" placeholder="请选择生产厂家" clearable style="width: 200px">
|
||||
<el-option v-for="item in manufacturerList" :key="item.id" :label="item.label" :value="item.id" />
|
||||
<el-option v-for="item in manufacturerList" :key="item.id" :label="item.label" :value="item.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
|
@ -68,12 +68,12 @@
|
|||
</el-form-item>
|
||||
|
||||
<el-form-item style="float: right">
|
||||
<el-button icon="el-icon-search" type="primary" @click="queryTableList" size="mini"> 查询 </el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetTableList" size="mini"> 重置 </el-button>
|
||||
<el-button icon="el-icon-search" type="primary" @click="queryTableList" size="mini"> 查询</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetTableList" size="mini"> 重置</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24" style="text-align: right"> </el-col>
|
||||
<el-col :span="24" style="text-align: right"></el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
<el-button type="primary" size="mini" @click="equipmentDeployment" v-show="!isAddVisible">
|
||||
新增装备
|
||||
</el-button>
|
||||
<el-button type="primary" size="mini" @click="handleImport" v-show="!isAddVisible"> 批量导入 </el-button>
|
||||
<el-button type="primary" size="mini" @click="handleImport" v-show="!isAddVisible"> 批量导入</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
|
|
@ -154,7 +154,7 @@
|
|||
@change="(val) => majorChange(val, row)"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option v-for="item in row.majorList" :key="item.value" :label="item.label" :value="item.value" />
|
||||
<el-option v-for="item in row.majorList" :key="item.value" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -196,7 +196,7 @@
|
|||
<el-table-column prop="name" label="装备名称" show-overflow-tooltip align="center" min-width="200px">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="!row.isNew">{{ row.name }}</span>
|
||||
<el-input v-else maxlength="50" v-model="row.name" placeholder="请输入装备名称" clearable />
|
||||
<el-input v-else maxlength="50" v-model="row.name" placeholder="请输入装备名称" clearable/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
|
@ -208,7 +208,7 @@
|
|||
>
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="!row.isNew">{{ row.specificationModel }}</span>
|
||||
<el-input v-else maxlength="50" v-model="row.specificationModel" placeholder="请输入规格型号" clearable />
|
||||
<el-input v-else maxlength="50" v-model="row.specificationModel" placeholder="请输入规格型号" clearable/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
|
@ -220,7 +220,7 @@
|
|||
>
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="!row.isNew">{{ row.originalCode }}</span>
|
||||
<el-input v-else maxlength="50" v-model="row.originalCode" placeholder="请输入装备原始编码" clearable />
|
||||
<el-input v-else maxlength="50" v-model="row.originalCode" placeholder="请输入装备原始编码" clearable/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unit" label="计量单位" show-overflow-tooltip align="center" min-width="200px">
|
||||
|
|
@ -240,7 +240,7 @@
|
|||
<template v-slot="{ row }">
|
||||
<span v-if="!row.isNew">{{ row.manufacturer }}</span>
|
||||
<el-select v-else v-model="row.manufacturerId" placeholder="请选择生产厂家" clearable style="width: 100%">
|
||||
<el-option v-for="item in manufacturerList" :key="item.id" :label="item.label" :value="item.id" />
|
||||
<el-option v-for="item in manufacturerList" :key="item.id" :label="item.label" :value="item.id"/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -410,7 +410,7 @@
|
|||
row.propertyVoList[Math.ceil(index / 2)].mustHave != 0
|
||||
"
|
||||
style="color: red"
|
||||
>{{ getFeatureValue(row, item.prop) }}</span
|
||||
>{{ getFeatureValue(row, item.prop) }}</span
|
||||
>
|
||||
<span v-else>{{ getFeatureValue(row, item.prop) }}</span>
|
||||
</template>
|
||||
|
|
@ -507,7 +507,7 @@
|
|||
<!-- 弹框 -->
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="40%">
|
||||
<el-table :data="dialogList" fit highlight-current-row style="width: 100%" height="546">
|
||||
<el-table-column type="index" width="55" label="序号" align="center" />
|
||||
<el-table-column type="index" width="55" label="序号" align="center"/>
|
||||
<el-table-column label="附件名称" prop="fileName" align="center">
|
||||
<!-- 插槽 -->
|
||||
<template v-slot="{ row }">
|
||||
|
|
@ -542,7 +542,7 @@
|
|||
:underline="false"
|
||||
style="font-size: 12px; vertical-align: baseline"
|
||||
@click="importTemplate2"
|
||||
>下载模板
|
||||
>下载模板
|
||||
</el-link>
|
||||
</div>
|
||||
</el-upload>
|
||||
|
|
@ -557,7 +557,7 @@
|
|||
:limit="1"
|
||||
accept=".xlsx, .xls"
|
||||
:headers="upload.headers"
|
||||
:action="upload.url + '?orderId=' + orderId"
|
||||
:action="upload.url + '?orderId=' + queryParams.orderId"
|
||||
:disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress"
|
||||
:on-success="handleFileSuccess"
|
||||
|
|
@ -573,7 +573,7 @@
|
|||
:underline="false"
|
||||
style="font-size: 12px; vertical-align: baseline"
|
||||
@click="importTemplate"
|
||||
>下载模板
|
||||
>下载模板
|
||||
</el-link>
|
||||
</div>
|
||||
</el-upload>
|
||||
|
|
@ -585,7 +585,7 @@
|
|||
<!-- 报告管理 -->
|
||||
<el-dialog title="报告管理" :visible.sync="openReport" width="900px" append-to-body>
|
||||
<el-table :data="fileDataList" width="100%" height="350px">
|
||||
<el-table-column label="序号" type="index" width="55" align="center" />
|
||||
<el-table-column label="序号" type="index" width="55" align="center"/>
|
||||
<el-table-column label="报告类型" align="center" prop="dictLabel" :show-overflow-tooltip="true">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.type == 1 || row.type == 2 || row.type == 3">
|
||||
|
|
@ -598,8 +598,10 @@
|
|||
<el-table-column label="操作" align="center" width="100">
|
||||
<template slot-scope="{ row }">
|
||||
<div style="display: flex; align-items: center; justify-content: center">
|
||||
<el-button v-if="currentRow.isNew" size="mini" type="text" @click="handleFileUpload(currentRow, row.type)"
|
||||
>上传</el-button
|
||||
<el-button v-if="currentRow.isNew" size="mini" type="text"
|
||||
@click="handleFileUpload(currentRow, row.type)"
|
||||
>上传
|
||||
</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="
|
||||
|
|
@ -619,7 +621,7 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<AddEquip ref="addEquipRef" @handleSubmit="handleSubmit" @getList="getList" @replaceRoute="replaceRoute" />
|
||||
<AddEquip ref="addEquipRef" @handleSubmit="handleSubmit" @getList="getList" @replaceRoute="replaceRoute"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -640,7 +642,7 @@ import {
|
|||
firstLevel,
|
||||
secondAndThirdLevel,
|
||||
fourthToSixthLevel,
|
||||
getEquipmentPropertyTypeApi,
|
||||
getEquipmentPropertyTypeApi
|
||||
} from '@/api/EquipmentEntryApply'
|
||||
import { getManufacturerSelectApi } from '@/api/EquipmentLedger/index.js'
|
||||
import { getToken } from '@/utils/auth'
|
||||
|
|
@ -655,6 +657,8 @@ export default {
|
|||
console.log('🚀 ~ this.$route:', this.$route)
|
||||
this.orderId = this.$route.query && this.$route.query.orderId
|
||||
console.log('🚀 ~ this.orderId:', this.orderId)
|
||||
this.routerParams = this.$route.query
|
||||
console.log('🚀 ~ this.routerParams:', this.routerParams)
|
||||
this.isAddVisible = this.$route.query.isAddVisible && JSON.parse(this.$route.query.isAddVisible)
|
||||
this.isApprovalVisible = this.$route.query.isApprovalVisible && JSON.parse(this.$route.query.isApprovalVisible)
|
||||
if (!this.orderId) {
|
||||
|
|
@ -695,7 +699,7 @@ export default {
|
|||
headers: { Authorization: 'Bearer ' + getToken() },
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + '/material-mall/order/importData',
|
||||
url2: process.env.VUE_APP_BASE_API + '/material-mall/order/upload-multi',
|
||||
url2: process.env.VUE_APP_BASE_API + '/material-mall/order/upload-multi'
|
||||
},
|
||||
queryParams: {
|
||||
orderCreateUser: '',
|
||||
|
|
@ -710,12 +714,12 @@ export default {
|
|||
maxOriginalValue: '',
|
||||
orderId: '',
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 10
|
||||
},
|
||||
// 用于存储上一次的有效值,避免循环验证
|
||||
lastValidValues: {
|
||||
minOriginalValue: '',
|
||||
maxOriginalValue: '',
|
||||
maxOriginalValue: ''
|
||||
},
|
||||
currentRow: null,
|
||||
uploadType: 1, // 1:装备外观,2:合格证,3:定期检验报告,4:采购发票
|
||||
|
|
@ -732,7 +736,7 @@ export default {
|
|||
// 示例字段,可根据实际需求修改
|
||||
equipmentName: '',
|
||||
model: '',
|
||||
quantity: 1,
|
||||
quantity: 1
|
||||
},
|
||||
isViewMode: false, // 添加查看模式标识
|
||||
pageTitle: '',
|
||||
|
|
@ -755,7 +759,7 @@ export default {
|
|||
{ key: 40, label: `特征项8`, prop: 'featureItem8', visible: true },
|
||||
{ key: 41, label: `特征值8`, prop: 'featureValue8', visible: true },
|
||||
{ key: 42, label: `特征项9`, prop: 'featureItem9', visible: true },
|
||||
{ key: 43, label: `特征值9`, prop: 'featureValue9', visible: true },
|
||||
{ key: 43, label: `特征值9`, prop: 'featureValue9', visible: true }
|
||||
],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
|
|
@ -765,9 +769,9 @@ export default {
|
|||
{ dictLabel: '装备外观', type: '1' },
|
||||
{ dictLabel: '合格证', type: '2' },
|
||||
{ dictLabel: '定期检测报告', type: '3' },
|
||||
{ dictLabel: '采购发票', type: '4' },
|
||||
{ dictLabel: '采购发票', type: '4' }
|
||||
],
|
||||
routerParams: null,
|
||||
routerParams: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -775,13 +779,9 @@ export default {
|
|||
if (val) {
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.routerParams = this.$route.query
|
||||
console.log('🚀 ~ this.routerParams:', this.routerParams)
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.getManufacturerSelectList()
|
||||
},
|
||||
|
|
@ -908,11 +908,11 @@ export default {
|
|||
this.upload.isUploading = false
|
||||
this.$refs.upload.clearFiles()
|
||||
this.$alert(
|
||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||
response.msg +
|
||||
'</div>',
|
||||
'<div style=\'overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;\'>' +
|
||||
response.msg +
|
||||
'</div>',
|
||||
'导入结果',
|
||||
{ dangerouslyUseHTMLString: true },
|
||||
{ dangerouslyUseHTMLString: true }
|
||||
)
|
||||
// 【修复1】仅在接口返回有效orderId时才更新,否则保留原来的orderId
|
||||
if (response.data) {
|
||||
|
|
@ -925,8 +925,8 @@ export default {
|
|||
applyId: routerParams.applyId || '',
|
||||
orderId: response.data || routerParams.orderId || '',
|
||||
isAddVisible: routerParams.isAddVisible || '',
|
||||
isApprovalVisible: routerParams.isApprovalVisible || '',
|
||||
},
|
||||
isApprovalVisible: routerParams.isApprovalVisible || ''
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
console.log('🚀 ~ 导入成功跳转完成')
|
||||
|
|
@ -943,11 +943,11 @@ export default {
|
|||
this.upload.isUploading = false
|
||||
this.$refs.upload2.clearFiles()
|
||||
this.$alert(
|
||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||
response.msg +
|
||||
'</div>',
|
||||
'<div style=\'overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;\'>' +
|
||||
response.msg +
|
||||
'</div>',
|
||||
'导入结果',
|
||||
{ dangerouslyUseHTMLString: true },
|
||||
{ dangerouslyUseHTMLString: true }
|
||||
)
|
||||
// 【修复3】不管是否成功,都直接刷新列表,使用当前已有的orderId
|
||||
setTimeout(() => {
|
||||
|
|
@ -980,7 +980,7 @@ export default {
|
|||
if (res.code === 200) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '操作成功',
|
||||
message: '操作成功'
|
||||
})
|
||||
this.getList()
|
||||
}
|
||||
|
|
@ -1030,7 +1030,7 @@ export default {
|
|||
this.$confirm('是否确定删除?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
if (row.maId) {
|
||||
|
|
@ -1039,7 +1039,7 @@ export default {
|
|||
this.tableData.splice(index, 1)
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功',
|
||||
message: '删除成功'
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
@ -1047,12 +1047,13 @@ export default {
|
|||
if (res.code === 200) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功',
|
||||
message: '删除成功'
|
||||
})
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(() => {
|
||||
})
|
||||
},
|
||||
// 重置表格查询
|
||||
resetTableList() {
|
||||
|
|
@ -1072,7 +1073,7 @@ export default {
|
|||
if (!item.appearanceImages?.length) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '请上传装备外观附件',
|
||||
message: '请上传装备外观附件'
|
||||
})
|
||||
hasMissing = true
|
||||
break
|
||||
|
|
@ -1081,7 +1082,7 @@ export default {
|
|||
if (!item.certificates?.length) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '请上传装备合格证附件',
|
||||
message: '请上传装备合格证附件'
|
||||
})
|
||||
hasMissing = true
|
||||
break
|
||||
|
|
@ -1090,7 +1091,7 @@ export default {
|
|||
if (!item.inspectionReports?.length) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '请上传装备检验报告附件',
|
||||
message: '请上传装备检验报告附件'
|
||||
})
|
||||
hasMissing = true
|
||||
break
|
||||
|
|
@ -1118,13 +1119,13 @@ export default {
|
|||
applyId: routerParams.applyId || '',
|
||||
orderId: routerParams.orderId || '',
|
||||
isAddVisible: routerParams.isAddVisible || '',
|
||||
isApprovalVisible: routerParams.isApprovalVisible || '',
|
||||
},
|
||||
isApprovalVisible: routerParams.isApprovalVisible || ''
|
||||
}
|
||||
})
|
||||
}
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '操作成功',
|
||||
message: '操作成功'
|
||||
})
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ error:', error)
|
||||
|
|
@ -1140,7 +1141,7 @@ export default {
|
|||
// 假设“录入单号”是第1列(index=1)
|
||||
return {
|
||||
rowspan: 1,
|
||||
colspan: 1,
|
||||
colspan: 1
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1164,13 +1165,13 @@ export default {
|
|||
// 第一次出现,合并 count 行
|
||||
return {
|
||||
rowspan: count,
|
||||
colspan: 1,
|
||||
colspan: 1
|
||||
}
|
||||
} else {
|
||||
// 不是第一次,隐藏该单元格
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0,
|
||||
colspan: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -1291,7 +1292,7 @@ export default {
|
|||
const parts = item.split('/')
|
||||
return {
|
||||
fileName: parts[parts.length - 1],
|
||||
fileUrl: item,
|
||||
fileUrl: item
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
@ -1308,9 +1309,9 @@ export default {
|
|||
},
|
||||
importTemplate2() {
|
||||
this.download(
|
||||
`/material-mall/order/zip?orderId=${this.orderId}`,
|
||||
`/material-mall/order/zip?orderId=${this.queryParams.orderId}`,
|
||||
{},
|
||||
`批量导入图片模板_${new Date().getTime()}.zip`,
|
||||
`批量导入图片模板_${new Date().getTime()}.zip`
|
||||
)
|
||||
},
|
||||
async addList() {
|
||||
|
|
@ -1325,8 +1326,8 @@ export default {
|
|||
applyId: routerParams.applyId || '',
|
||||
orderId: result.data.id,
|
||||
isAddVisible: this.isAddVisible,
|
||||
isApprovalVisible: this.isApprovalVisible,
|
||||
},
|
||||
isApprovalVisible: this.isApprovalVisible
|
||||
}
|
||||
})
|
||||
}
|
||||
const newRow = {
|
||||
|
|
@ -1360,7 +1361,7 @@ export default {
|
|||
fileList1: null, // 装备图片
|
||||
fileList2: null, // 合格证
|
||||
fileList3: null, // 检测证书
|
||||
fileList4: null, // 采购发票
|
||||
fileList4: null // 采购发票
|
||||
}
|
||||
await this.getFirstLevel(newRow)
|
||||
this.tableData.unshift(newRow)
|
||||
|
|
@ -1378,7 +1379,7 @@ export default {
|
|||
list.forEach((item) => {
|
||||
map[item.value] = {
|
||||
value: item.value.toString(),
|
||||
label: item.label,
|
||||
label: item.label
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -1525,7 +1526,7 @@ export default {
|
|||
// 判断特征项是否填写
|
||||
if (row.propertyVoList && row.propertyVoList.length > 0) {
|
||||
const unfilledIndex = row.propertyVoList.findIndex(
|
||||
(item) => (!item.propertyValue || item.propertyValue === '') && item.mustHave != '0',
|
||||
(item) => (!item.propertyValue || item.propertyValue === '') && item.mustHave != '0'
|
||||
)
|
||||
|
||||
if (unfilledIndex !== -1) {
|
||||
|
|
@ -1539,8 +1540,8 @@ export default {
|
|||
this.$confirm('是否确定保存?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}).then(async () => {
|
||||
type: 'warning'
|
||||
}).then(async() => {
|
||||
if (this.isSubmit) return
|
||||
this.isSubmit = true
|
||||
const loading = this.$loading()
|
||||
|
|
@ -1571,7 +1572,7 @@ export default {
|
|||
return data.split(',').map((item) => {
|
||||
return {
|
||||
label: item,
|
||||
value: item,
|
||||
value: item
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
@ -1584,11 +1585,11 @@ export default {
|
|||
applyId: routerParams.applyId || '',
|
||||
orderId,
|
||||
isAddVisible: routerParams.isAddVisible,
|
||||
isApprovalVisible: routerParams.isApprovalVisible,
|
||||
},
|
||||
isApprovalVisible: routerParams.isApprovalVisible
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
@ -1700,6 +1701,7 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .el-input-number.is-without-controls .el-input__inner {
|
||||
text-align: left;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue