重点工程定位以及其他需求

main
zhaoyu 2023-12-08 17:24:58 +08:00
parent 229b261a3f
commit 328e99740e
10 changed files with 205 additions and 28 deletions

View File

@ -40,14 +40,14 @@
> >
<el-table-column type="index" label="序号" width="50" align="center" /> <el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="CORP_NAME" label="公司名称" show-overflow-tooltip /> <el-table-column prop="CORP_NAME" label="公司名称" show-overflow-tooltip />
<el-table-column prop="STARTTIME" label="属地" show-overflow-tooltip> <!-- <el-table-column prop="STARTTIME" label="属地" show-overflow-tooltip>
<template slot-scope="{row}"/> <template slot-scope="{row}"/>
<template slot-scope="{row}"> <template slot-scope="{row}">
<span v-if="row.CORPINFO_ID !='1'"> <span v-if="row.CORPINFO_ID !='1'">
{{ row.prvinceName }} -- {{ row.cityName }} -- {{ row.countryName }} {{ row.prvinceName }} &#45;&#45; {{ row.cityName }} &#45;&#45; {{ row.countryName }}
</span> </span>
<span v-else> <span v-else>
河北省 -- 秦皇岛市 -- 海港区 河北省 &#45;&#45; 秦皇岛市 &#45;&#45; 海港区
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@ -60,8 +60,10 @@
交通运输仓储和邮政业 交通运输仓储和邮政业
</span> </span>
</template> </template>
</el-table-column> </el-table-column>-->
<el-table-column prop="OUTSOURCED_COUNT" label="重点工程创建数量" /> <el-table-column prop="OUTSOURCED_COUNT" label="重点工程创建数量" />
<el-table-column prop="STATE_COUNT" label="开工数量" />
<el-table-column prop="END_COUNT" label="结束数量" />
<el-table-column v-if="otherShow" prop="CHECK_COUNT" label="检查次数" /> <el-table-column v-if="otherShow" prop="CHECK_COUNT" label="检查次数" />
<el-table-column v-if="otherShow" prop="HIDDEN_COUNT" label="发现隐患数量" /> <el-table-column v-if="otherShow" prop="HIDDEN_COUNT" label="发现隐患数量" />
<el-table-column v-if="otherShow" prop="PUNISH_COUNT" label="违约处罚次数" /> <el-table-column v-if="otherShow" prop="PUNISH_COUNT" label="违约处罚次数" />

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<OutSourced v-if="activeName=='OutSourced'" ref="outSourced" active-name="List"/> <OutSourced v-if="activeName=='OutSourced'" ref="outSourced" :other-show="true" active-name="List"/>
<List v-if="activeName=='List'" /> <List v-if="activeName=='List'" />
<Info v-if="activeName=='Info'" /> <Info v-if="activeName=='Info'" />
<recordList v-if="activeName=='recordList'"/> <recordList v-if="activeName=='recordList'"/>

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<OutSourced v-show="activeName=='OutSourced'" ref="outSourced" active-name="List"/> <OutSourced v-show="activeName=='OutSourced'" ref="outSourced" :other-show="true" active-name="List"/>
<List v-if="activeName=='List'" /> <List v-if="activeName=='List'" />
<Info v-if="activeName=='Info'"/> <Info v-if="activeName=='Info'"/>
</div> </div>

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<OutSourced v-show="activeName=='OutSourced'" ref="outSourced" active-name="List"/> <OutSourced v-show="activeName=='OutSourced'" ref="outSourced" :other-show="true" active-name="List"/>
<List v-if="activeName=='List'" ref="list" /> <List v-if="activeName=='List'" ref="list" />
<Info v-if="activeName=='Info'" /> <Info v-if="activeName=='Info'" />
<recordList v-if="activeName=='recordList'" /> <recordList v-if="activeName=='recordList'" />

View File

