Merge remote-tracking branch 'origin/dev' into dev

dev
huangyuxuan 2025-03-06 18:37:59 +08:00
commit 69352c0116
7 changed files with 43 additions and 7 deletions

View File

@ -46,7 +46,11 @@ router.beforeEach((to, from, next) => {
if (to.path == `/login` || to.path == '/apiMonitoringCenter' || to.path == '/apiMajorHazardSources') { if (to.path == `/login` || to.path == '/apiMonitoringCenter' || to.path == '/apiMajorHazardSources') {
next() next()
} else { } else {
next(`/login`) if (to.path == '/map' && to.query.userId) {
next()
} else {
next(`/login`)
}
} }
} }
}) })

View File

@ -311,7 +311,7 @@ export default {
} }
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
if (this.$parent.FIRE_DEVICE_ID === '') { if (this.$parent.FIRE_DEVICE_ID === '' || this.$parent.FIRE_DEVICE_ID === undefined) {
this.handleAdd() this.handleAdd()
} else { } else {
this.handleUpdate() this.handleUpdate()

View File

@ -1614,6 +1614,10 @@ export default {
handleClickRightTools(index) { handleClickRightTools(index) {
if (this.rightOptionsList[index].check !== '') this.rightOptionsList[index].check = !this.rightOptionsList[index].check if (this.rightOptionsList[index].check !== '') this.rightOptionsList[index].check = !this.rightOptionsList[index].check
if (index === 0) { if (index === 0) {
if (this.$route.query.userId) {
window.close()
return
}
if (this.gangkouActive === '00004') { if (this.gangkouActive === '00004') {
if (this.timer) { if (this.timer) {
clearInterval(this.timer) clearInterval(this.timer)
@ -2922,10 +2926,28 @@ export default {
this.corpInfo.CORP_INFO_ID = data.info.CORP_INFO_ID this.corpInfo.CORP_INFO_ID = data.info.CORP_INFO_ID
this.corpInfo.latitude = data.info.latitude this.corpInfo.latitude = data.info.latitude
this.corpInfo.longitude = data.info.longitude this.corpInfo.longitude = data.info.longitude
this.initUser()
this.initMap() this.initMap()
}).catch((e) => { }).catch((e) => {
console.log(e) console.log(e)
}) })
},
initUser() {
const { userId } = this.$route.query
if (!userId) return
requestFN(
'/admin/v2/login',
{ userId }
).then((res) => {
console.log(res)
if (res.result !== 'success') {
alert('登录失败')
window.close()
}
}).catch((e) => {
alert('登录失败')
window.close()
})
} }
} }
} }

View File

@ -146,7 +146,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="12">
<el-form-item <el-form-item
:label="'人员' + (index + 1)" :label="'人员' + (index + 1)"
:prop="'coverpeople.' + index + '.USER_ID'" :prop="'coverpeople.' + index + '.USER_ID'"
@ -162,6 +162,11 @@
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="岗位名称">
<el-input v-model="item.NICKNAME" placeholder="请输入"/>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
@ -297,6 +302,7 @@ export default {
DEPARTMENT_ID: null, DEPARTMENT_ID: null,
POST_ID: '', POST_ID: '',
USER_ID: [], USER_ID: [],
NICKNAME: '',
id: Math.random() id: Math.random()
} }
], ],
@ -379,6 +385,7 @@ export default {
DEPARTMENT_ID: data.coverpeople[i].DEPARTMENT_ID, DEPARTMENT_ID: data.coverpeople[i].DEPARTMENT_ID,
POST_ID: data.coverpeople[i].POST_ID, POST_ID: data.coverpeople[i].POST_ID,
USER_ID: [], USER_ID: [],
NICKNAME: data.coverpeople[i].NICKNAME,
id: data.coverpeople[i].PROMISEPEOPLE_ID id: data.coverpeople[i].PROMISEPEOPLE_ID
}) })
for (let j = 0; j < this.form.coverpeople.length; j++) { for (let j = 0; j < this.form.coverpeople.length; j++) {
@ -557,7 +564,7 @@ export default {
{ DEPARTMENT_ID: item.DEPARTMENT_ID, POST_ID: item.POST_ID, USER_ID: item.USER_ID } { DEPARTMENT_ID: item.DEPARTMENT_ID, POST_ID: item.POST_ID, USER_ID: item.USER_ID }
)) ))
const coverpeople = this.form.coverpeople.map(item => ( const coverpeople = this.form.coverpeople.map(item => (
{ DEPARTMENT_ID: item.DEPARTMENT_ID, POST_ID: item.POST_ID, USER_ID: item.USER_ID } { DEPARTMENT_ID: item.DEPARTMENT_ID, POST_ID: item.POST_ID, USER_ID: item.USER_ID, NICKNAME: item.NICKNAME }
)) ))
let url let url
if (this.$parent.PROMISE_ID) { if (this.$parent.PROMISE_ID) {

View File

@ -113,7 +113,7 @@ export default {
).then((data) => { ).then((data) => {
const DETAIL = data.COLLATERAL.map(item => ({ value: item.COLLATERAL, id: item.PROMISEDETAIL_ID })) const DETAIL = data.COLLATERAL.map(item => ({ value: item.COLLATERAL, id: item.PROMISEDETAIL_ID }))
this.dialog.visible = true this.dialog.visible = true
this.dialog.data = { ...data.varList, DETAIL, FILEPATH: data.ISGN.FILEPATH, SIGNTIME: data.ISGN.SIGNTIME, COVERPEOPLE: data.COVERPEOPLE[0].USERNAME } this.dialog.data = { ...data.varList, DETAIL, FILEPATH: data.ISGN.FILEPATH, SIGNTIME: data.ISGN.SIGNTIME, COVERPEOPLE: data.COVERPEOPLE[0].USERNAME, NICKNAME: data.COVERPEOPLE[0].NICKNAME }
}).catch((e) => { }).catch((e) => {
}) })
}, },

