Merge remote-tracking branch 'origin/liujun0703-新项目开发' into liujun0703-新项目开发
commit
4806d0422a
|
@ -13,6 +13,7 @@
|
|||
<script type="text/javascript" charset="utf-8" src="https://api.tianditu.gov.cn/api?v=4.0&tk=e8a16137fd226a62a23cc7ba5c9c78ce"></script>
|
||||
<script type="text/javascript" src="./static/map/cesium91/CesiumUnminified/Cesium.js"></script>
|
||||
<script type="text/javascript" src="./static/map/cesium91/CustomCesiumSDK.js"></script>
|
||||
<script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=OElqFYoKiAH8KFtph8ftLKF5NlNrbCUr"></script>
|
||||
<link href="./static/map/cesium91/CesiumUnminified/Widgets/widgets.css" rel="stylesheet"/>
|
||||
</head>
|
||||
<body>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 8.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 6.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 7.5 KiB |
|
@ -0,0 +1,39 @@
|
|||
<template>
|
||||
<div>
|
||||
<div id="map"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
let mapInstance
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.fnMapInit()
|
||||
},
|
||||
beforeDestroy() {
|
||||
mapInstance = null
|
||||
},
|
||||
methods: {
|
||||
fnMapInit() {
|
||||
mapInstance = new window.BMapGL.Map('map')
|
||||
mapInstance.centerAndZoom(new window.BMapGL.Point('119.502057', '39.933306'), 15)
|
||||
mapInstance.enableScrollWheelZoom(true)
|
||||
},
|
||||
addPoint() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
#map {
|
||||
width: calc(100vw - 210px);
|
||||
height: calc(100vh - 84px);
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,19 @@
|
|||
<template>
|
||||
<div>
|
||||
<mapAssembly/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mapAssembly from './components/mapAssembly.vue'
|
||||
|
||||
export default {
|
||||
components: { mapAssembly },
|
||||
data() {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
|
@ -0,0 +1,152 @@
|
|||
<template>
|
||||
<el-dialog :visible.sync="visible" :title="title" :v-loading="loading" :before-close="handleClose" width="600px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="100px">
|
||||
<el-form-item label="图标名称:" prop="NAME">
|
||||
<el-input v-model="form.NAME" prop="NAME" style="width: 300px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型:" prop="TYPE">
|
||||
<el-select v-model="form.TYPE" prop="TYPE" style="width: 300px">
|
||||
<el-option
|
||||
v-for="item in typeList"
|
||||
:key="item.DICTIONARIES_ID"
|
||||
:label="item.name"
|
||||
:value="item.DICTIONARIES_ID"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="图标:" prop="FILE_PATH">
|
||||
<upload-img
|
||||
:file-list.sync="form.file"
|
||||
:multiple="false"
|
||||
:accept="'.jpg,.png,.gif,.bmp,.jpeg,.jpeg'"
|
||||
:limit="1"
|
||||
:upload-type="1"
|
||||
append-to-body/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button type="primary" @click="uploadFile">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { requestFN } from '@/utils/request'
|
||||
import { upload } from '@/utils/upload'
|
||||
import uploadImg from '../../../util/uploadImg/index.vue'
|
||||
|
||||
export default {
|
||||
components: { uploadImg },
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: '新增'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
loading: false,
|
||||
config: config,
|
||||
form: {
|
||||
NAME: '',
|
||||
TYPE: '',
|
||||
TYPE_NAME: '',
|
||||
FILE_PATH: [],
|
||||
file: []
|
||||
},
|
||||
rules: {},
|
||||
tree: [],
|
||||
typeList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async init(row) {
|
||||
await this.getDic()
|
||||
if (row) {
|
||||
this.form = JSON.parse(JSON.stringify(row))
|
||||
this.$set(this.form, 'file', [{ url: config.fileUrl + row.FILE_PATH }])
|
||||
this.visible = true
|
||||
} else {
|
||||
this.visible = true
|
||||
}
|
||||
},
|
||||
goBack() {
|
||||
this.$parent.activeName = 'list'
|
||||
},
|
||||
uploadFile() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
const formData = new FormData()
|
||||
if (this.form.file[0] && this.form.file[0].raw) {
|
||||
for (let i = 0; i < this.form.file.length; i++) {
|
||||
if (this.form.file[i].raw) {
|
||||
formData.append('FFILE', this.form.file[i].raw)
|
||||
}
|
||||
}
|
||||
upload('/file/upload', formData).then((data) => {
|
||||
this.confirm(data.fileurl)
|
||||
}).catch((e) => {
|
||||
console.log(e)
|
||||
})
|
||||
} else {
|
||||
this.confirm(this.form.FILE_PATH)
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
confirm(filePath) {
|
||||
this.form.FILE_PATH = filePath
|
||||
// 翻译type类型
|
||||
this.form.TYPE_NAME = this.typeList.find((item) => {
|
||||
return item.DICTIONARIES_ID === this.form.TYPE
|
||||
}).name
|
||||
requestFN(
|
||||
'/bi/emergency/saveOrUpdate', this.form
|
||||
).then((data) => {
|
||||
this.loading = false
|
||||
this.handleClose()
|
||||
this.$emit('refresh')
|
||||
}).catch((e) => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
getDic() {
|
||||
return new Promise((resolve, reject) => {
|
||||
requestFN('/dictionaries/listTree', { PARENT_ID: '8cb69dfee64945ce9b644478d1ceff99' })
|
||||
.then((data) => {
|
||||
this.typeList = JSON.parse(data.zTreeNodes)
|
||||
resolve()
|
||||
}).catch((e) => {
|
||||
console.log(e)
|
||||
reject()
|
||||
})
|
||||
})
|
||||
},
|
||||
handleClose() {
|
||||
this.form = {
|
||||
NAME: '',
|
||||
TYPE: '',
|
||||
TYPE_NAME: '',
|
||||
FILE_PATH: [],
|
||||
file: []
|
||||
}
|
||||
this.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="sass" scoped>
|
||||
.table-ui
|
||||
td
|
||||
line-height: 34px
|
||||
|
||||
.tbg
|
||||
width: 200px
|
||||
|
||||
.ui-foot
|
||||
text-align: center
|
||||
margin-top: 20px
|
||||
</style>
|
|
@ -0,0 +1,407 @@
|
|||
<template>
|
||||
<div>
|
||||
<div class="app-container">
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="140px">
|
||||
<div class="collection_h1">
|
||||
<h1>临时用电作业许可证</h1>
|
||||
</div>
|
||||
|
||||
<div class="mb-20">
|
||||
<table class="table-ui">
|
||||
<tr>
|
||||
<td class="bbg">用电单位</td>
|
||||
<td>{{ pd.ELECTRICITY_UNIT }}</td>
|
||||
<td class="bbg">作业证编号</td>
|
||||
<td>{{ pd.CHECK_NO }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="bbg">用电原因</td>
|
||||
<td>{{ pd.WORK_CONTENT }}</td>
|
||||
<td class="bbg">作业地点</td>
|
||||
<td>{{ pd.WORK_PLACE }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="bbg">电源接入点</td>
|
||||
<td>{{ pd.ACCESS_POINT }}</td>
|
||||
<td class="bbg">用电设备及功率</td>
|
||||
<td>{{ pd.EQUIPMENT_POWER }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="bbg">危险性分析</td>
|
||||
<td>{{ pd.RISK_ANALYSIS }}</td>
|
||||
<td class="bbg">作业实施时间</td>
|
||||
<td>
|
||||
{{ formatTime(pd.WORK_START_DATE) }} 至 {{ formatTime(pd.WORK_END_DATE) }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">安全交底人</td>
|
||||
<td>{{ pd.SECURITY_CONFIDANT }}</td>
|
||||
<td class="bbg">作业人员</td>
|
||||
<td>
|
||||
<div v-for="(item, index) in pd.WORK_OPERATOR_NAME" :key="index+Math.random()">
|
||||
{{ index + 1 }}. <span style="margin: 0 15px 0 5px">{{ pd.WORK_OPERATOR_NAME[index] }}</span> 作业证号:{{ pd.WORK_OPERATOR_NUMBER[index] }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr v-for="item in gasList" :key="item.ELECTRICITYGAS_ID">
|
||||
<td colspan="4" style="padding: 0;">
|
||||
<table class="table-vi">
|
||||
<tr>
|
||||
<td>分析时间</td>
|
||||
<td>{{ item.ANALYZE_TIME }}</td>
|
||||
<td>分析点</td>
|
||||
<td>{{ item.ANALYZE_PLACE }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>分析结果</td>
|
||||
<td>{{ item.ANALYZE_RESULT }}</td>
|
||||
<td>分析人</td>
|
||||
<td>{{ item.ANALYZE_USER }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="4" style="padding: 0;">
|
||||
<table class="table-vi">
|
||||
<tr>
|
||||
<th>主要安全措施</th>
|
||||
<th class="ccenter select">选项√</th>
|
||||
</tr>
|
||||
<tr v-for="item in measuresList" :key="item.BUS_ELECTRICITY_MEASURES_ID">
|
||||
<td>
|
||||
{{ item.PROTECTIVE_MEASURES }}
|
||||
</td>
|
||||
<td class="ccenter select">
|
||||
<span v-if="item.STATUS=='1'"><input type="radio" disabled checked>合格</span>
|
||||
<span v-if="item.STATUS=='-1'"><input type="radio" disabled checked>不合格</span>
|
||||
<span v-if="item.STATUS=='2'"><input type="radio" disabled checked>不涉及</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr v-if="otherProtectiveMeasures.length > 0">
|
||||
<td colspan="4" style="padding: 0;">
|
||||
<table class="table-vi">
|
||||
<tr>
|
||||
<th colspan="2">补充措施</th>
|
||||
</tr>
|
||||
<tr v-for="(item,i) in otherProtectiveMeasures" :key="item">
|
||||
<td v-if="item" class="bbg">
|
||||
{{ i+1 }}
|
||||
<!--<span v-if="i==0">作业单位</span>
|
||||
<span v-else-if="i==1">配送电单位</span>
|
||||
<span v-else-if="i==2">审批人</span>-->
|
||||
</td>
|
||||
<td v-if="item">{{ item }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div><span>安全措施确认人:</span>
|
||||
<span />
|
||||
</div>
|
||||
<span class="print-approval-img">
|
||||
<img v-if="pd.CONFIRM_USER_SIGNER_PATH" :src="config.fileUrl+pd.CONFIRM_USER_SIGNER_PATH">
|
||||
</span>
|
||||
<span v-if="pd.CONFIRM_USER_SIGNER_TIME">{{ formatTime(pd.CONFIRM_USER_SIGNER_TIME) }}</span>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<div><span>作业单位:</span>
|
||||
<span/>
|
||||
</div>
|
||||
<span class="print-approval-img">
|
||||
<img v-if="pd.WORK_USER_SIGNER_PATH" :src="config.fileUrl+pd.WORK_USER_SIGNER_PATH">
|
||||
</span>
|
||||
<span v-if="pd.WORK_USER_SIGNER_TIME">{{ formatTime(pd.WORK_USER_SIGNER_TIME) }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div><span>运维保障部门:</span>
|
||||
<span/>
|
||||
</div>
|
||||
<span class="print-approval-img">
|
||||
<img v-if="pd.ASSURE_USER_SIGNER_PATH" :src="config.fileUrl+pd.ASSURE_USER_SIGNER_PATH">
|
||||
</span>
|
||||
<span v-if="pd.ASSURE_USER_SIGNER_TIME">{{ formatTime(pd.ASSURE_USER_SIGNER_TIME) }}</span>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<div><span>临时用电审批:</span>
|
||||
<span/>
|
||||
</div>
|
||||
<span class="print-approval-img">
|
||||
<img v-if="pd.APPROVE_USER_SIGNER_PATH" :src="config.fileUrl+pd.APPROVE_USER_SIGNER_PATH">
|
||||
</span>
|
||||
<span v-if="pd.APPROVE_USER_SIGNER_TIME">{{ formatTime(pd.APPROVE_USER_SIGNER_TIME) }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="level-title">
|
||||
<h1>作业验收</h1>
|
||||
</div>
|
||||
<div class="mb-20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="验收结果" prop="ACCEPT_RESULT_NAME">
|
||||
<el-radio-group v-model="form.ACCEPT_RESULT_NAME">
|
||||
<el-radio :label="'通过'">通过</el-radio>
|
||||
<el-radio :label="'不通过'">不通过</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="验收时间" prop="ACCEPT_TIME">
|
||||
<el-date-picker v-model="form.ACCEPT_TIME" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" type="datetime" placeholder="用电结束时间" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<el-dialog :visible.sync="dialogMap" :title="'坐标位置'" width="80%">
|
||||
<div>
|
||||
<iframe :src="iframeSrc" frameborder="0" allowtransparency="true" width="100%" height="600"/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-if="dialogWriteSign" :visible.sync="dialogWriteSign" title="手写签字" width="600px" @close="dialogWriteSign = false">
|
||||
<WriteSign :width="600" :height="300" @subCanvas="subCanvas"/>
|
||||
</el-dialog>
|
||||
<div class="ui-height" style="height: 160px" />
|
||||
<div class="ui-foot">
|
||||
<el-button @click="goBack">返 回</el-button>
|
||||
<el-button type="primary" @click="confirm('1')">确 定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { requestFN } from '@/utils/request'
|
||||
import dateformat from '@/utils/dateformat'
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
import WriteSign from '@/components/WriteSign'
|
||||
import formatDate from '@/utils/dateformat'
|
||||
export default {
|
||||
components: { SelectTree, WriteSign },
|
||||
data() {
|
||||
return {
|
||||
config: config,
|
||||
dialogMap: false,
|
||||
iframeSrc: '',
|
||||
treeData: [],
|
||||
defaultProps: {
|
||||
value: 'id',
|
||||
children: 'nodes',
|
||||
label: 'name'
|
||||
},
|
||||
assureUserList: [],
|
||||
approveUserList: [],
|
||||
pd: {
|
||||
WORK_OPERATOR_ID: [],
|
||||
WORK_OPERATOR_NAME: [],
|
||||
WORK_OPERATOR_NUMBER: []
|
||||
}, // 存放字段参数
|
||||
measuresList: [],
|
||||
form: {
|
||||
ELECTRICITY_ID: this.$parent.ELECTRICITY_ID,
|
||||
ACCEPT_RESULT_NAME: '', // 验收结果
|
||||
ACCEPT_TIME: formatDate(new Date(), 'YYYY-MM-DD HH:mm'), // 验收时间
|
||||
APPLY_STATUS: '4',
|
||||
CHECK_STATUS: '1',
|
||||
OPERATOR: JSON.parse(sessionStorage.getItem('user')).USER_ID,
|
||||
ACTION_USER: JSON.parse(sessionStorage.getItem('user')).NAME
|
||||
}, // 存放字段参数
|
||||
rules: {
|
||||
ACCEPT_RESULT_NAME: [{ required: true, message: '请选择验收结果', trigger: 'blur' }],
|
||||
ACCEPT_TIME: [{ required: true, message: '请选择验收时间', trigger: 'blur' }]
|
||||
},
|
||||
gasList: [],
|
||||
otherProtectiveMeasures: [],
|
||||
props: {
|
||||
multiple: true,
|
||||
emitPath: false,
|
||||
value: 'id',
|
||||
label: 'name',
|
||||
children: 'children'
|
||||
},
|
||||
optionsJson: [],
|
||||
dialogWriteSign: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
this.getData(this.$parent.ELECTRICITY_ID)
|
||||
},
|
||||
methods: {
|
||||
handleMap() {
|
||||
this.dialogMap = true
|
||||
this.iframeSrc = this.config.weburl + 'static/maplocation.html?t=' + Math.random()
|
||||
},
|
||||
getData(ELECTRICITY_ID) {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/electricity/goEdit',
|
||||
{
|
||||
ELECTRICITY_ID: ELECTRICITY_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.pd = data.pd // 参数map
|
||||
this.measuresList = data.measuresList // 参数map
|
||||
this.gasList = data.gasList // 参数map
|
||||
this.otherProtectiveMeasures = this.validStr(this.pd.OTHER_PROTECTIVE_MEASURES.replace(/;_;/g, '')) ? this.pd.OTHER_PROTECTIVE_MEASURES.split(';_;') : []
|
||||
if (!this.pd.WORK_OPERATOR_ID) {
|
||||
this.$set(this.pd, 'WORK_OPERATOR_ID', [])
|
||||
} else {
|
||||
this.pd.WORK_OPERATOR_ID = this.pd.WORK_OPERATOR_ID.split(',')
|
||||
}
|
||||
if (!this.pd.WORK_OPERATOR_NAME) {
|
||||
this.$set(this.pd, 'WORK_OPERATOR_NAME', [])
|
||||
} else {
|
||||
this.pd.WORK_OPERATOR_NAME = this.pd.WORK_OPERATOR_NAME.split(',')
|
||||
}
|
||||
if (!this.pd.WORK_OPERATOR_NUMBER) {
|
||||
this.$set(this.pd, 'WORK_OPERATOR_NUMBER', [])
|
||||
} else {
|
||||
this.pd.WORK_OPERATOR_NUMBER = this.pd.WORK_OPERATOR_NUMBER.split(',')
|
||||
}
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 保存
|
||||
confirm(status) {
|
||||
console.log(this.form)
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
this.listLoading = true
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据保存中...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
if (this.form.ACCEPT_RESULT_NAME === '通过') {
|
||||
this.form.APPLY_STATUS = '4'
|
||||
this.form.CHECK_STATUS = '1'
|
||||
} else {
|
||||
this.form.APPLY_STATUS = '3'
|
||||
this.form.CHECK_STATUS = '3'
|
||||
}
|
||||
requestFN(
|
||||
'/electricity/editStatus',
|
||||
{ ...this.form }
|
||||
).then((data) => {
|
||||
loading.close()
|
||||
this.$message({
|
||||
message: '临时用电作业审批完成。',
|
||||
type: 'success'
|
||||
})
|
||||
this.goBack()
|
||||
}).catch((e) => {
|
||||
loading.close()
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 手写板*/
|
||||
showModal() {
|
||||
this.dialogWriteSign = true
|
||||
},
|
||||
// 完成
|
||||
subCanvas(img64) {
|
||||
// console.info('img64:' + img64)
|
||||
this.form.APPROVE_USER_SIGNER_PATH = img64
|
||||
this.form.APPROVE_USER_SIGNER_TIME = formatDate(new Date(), 'YYYY-MM-DD HH:mm')
|
||||
this.dialogWriteSign = false
|
||||
},
|
||||
getTreeList() {
|
||||
return new Promise((resolve) => {
|
||||
requestFN(
|
||||
'/department/listTree',
|
||||
{}
|
||||
).then((data) => {
|
||||
this.treeData = JSON.parse(data.zTreeNodes)
|
||||
resolve()
|
||||
}).catch((e) => {
|
||||
})
|
||||
})
|
||||
},
|
||||
updateDept(deptId, list) {
|
||||
if (list === 'assureUserList') {
|
||||
this.form.ASSURE_USER_ID = ''
|
||||
this.form.ASSURE_DEPARTMENT_NAME = this.$refs['deptTree_ASSURE']._data.valueTitle
|
||||
console.info(this.form)
|
||||
} else if (list === 'approveUserList') {
|
||||
this.form.APPROVE_USER_ID = ''
|
||||
this.form.APPROVE_DEPARTMENT_NAME = this.$refs['deptTree_APPROVE']._data.valueTitle
|
||||
}
|
||||
this.getUserList(deptId, list)
|
||||
},
|
||||
getUserList(deptId, list) {
|
||||
requestFN(
|
||||
'/user/listAll',
|
||||
{
|
||||
DEPARTMENT_ID: deptId,
|
||||
NOMAIN: '1'
|
||||
}
|
||||
).then((data) => {
|
||||
this[list] = data.userList
|
||||
this.$forceUpdate()
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
// 获取数据字典数据
|
||||
getDict() {
|
||||
},
|
||||
formatTime(date, column) {
|
||||
if (date) {
|
||||
return dateformat(date, 'YYYY年MM月DD日HH时mm分')
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
formatDate(date, column) {
|
||||
if (date) {
|
||||
return dateformat(date, 'YYYY-MM-DD')
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
goBack() {
|
||||
this.$parent.activeName = 'List'
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
.print-approval-p10
|
||||
padding: 20px 0
|
||||
span
|
||||
vertical-align: middle
|
||||
|
||||
.ud-flex
|
||||
display: flex
|
||||
.print-approval-img
|
||||
width: 200px
|
||||
height: 97px
|
||||
display: inline-block
|
||||
img
|
||||
width: 100%
|
||||
height: 100%
|
||||
</style>
|
|
@ -0,0 +1,156 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-form label-width="80px" label-position="left">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称:">
|
||||
<el-input v-model="form.NAME"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<el-button type="primary" icon="el-icon-search" style="margin-left: 30px" @click="getQuery">搜索</el-button>
|
||||
<el-button class="filter-item" type="default" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-row>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
ref="multipleTable"
|
||||
:data="list"
|
||||
:row-key="getRowKey"
|
||||
:header-cell-style="{'font-weight': 'bold','color': '#000'}"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
fit
|
||||
highlight-current-row>
|
||||
<el-table-column :reserve-selection="true" type="selection" width="55" align="center"/>
|
||||
<el-table-column type="index" label="序号" width="50" align="center"/>
|
||||
<el-table-column prop="NAME" label="名称"/>
|
||||
<el-table-column prop="TYPE_NAME" label="类型名称"/>
|
||||
<el-table-column prop="FILE_PATH" label="图标类型">
|
||||
<template slot-scope="{row}">
|
||||
<el-image
|
||||
:src="config.fileUrl + row.FILE_PATH"
|
||||
:preview-src-list="[config.fileUrl +row.FILE_PATH]"
|
||||
style="width: 100px; height: 100px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="220">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="danger" icon="el-icon-delete" plain @click="handleDelete(row.EMERGENCY_ICON_ID)">删除
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-edit" @click="goDetail(row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<el-button type="primary" @click="handleAdd">新增</el-button>
|
||||
</div>
|
||||
<pagination :total="total" :page.sync="page.page" :limit.sync="page.limit" @pagination="getList"/>
|
||||
</div>
|
||||
<add ref="add" @refresh="getList"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import waves from '@/directive/waves'
|
||||
import Add from './add.vue'
|
||||
|
||||
export default {
|
||||
components: { Add, Pagination },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
config: config,
|
||||
loading: true,
|
||||
add: false,
|
||||
del: false,
|
||||
edit: false,
|
||||
list: [],
|
||||
page: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
total: 0,
|
||||
form: {
|
||||
NAME: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getRowKey(row) {
|
||||
return this.validStr(row) ? row.EMERGENCY_ICON_ID : ''
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.form.NAME = ''
|
||||
},
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.loading = true
|
||||
requestFN('bi/emergency/list?showCount=' + this.page.limit + '¤tPage=' + this.page.page, this.form).then((data) => {
|
||||
this.loading = false
|
||||
this.list = data.varList
|
||||
this.page.total = data.page.totalResult
|
||||
this.hasButton()
|
||||
}).catch((e) => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 判断按钮权限,用于是否显示按钮
|
||||
hasButton() {
|
||||
var keys = 'electricity:add,electricity:del,electricity:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
{
|
||||
keys: keys
|
||||
}
|
||||
).then((data) => {
|
||||
this.add = data.electricityfhadminadd // 新增权限
|
||||
this.del = data.electricityfhadmindel // 删除权限
|
||||
this.edit = data.electricityfhadminedit // 修改权限
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.$refs.add.init()
|
||||
},
|
||||
goDetail(row) {
|
||||
this.$refs.add.init(row)
|
||||
},
|
||||
handleDelete(id) {
|
||||
this.$confirm('确定要删除该条数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
requestFN(
|
||||
'/bi/emergency/delete', { id: id }
|
||||
).then((data) => {
|
||||
this.getList()
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
}).catch((e) => {
|
||||
console.log(e)
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
|
@ -0,0 +1,32 @@
|
|||
<template>
|
||||
<div>
|
||||
<List v-show="activeName === 'List'" ref="list" />
|
||||
<Detail v-if="activeName === 'Detail'"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/list'
|
||||
import Detail from './components/detail'
|
||||
export default {
|
||||
components: {
|
||||
List, Detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'List',
|
||||
ELECTRICITY_ID: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
activeName(val) {
|
||||
if (val === 'List') {
|
||||
this.$refs.list.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
|
@ -9,22 +9,13 @@
|
|||
:on-exceed="handleExceed"
|
||||
:accept="accept"
|
||||
:class="{hide:hideFlag}"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove"
|
||||
action="#"
|
||||
list-type="picture-card">
|
||||
<i slot="default" class="el-icon-plus"/>
|
||||
<div slot="file" slot-scope="{file}">
|
||||
<el-image :src="file.url" alt=""/>
|
||||
<span class="el-upload-list__item-actions">
|
||||
<span @click="handlePictureCardPreview(file)">
|
||||
<i class="el-icon-zoom-in"/>
|
||||
</span>
|
||||
<span class="el-upload-list__item-delete" @click="handleRemove(file)">
|
||||
<i class="el-icon-delete"/>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</el-upload>
|
||||
<el-dialog :visible.sync="dialogVisible" :append-to-body="appendToBody">
|
||||
<el-dialog :visible.sync="dialogVisible" :append-to-body="appendToBody" title="图片预览">
|
||||
<img :src="dialogImageUrl" width="100%" alt="">
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
@ -63,8 +54,8 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
handleRemove(file) {
|
||||
this.fileList.splice(this.fileList.findIndex(item => item.uid === file.uid), 1)
|
||||
handleRemove(file, fileList) {
|
||||
this.$emit('update:fileList', fileList)
|
||||
if (this.hideUpload) {
|
||||
if (this.fileList.length < this.limit) {
|
||||
this.hideFlag = false
|
||||
|
|
Loading…
Reference in New Issue