Compare commits

..

5 Commits

4 changed files with 161 additions and 16 deletions

View File

@ -0,0 +1,145 @@
<!--
* @Author: hisense.guoyue
* @LastEditors: hisense.guoyue
* @LastEditTime: 2022-09-21 10:37:29
* @Description: 设备审批
-->
<template>
<!-- @selection-change="dataListSelectionChangeHandle" -->
<!-- @sort-change="dataListSortChangeHandle" -->
<el-card shadow="never" class="aui-card--fill" style="position:relative">
<div class="mod-activiti__process">
<el-table v-loading="dataListLoading" :data="dataList" border style="width: 100%">
<el-table-column prop="title" label="申请标题" header-align="center" align="center"></el-table-column>
<el-table-column prop="name" label="申请人信息" header-align="center" align="center"></el-table-column>
<el-table-column prop="state" label="审批状态" header-align="center" align="center">
<template slot-scope="scope">
<span>{{wrjStateObj[scope.row.state]}}</span>
</template>
</el-table-column>
<el-table-column prop="phone" label="电话" header-align="center" align="center"></el-table-column>
<el-table-column prop="dept" label="单位" header-align="center" align="center"></el-table-column>
<el-table-column prop="applicationSystem" label="应用系统" header-align="center" align="center">
</el-table-column>
<el-table-column label="应用领域" header-align="center" align="center">
<template slot-scope="scope" v-if="scope.row.applicationArea">
<span class="area-text" v-for="(x,i) in JSON.parse(scope.row.applicationArea)"
:key="i">{{x}}</span>
</template>
</el-table-column>
<el-table-column label="需求依据" header-align="center" align="center" width="200">
<template slot-scope="scope">
<el-tooltip placement="top-start">
<div class="tooltip-box" slot="content">{{(scope.row && scope.row.demand)}}</div>
<span class="demand-text">{{
(scope.row && scope.row.demand)
}}</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="taskHandle(scope.row)">审批</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination :current-page="page" :page-sizes="[10, 20, 50, 100]" :page-size="limit" :total="total"
layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
</div>
<el-dialog title="审批" :visible.sync="centerDialogVisible" width="30%" center>
<el-form ref="form" :model="form" label-width="80px">
<el-form-item label="审批意见">
<el-input type="textarea" v-model="form.auditViem" placeholder="请输入审批意见"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="through(3)">不通过</el-button>
<el-button type="primary" @click="through(2)">通过</el-button>
</span>
</el-dialog>
</el-card>
</template>
<script>
import bus from '@/views/bus.js'
import mixinViewModule from '@/mixins/view-module'
import processModule from '@/mixins/process-module'
export default {
mixins: [mixinViewModule, processModule],
data() {
return {
mixinViewModuleOptions: {
getDataListURL: '/deviceApply/auditPage',
getDataListIsPage: true,
activatedIsNeed: true,
deleteIsBatch: true,
deleteIsBatchKey: 'deploymentId'
},
centerDialogVisible: false,
form: {
auditViem: ''
},
rowData: {},
wrjStateObj: {
0: '待审批',
1: '未申请',
2: '通过',
3: '未通过'
}
}
},
methods: {
taskHandle(row) {
this.rowData = row;
this.centerDialogVisible = true
},
through(state) {
// 2- 3-
this.handlePut(state)
},
handlePut(state) {
this.$http.put(`/deviceApply`, {
...this.rowData,
state: state,
...this.form
}).then(({ data: res }) => {
console.log('res------------>', res);
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.centerDialogVisible = false
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.query()
}
})
}).catch((err) => {
console.log('err------------>', err);
})
}
},
}
</script>
<style scoped>
.demand-text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.area-text {
padding: 0 4px;
}
.tooltip-box {
width: 400px;
}
</style>

View File

@ -507,8 +507,8 @@ else if (newLocation === 'xihaian') {
// { name: '', key: 'mapTest' },
// { name: '', key: 'houtaiguanli' },
{ name: '赋能案例', key: 'assignCase' },
{ name: '融合服务', key: 'integrationServices' },
{ name: 'CIM专区', key: 'cimSpecialArea' },
// { name: '', key: 'integrationServices' },
// { name: 'CIM', key: 'cimSpecialArea' },
]
footerDataList.footerList = {
company: {

View File

@ -282,12 +282,14 @@ export default {
//
const jumpToDetailsPageconetent = () => {
router.push({
path: '/DetailsPageconetent',
query: {
select: DETAIL_PAGE_CONTENT_DEFAULT_TAB,
},
})
setTimeout(() => {
router.push({
path: '/DetailsPageconetent',
query: {
select: DETAIL_PAGE_CONTENT_DEFAULT_TAB,
},
})
}, 1000)
}
//
@ -736,12 +738,13 @@ export default {
const handleWrjApply = (formName) => {
let _data = {
deviceId: formName.system && formName.system[0] && formName.system[0].resourceId,
deviceName: formName.system && formName.system[0] && formName.system[0].resourceName,
title: formName.title,
name: formName.user,
phone: formName.phone,
dept: formName.unit, //
system: formName.applicationSystem, //
area: JSON.stringify(formName.applicationScene), //
applicationSystem: formName.applicationSystem, //
applicationArea: JSON.stringify(formName.applicationScene), //
demand: formName.applicationBackground, //
}
console.log('_data-----提交申请------->', _data);

View File

@ -333,12 +333,12 @@
</template>
</a-table>
</div>
<!-- 西海岸-无人机单兵设备 -->
<div class="infrastructrue-table" v-else-if="isXiHaiAn && wrjFlag">
<a-table class="ant-table-striped" :dataSource="dataSource2" :columns="columns2" :scroll="{ y: tableHeight }"
rowKey="channelId" :rowClassName="
(record, index) => (index % 2 === 1 ? 'table-striped' : null)
" :pagination="pagination" @change="handleTableChange">
<!-- todo-->
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'operation'">
<a @click="goToApply(record)" style="margin-right: 10px">
@ -678,7 +678,7 @@ const goToWrj = (data) => {
window.open(data.url)
}
//
// 西-
const goToApply = (data) => {
console.log(data, dept)
let arr = [
@ -1622,7 +1622,7 @@ const onSelectAll = (selected, selectedRows, changeRows) => {
console.log('heiheiheiehiehei', selected, selectedRows, changeRows)
}
// tab todo
// tab
const handleTableChange = (val) => {
pagination.value.current = val.current
pagination.value.pageSize = val.pageSize
@ -1637,9 +1637,6 @@ const handleTableChange = (val) => {
}else {
getCamera()
}
console.log('_arr------------>', _arr);
console.log('clickList------------>', clickList);
}
const showMsg = () => {