View File

@ -9,7 +9,7 @@
</div> </div>
</div> </div>
<h1 class="title">{{ dialogData.TYPE === '0' ? '安全生产承诺书' : '安全生产责任状' }}</h1> <h1 class="title">{{ dialogData.TYPE === '0' ? '安全生产承诺书' : '安全生产责任状' }}</h1>
<div v-if="dialogData.TYPE === '0'">{{ dialogData.COVERPEOPLE }}</div> <div v-if="dialogData.TYPE === '0'">{{ dialogData.COVERPEOPLE }}{{ dialogData.NICKNAME }}</div>
<div class="text">{{ dialogData.TEXT }}</div> <div class="text">{{ dialogData.TEXT }}</div>
<div class="collateral"> <div class="collateral">
<div v-for="(item,index) in dialogData.DETAIL" :key="index" class="item"> <div v-for="(item,index) in dialogData.DETAIL" :key="index" class="item">

View File

@ -39,6 +39,8 @@
<td class="trwidth">{{ item.POSTNAME }}</td> <td class="trwidth">{{ item.POSTNAME }}</td>
<td class="bbg">{{ '人员' + (index + 1) }}</td> <td class="bbg">{{ '人员' + (index + 1) }}</td>
<td class="trwidth">{{ item.USERNAME && item.USERNAME.join('、') }}</td> <td class="trwidth">{{ item.USERNAME && item.USERNAME.join('、') }}</td>
<td class="bbg">{{ '岗位名称' + (index + 1) }}</td>
<td class="trwidth">{{ item.NICKNAME }}</td>
</tr> </tr>
</table> </table>
<el-divider content-position="left">承诺内容</el-divider> <el-divider content-position="left">承诺内容</el-divider>
@ -119,6 +121,7 @@ export default {
DEPTNAME: data.coverpeople[i].DEPTNAME, DEPTNAME: data.coverpeople[i].DEPTNAME,
POST_ID: data.coverpeople[i].POST_ID, POST_ID: data.coverpeople[i].POST_ID,
POSTNAME: data.coverpeople[i].POSTNAME, POSTNAME: data.coverpeople[i].POSTNAME,
NICKNAME: data.coverpeople[i].NICKNAME,
USER_ID: [], USER_ID: [],
USERNAME: [], USERNAME: [],
id: data.coverpeople[i].PROMISEPEOPLE_ID id: data.coverpeople[i].PROMISEPEOPLE_ID
@ -135,7 +138,7 @@ export default {
}, },
goView() { goView() {
this.dialog.visible = true this.dialog.visible = true
this.dialog.data = { ...this.form, DETAIL: this.form.DETAIL, FILEPATH: '', SIGNTIME: '', COVERPEOPLE: this.form.coverpeople[0].USERNAME[0] } this.dialog.data = { ...this.form, DETAIL: this.form.DETAIL, FILEPATH: '', SIGNTIME: '', COVERPEOPLE: this.form.coverpeople[0].USERNAME[0], NICKNAME: this.form.coverpeople[0].NICKNAME }
}, },
goBack() { goBack() {
this.$parent.activeName = 'List' this.$parent.activeName = 'List'