@ -194,7 +194,7 @@
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="状态:" prop="STATE"> <el-form-item label="状态:" prop="STATE">
<el-select v-model="form.STATE" style="width: 100%;"> <el-select v-model="form.STATE" disabled style="width: 100%;">
<el-option v-for="item in stateList" :key="item.ID" :label="item.NAME" :value="item.ID" /> <el-option v-for="item in stateList" :key="item.ID" :label="item.NAME" :value="item.ID" />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -571,9 +571,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: '3', NAME: '开工申请中' },
{ ID: '4', NAME: '结束申请中' }
], ],
unitsUserList: [], unitsUserList: [],
normalizer(node) { normalizer(node) {
@ -635,6 +637,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'
} }
}, },
methods: { methods: {

View File

@ -97,10 +97,19 @@
<td >{{ pd.APPLICANT }}</td>--> <td >{{ pd.APPLICANT }}</td>-->
<td class="tbg">状态</td> <td class="tbg">状态</td>
<td> <td>
<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>
<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>
@ -133,12 +142,26 @@
<div class="ui-foot"> <div class="ui-foot">
<el-button icon="el-icon-arrow-left" @click="goBack"> </el-button> <el-button icon="el-icon-arrow-left" @click="goBack"> </el-button>
</div> </div>
<el-dialog :visible.sync="dialogFormMap" title="定位" width="1050px" class="dy-dialog">
<div id="map" />
<div slot="footer" class="dialog-footer">
<span>经度</span>
<el-input v-model="form.LONGITUDE" style="width: 200px" placeholder="请输入内容" disabled />
<span>纬度</span>
<el-input v-model="form.LATITUDE" style="width: 200px" placeholder="请输入内容" disabled />
<el-button @click="dialogFormMap = false"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { requestFN } from '@/utils/request' import { requestFN } from '@/utils/request'
import TiandiMap from '../../../../components/TianMap/TiandiMap'
export default { export default {
components: { TiandiMap },
data() { data() {
return { return {
pd: { pd: {
@ -186,7 +209,9 @@ export default {
OATTACHMENTSPATH: '', // OATTACHMENTSPATH: '', //
file: '', // file: '', //
APPLICANT: '', // APPLICANT: '', //
STATE: ''// STATE: '', //
WORK_LATITUDE: '', //
WORK_LONGITUDE: '' //
}, },
punishThePerson: [], punishThePerson: [],
treeData: [], treeData: [],
@ -196,6 +221,14 @@ export default {
value: 'id', value: 'id',
children: 'nodes', children: 'nodes',
label: 'name' label: 'name'
},
//
map: null,
marker: null,
dialogFormMap: false,
form: {
LONGITUDE: '',
LATITUDE: ''
} }
} }
}, },
@ -223,6 +256,11 @@ export default {
created() { created() {
this.getData() this.getData()
}, },
beforeDestroy() {
this.map && this.map.removeEventListener('click', this.MapClick)
console.log('定时器关闭')
clearInterval(this.timer)
},
methods: { methods: {
handleTreeSelected(checkedIds, checkedData) { handleTreeSelected(checkedIds, checkedData) {
this.DEPTIDS = checkedIds.join(',') this.DEPTIDS = checkedIds.join(',')
@ -280,6 +318,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)
})
} }
} }
} }
@ -289,5 +399,8 @@ export default {
.tbg{width:180px; .tbg{width:180px;
/*text-align: left;*/ /*text-align: left;*/
} }
#map{
width: 1000px;
height: 500px;
}
</style> </style>

View File

