企业端缺失功能补全
parent
b4ad82b43a
commit
12dd4621b0
|
@ -406,9 +406,11 @@ export default {
|
||||||
// { ID: '0', NAME: '未申请' },
|
// { ID: '0', NAME: '未申请' },
|
||||||
// { ID: '1', NAME: '申请中' },
|
// { ID: '1', NAME: '申请中' },
|
||||||
// { ID: '2', NAME: '已完成' }
|
// { ID: '2', NAME: '已完成' }
|
||||||
|
{ ID: '0', NAME: '未开工' },
|
||||||
{ ID: '1', NAME: '进行中' },
|
{ ID: '1', NAME: '进行中' },
|
||||||
{ ID: '2', NAME: '已结束' }
|
{ ID: '2', NAME: '已结束' },
|
||||||
|
{ ID: '-1', NAME: '开工申请中' },
|
||||||
|
{ ID: '-2', NAME: '结束申请中' }
|
||||||
],
|
],
|
||||||
smsList: [
|
smsList: [
|
||||||
{ ID: '0', NAME: '是' },
|
{ ID: '0', NAME: '是' },
|
||||||
|
@ -481,6 +483,8 @@ export default {
|
||||||
this.dialogType = 'edit'
|
this.dialogType = 'edit'
|
||||||
this.form.OUTSOURCED_ID = this.$parent.OUTSOURCED_ID
|
this.form.OUTSOURCED_ID = this.$parent.OUTSOURCED_ID
|
||||||
this.getData()
|
this.getData()
|
||||||
|
} else {
|
||||||
|
this.form.STATE = '0'
|
||||||
}
|
}
|
||||||
this.getCorpInfo()
|
this.getCorpInfo()
|
||||||
// this.getTreeList()
|
// this.getTreeList()
|
||||||
|
|
|
@ -93,8 +93,11 @@
|
||||||
<!-- <span v-if="pd.STATE == 0">未申请</span>-->
|
<!-- <span v-if="pd.STATE == 0">未申请</span>-->
|
||||||
<!-- <span v-if="pd.STATE == 1">申请中</span>-->
|
<!-- <span v-if="pd.STATE == 1">申请中</span>-->
|
||||||
<!-- <span v-if="pd.STATE == 2">已完成</span>-->
|
<!-- <span v-if="pd.STATE == 2">已完成</span>-->
|
||||||
|
<span v-if="pd.STATE == 0">未开工</span>
|
||||||
<span v-if="pd.STATE == 1">进行中</span>
|
<span v-if="pd.STATE == 1">进行中</span>
|
||||||
<span v-if="pd.STATE == 2">已结束</span>
|
<span v-if="pd.STATE == 2">已结束</span>
|
||||||
|
<span v-if="pd.STATE == -1">开工申请中</span>
|
||||||
|
<span v-if="pd.STATE == -2">结束申请中</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!--<tr>
|
<!--<tr>
|
||||||
|
@ -137,6 +140,12 @@
|
||||||
<!– <td colspan="2">{{ pd.SHEET }}</td>–>
|
<!– <td colspan="2">{{ pd.SHEET }}</td>–>
|
||||||
<td colspan="3"><el-button type="primary" @click="downloadFile(pd.SHEET)">下载</el-button></td>
|
<td colspan="3"><el-button type="primary" @click="downloadFile(pd.SHEET)">下载</el-button></td>
|
||||||
</tr>-->
|
</tr>-->
|
||||||
|
<tr>
|
||||||
|
<td class="tbg">重点工程定位</td>
|
||||||
|
<td v-if="pd.WORK_LATITUDE && pd.WORK_LONGITUDE" colspan="2">{{ pd.WORK_LATITUDE }}*{{ pd.WORK_LONGITUDE }}</td>
|
||||||
|
<td v-else colspan="2">未定位</td>
|
||||||
|
<td><el-button type="success" @click="handleMap(pd)">查看定位</el-button></td>
|
||||||
|
</tr>
|
||||||
<tr v-for="(item,index) in file9" :key="index">
|
<tr v-for="(item,index) in file9" :key="index">
|
||||||
<td class="tbg">安全管理协议{{ index +1 }}</td>
|
<td class="tbg">安全管理协议{{ index +1 }}</td>
|
||||||
<td colspan="2">{{ item.FILE_NAME }}</td>
|
<td colspan="2">{{ item.FILE_NAME }}</td>
|
||||||
|
@ -315,6 +324,78 @@ export default {
|
||||||
goBack() {
|
goBack() {
|
||||||
this.$parent.activeName = 'List'
|
this.$parent.activeName = 'List'
|
||||||
this.$parent.OUTSOURCED_ID = ''
|
this.$parent.OUTSOURCED_ID = ''
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 初始化天地图对象
|
||||||
|
*/
|
||||||
|
initTDT() {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
if (window.T) {
|
||||||
|
console.log('天地图初始化成功...')
|
||||||
|
resolve(window.T)
|
||||||
|
reject('error')
|
||||||
|
}
|
||||||
|
}).then(T => {
|
||||||
|
window.T = T
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 初始化地图
|
||||||
|
* @param {*} lng 经度
|
||||||
|
* @param {*} lat 纬度
|
||||||
|
* @param {*} zoom 缩放比例(1~18)
|
||||||
|
*/
|
||||||
|
initMap(lng, lat, zoom) {
|
||||||
|
this.initTDT().then((T) => {
|
||||||
|
const imageURL = 'http://t0.tianditu.gov.cn/img_w/wmts?' + 'SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles' + '&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=e8a16137fd226a62a23cc7ba5c9c78ce'
|
||||||
|
// 创建自定义图层对象
|
||||||
|
this.lay = new window.T.TileLayer(imageURL, { minZoom: 1, maxZoom: 18 })
|
||||||
|
// 初始化地图对象
|
||||||
|
this.map = new window.T.Map('map')
|
||||||
|
this.initCenter(lng, lat, zoom)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
initCenter(lng, lat, zoom) {
|
||||||
|
// 设置显示地图的中心点和级别
|
||||||
|
if (!this.form.LONGITUDE && !this.form.LATITUDE) {
|
||||||
|
this.map.centerAndZoom(new window.T.LngLat(119.58, 39.94), zoom)
|
||||||
|
this.marker && this.map.removeOverLay(this.marker)
|
||||||
|
} else {
|
||||||
|
this.map.centerAndZoom(new window.T.LngLat(lng, lat), zoom)
|
||||||
|
this.marker && this.map.removeOverLay(this.marker)
|
||||||
|
this.form.LONGITUDE = lng
|
||||||
|
this.form.LATITUDE = lat
|
||||||
|
this.marker = new window.T.Marker(new window.T.LngLat(lng, lat))
|
||||||
|
// 向地图上添加标注
|
||||||
|
this.map.addOverLay(this.marker)
|
||||||
|
}
|
||||||
|
// 创建卫星和路网的混合视图
|
||||||
|
this.map.setMapType(window.TMAP_HYBRID_MAP)
|
||||||
|
// 允许鼠标滚轮缩放地图
|
||||||
|
this.map.enableScrollWheelZoom()
|
||||||
|
// 允许鼠标移动地图
|
||||||
|
this.map.enableInertia()
|
||||||
|
// 向地图上添加标注
|
||||||
|
this.map.addEventListener('click', this.MapClick)
|
||||||
|
},
|
||||||
|
MapClick(event) {
|
||||||
|
this.marker && this.map.removeOverLay(this.marker)
|
||||||
|
this.form.LONGITUDE = event.lnglat.getLng()
|
||||||
|
this.form.LATITUDE = event.lnglat.getLat()
|
||||||
|
this.marker = new window.T.Marker(new window.T.LngLat(event.lnglat.getLng(), event.lnglat.getLat()))
|
||||||
|
// 向地图上添加标注
|
||||||
|
this.map.addOverLay(this.marker)
|
||||||
|
},
|
||||||
|
handleMap(row) {
|
||||||
|
this.form.LATITUDE = ''
|
||||||
|
this.form.LONGITUDE = ''
|
||||||
|
this.dialogFormMap = true
|
||||||
|
this.form.LATITUDE = this.pd.WORK_LATITUDE
|
||||||
|
this.form.LONGITUDE = this.pd.WORK_LONGITUDE
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (!this.map) this.initMap(this.form.LONGITUDE, this.form.LATITUDE, 16)
|
||||||
|
else this.initCenter(this.form.LONGITUDE, this.form.LATITUDE, 16)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,15 +137,19 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="STATE" label="状态" width="100" >
|
<el-table-column prop="STATE" label="状态" width="100" >
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
|
<span v-if="row.STATE == 0">未开工</span>
|
||||||
<span v-if="row.STATE == 1">进行中</span>
|
<span v-if="row.STATE == 1">进行中</span>
|
||||||
<span v-if="row.STATE == 2">已结束</span>
|
<span v-if="row.STATE == 2">已结束</span>
|
||||||
|
<span v-if="row.STATE == -1">开工申请中</span>
|
||||||
|
<span v-if="row.STATE == -2">结束申请中</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="OUTSOURCED_CREATOR_NAME" label="创建人" show-overflow-tooltip />
|
<el-table-column prop="OUTSOURCED_CREATOR_NAME" label="创建人" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" align="center" width="400">
|
<el-table-column label="操作" align="center" width="400">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-button type="success" icon="el-icon-view" size="mini" @click="goDetail(row.OUTSOURCED_ID)">查看</el-button>
|
<el-button type="success" icon="el-icon-view" size="mini" @click="goDetail(row.OUTSOURCED_ID)">查看</el-button>
|
||||||
<el-button v-if="loginUserId == row.CREATOR" type="success" icon="el-icon-view" size="mini" @click="handleJie(row.OUTSOURCED_ID)">结束</el-button>
|
<el-button v-if="row.CREATOR==userInfoUserId && row.STATE==-1" type="success" icon="el-icon-view" size="mini" @click="handleState(row.OUTSOURCED_ID)">开工审批</el-button>
|
||||||
|
<el-button v-if="row.CREATOR==userInfoUserId && row.STATE==-2" type="success" icon="el-icon-view" size="mini" @click="handleJie(row.OUTSOURCED_ID)">结束审批</el-button>
|
||||||
<el-button v-show="edit" v-if="loginUserId == row.CREATOR" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.OUTSOURCED_ID)">编辑</el-button>
|
<el-button v-show="edit" v-if="loginUserId == row.CREATOR" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.OUTSOURCED_ID)">编辑</el-button>
|
||||||
<el-button v-show="del" v-if="loginUserId == row.CREATOR" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.OUTSOURCED_ID)">删除</el-button>
|
<el-button v-show="del" v-if="loginUserId == row.CREATOR" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.OUTSOURCED_ID)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -183,6 +187,7 @@ export default {
|
||||||
directives: { waves },
|
directives: { waves },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
userInfoUserId: JSON.parse(sessionStorage.getItem('user')).USER_ID,
|
||||||
qrcodeStr: '',
|
qrcodeStr: '',
|
||||||
listLoading: true,
|
listLoading: true,
|
||||||
add: false,
|
add: false,
|
||||||
|
@ -233,8 +238,11 @@ export default {
|
||||||
dialogType: 'add',
|
dialogType: 'add',
|
||||||
loginUserId: JSON.parse(sessionStorage.getItem('user')).USER_ID,
|
loginUserId: JSON.parse(sessionStorage.getItem('user')).USER_ID,
|
||||||
stateList: [
|
stateList: [
|
||||||
|
{ ID: '0', NAME: '未开工' },
|
||||||
{ ID: '1', NAME: '进行中' },
|
{ ID: '1', NAME: '进行中' },
|
||||||
{ ID: '2', NAME: '已结束' }
|
{ ID: '2', NAME: '已结束' },
|
||||||
|
{ ID: '-1', NAME: '开工申请中' },
|
||||||
|
{ ID: '-2', NAME: '结束申请中' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -326,27 +334,50 @@ export default {
|
||||||
this.$parent.OUTSOURCED_ID = ID
|
this.$parent.OUTSOURCED_ID = ID
|
||||||
},
|
},
|
||||||
|
|
||||||
|
handleState(id) {
|
||||||
|
this.$confirm('确定要开工吗?', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.listLoading = true
|
||||||
|
requestFN(
|
||||||
|
'/outsourced/updateState',
|
||||||
|
{
|
||||||
|
OUTSOURCED_ID: id,
|
||||||
|
OPERATOR: this.userInfoUserId, // 修改人
|
||||||
|
STATE: '1'
|
||||||
|
}
|
||||||
|
).then((data) => {
|
||||||
|
this.$message({
|
||||||
|
message: '已开工',
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
this.listLoading = false
|
||||||
|
this.varList = []
|
||||||
|
this.listQuery.page = 1
|
||||||
|
this.getList()
|
||||||
|
}).catch((e) => {
|
||||||
|
this.listLoading = false
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
},
|
||||||
handleJie(id) {
|
handleJie(id) {
|
||||||
this.$confirm('确定要结束吗?', {
|
this.$confirm('确定要结束吗?', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then((data) => {
|
}).then(() => {
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
requestFN(
|
requestFN(
|
||||||
'/outsourced/jie',
|
'/outsourced/updateState',
|
||||||
{
|
{
|
||||||
OUTSOURCED_ID: id
|
OUTSOURCED_ID: id,
|
||||||
|
OPERATOR: this.userInfoUserId, // 修改人
|
||||||
|
STATE: '2'
|
||||||
}
|
}
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
if (data.code == '500') {
|
|
||||||
this.listLoading = false
|
|
||||||
this.$message({
|
|
||||||
message: data.msg,
|
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '已结束',
|
message: '已结束',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
|
|
Loading…
Reference in New Issue