@ -137,15 +137,27 @@
</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="视频数量" show-overflow-tooltip>
<template slot-scope="{row}">
<span v-if="row.VIDEO_COUNT != 0">
<a style="color: #1e9fff;text-decoration:underline" @click="clickVideoDetail(row.OUTSOURCED_ID)">{{ row.VIDEO_COUNT }}</a>
</span>
<span v-else>{{ row.VIDEO_COUNT }}</span>
</template>
</el-table-column>
<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 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="0 === row.IS_CORP_TYPE" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.OUTSOURCED_ID)"></el-button> <el-button v-show="edit" v-if="0 === row.IS_CORP_TYPE" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.OUTSOURCED_ID)"></el-button>
<el-button v-show="del" v-if="0 === row.IS_CORP_TYPE" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.OUTSOURCED_ID)"></el-button> <el-button v-show="del" v-if="0 === row.IS_CORP_TYPE" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.OUTSOURCED_ID)"></el-button>
</template> </template>
@ -183,6 +195,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,
@ -238,8 +251,11 @@ export default {
dialogFormEdit: false, dialogFormEdit: false,
dialogType: 'add', dialogType: 'add',
stateList: [ stateList: [
{ ID: '0', NAME: '未开工' },
{ ID: '1', NAME: '进行中' }, { ID: '1', NAME: '进行中' },
{ ID: '2', NAME: '已结束' } { ID: '2', NAME: '已结束' },
{ ID: '-1', NAME: '开工申请中' },
{ ID: '-2', NAME: '结束申请中' }
] ]
} }
}, },
@ -326,6 +342,10 @@ export default {
this.$parent.OUTSOURCED_ID = ID this.$parent.OUTSOURCED_ID = ID
this.$parent.activeName = 'Info' this.$parent.activeName = 'Info'
}, },
clickVideoDetail(ID) {
this.$parent.OUTSOURCED_ID = ID,
this.$parent.activeName = 'videoList'
},
// //
handleEdit(ID) { handleEdit(ID) {
this.$parent.activeName = 'Edit' this.$parent.activeName = 'Edit'
@ -351,6 +371,35 @@ export default {
// } // }
// }) // })
// }, // },
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: '确定',
@ -359,23 +408,18 @@ export default {
}).then(() => { }).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.message,
type: 'error'
})
return
}
this.$message({ this.$message({
message: '已结束', message: '已结束',
type: 'success' type: 'success'
}) })
this.listLoading = false
this.varList = [] this.varList = []
this.listQuery.page = 1 this.listQuery.page = 1
this.getList() this.getList()

View File

@ -1,9 +1,10 @@
<template> <template>
<div> <div>
<OutSourced v-show="activeName=='OutSourced'" ref="outSourced" active-name="List"/> <OutSourced v-show="activeName=='OutSourced'" ref="outSourced" :other-show="true" active-name="List"/>
<List v-show="activeName=='List'" ref="list" /> <List v-show="activeName=='List'" ref="list" />
<Edit v-if="activeName=='Edit'" /> <Edit v-if="activeName=='Edit'" />
<Info v-if="activeName=='Info'" /> <Info v-if="activeName=='Info'" />
<videoList v-if="activeName=='videoList'" />
</div> </div>
</template> </template>
@ -12,17 +13,20 @@ import List from './components/list'
import Edit from './components/edit' import Edit from './components/edit'
import Info from './components/info' import Info from './components/info'
import OutSourced from '@/components/OutSourced/index' import OutSourced from '@/components/OutSourced/index'
import videoList from '@/views/keyprojects/videomanager/components/video-list'
export default { export default {
components: { components: {
List: List, List: List,
Edit: Edit, Edit: Edit,
OutSourced: OutSourced, OutSourced: OutSourced,
Info: Info Info: Info,
videoList: videoList
}, },
data() { data() {
return { return {
activeName: 'OutSourced' activeName: 'OutSourced',
OUTSOURCED_ID: ''
} }
}, },
watch: { watch: {

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<OutSourced v-show="activeName=='OutSourced'" ref="outSourced" active-name="List"/> <OutSourced v-show="activeName=='OutSourced'" ref="outSourced" :other-show="true" active-name="List"/>
<List v-show="activeName=='List'" ref="list" /> <List v-show="activeName=='List'" ref="list" />
<List2 v-if="activeName=='List2'" /> <List2 v-if="activeName=='List2'" />
<Info v-if="activeName=='Info'" /> <Info v-if="activeName=='Info'" />

View File

@ -25,6 +25,16 @@ export default {
UNITS_ID: '', UNITS_ID: '',
OUTSOURCED_ID: '' OUTSOURCED_ID: ''
} }
},
watch: {
activeName(val) {
if (val == 'List') {
this.$refs.list.getQuery()
}
if (val == 'OutSourced') {
this.$refs.outSourced.getQuery()
}
}
} }
} }
</script> </script>