Browse Source

Merge branch 'release-sy-v1.0.0' into 'dev'

feat: 巡查记录相关功能完成

See merge request project/water/shuili-vue!4
master_tdsql
易浩轩 1 year ago
parent
commit
696780b343
  1. 1
      package.json
  2. 140
      src/api/management/dike.js
  3. 117
      src/api/management/index.js
  4. 1
      src/api/management/reservoir.js
  5. 1
      src/api/management/sluice.js
  6. 1
      src/assets/icons/svg/icon-gcxc.svg
  7. 1
      src/assets/icons/svg/icon-xcjhgl.svg
  8. 1
      src/assets/icons/svg/icon-xcjl.svg
  9. 1
      src/assets/icons/svg/icon-xcxmgl.svg
  10. 1
      src/assets/icons/svg/icon-yxgh.svg
  11. BIN
      src/assets/image/bottom-point.png
  12. BIN
      src/assets/image/map-point.png
  13. 17
      src/store/modules/permission.js
  14. 36
      src/views/runManage/engineering/inspectionItems/Dike.vue
  15. 154
      src/views/runManage/engineering/inspectionPlan/Dike.vue
  16. 170
      src/views/runManage/engineering/inspectionRecords/Dike.vue
  17. 22
      src/views/runManage/engineering/inspectionRecords/Reservoir.vue
  18. 22
      src/views/runManage/engineering/inspectionRecords/Sluice.vue
  19. 81
      src/views/runManage/engineering/inspectionRecords/index.vue
  20. 65
      src/views/runManage/engineering/patrolRouteSettings/Dike.vue
  21. 22
      src/views/runManage/engineering/patrolRouteSettings/Reservoir.vue
  22. 22
      src/views/runManage/engineering/patrolRouteSettings/Sluice.vue
  23. 224
      src/views/runManage/engineering/patrolRouteSettings/components/Drawer.vue
  24. 242
      src/views/runManage/engineering/patrolRouteSettings/components/GaoDeMap.vue
  25. 29
      src/views/runManage/engineering/patrolRouteSettings/index.vue

1
package.json

@ -40,6 +40,7 @@
"url": "https://gitee.com/y_project/RuoYi-Vue.git"
},
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"@antv/x6": "^1.28.1",
"@riophae/vue-treeselect": "0.4.0",
"axios": "0.18.1",

140
src/api/management/dike.js

@ -0,0 +1,140 @@
// 堤防相关接口
import request from '@/utils/request'
// 巡查计划管理-获取人员信息
export function getPersonnelInformation(id) {
return request({
url: `/system/user/${id}`,
method: 'get',
})
}
// 巡查项目管理-巡视检查列表
export function postEmbankmentInspectionChecklist(data) {
return request({
url: '/run/df/checking/list',
method: 'post',
data
})
}
// 巡查项目管理-巡视检查详情
export function getEmbankmentInspectionCheck(id) {
return request({
url: `/run/df/checking/${id}`,
method: 'get',
})
}
// 巡查项目管理-新增巡视检查
export function postEmbankmentInspection(data) {
return request({
url: '/run/df/checking',
method: 'post',
data
})
}
// 巡查项目管理-修改巡视检查
export function putEmbankmentInspection(data) {
return request({
url: '/run/df/checking',
method: 'put',
data
})
}
// 巡查项目管理-堤防巡视检查
export function deleteEmbankmentInspection(id) {
return request({
url: `/run/df/checking/${id}`,
method: 'delete',
})
}
// 巡查计划管理-查询巡视检查列表
export function postInspectionPlanlist(data) {
return request({
url: '/run/df/plan/list',
method: 'post',
data
})
}
// 巡查计划管理-巡视检查详情
export function getInspectionPlan(id) {
return request({
url: `/run/df/plan/${id}`,
method: 'get',
})
}
// 巡查计划管理-新增巡视检查
export function postInspectionPlan(data) {
return request({
url: '/run/df/plan',
method: 'post',
data
})
}
// 巡查计划管理-堤防巡视检查
export function putInspectionPlan(data) {
return request({
url: '/run/df/plan',
method: 'put',
data
})
}
// 巡查计划管理-堤防巡视检查
export function deleteInspectionPlan(id) {
return request({
url: `/run/df/plan/${id}`,
method: 'delete',
})
}
// 巡查计划管理-巡查点位设置
export function postInspectionRoute(id, data) {
return request({
url: `/run/df/plan/points/${id}`,
method: 'post',
data
})
}
// 巡查计划管理-获取巡查点位
export function getInspectionRoute(id) {
return request({
url: `/run/df/plan/points/${id}`,
method: 'get',
})
}
// 巡查记录-巡查记录列表
export function postInspectionRecordsList(data) {
return request({
url: '/run/df/record/list',
method: 'post',
data
})
}
// 巡查记录-新增巡查记录
export function postNewInspectionRecords(data) {
return request({
url: '/run/df/record',
method: 'post',
data
})
}
// 巡查记录-巡查记录轨迹列表
export function postInspectionRecordsTrajectoryList(data) {
return request({
url: '/run/df/trace/list',
method: 'post',
data
})
}

117
src/api/management/index.js

@ -1,112 +1,5 @@
import request from '@/utils/request'
// 获取字典类型列表
export function getDictionaryList(dictType) {
return request({
url: `/system/dict/data/type/${dictType}`,
method: 'get'
})
}
// 巡查项目管理-查询堤防巡视检查列表
export function postEmbankmentInspectionChecklist(data) {
return request({
url: '/run/df/checking/list',
method: 'post',
data
})
}
// 巡查项目管理-堤防巡视检查详情
export function getEmbankmentInspectionCheck(id) {
return request({
url: `/run/df/checking/${id}`,
method: 'get',
})
}
// 巡查项目管理-新增堤防巡视检查
export function postEmbankmentInspection(data) {
return request({
url: '/run/df/checking',
method: 'post',
data
})
}
// 巡查项目管理-修改堤防巡视检查
export function putEmbankmentInspection(data) {
return request({
url: '/run/df/checking',
method: 'put',
data
})
}
// 巡查项目管理-删除堤防巡视检查
export function deleteEmbankmentInspection(id) {
return request({
url: `/run/df/checking/${id}`,
method: 'delete',
})
}
// 巡查计划管理-查询堤防巡视检查列表
export function postInspectionPlanlist(data) {
return request({
url: '/run/df/plan/list',
method: 'post',
data
})
}
// 巡查计划管理-堤防巡视检查详情
export function getInspectionPlan(id) {
return request({
url: `/run/df/plan/${id}`,
method: 'get',
})
}
// 巡查计划管理-新增堤防巡视检查
export function postInspectionPlan(data) {
return request({
url: '/run/df/plan',
method: 'post',
data
})
}
// 巡查计划管理-修改堤防巡视检查
export function putInspectionPlan(data) {
return request({
url: '/run/df/plan',
method: 'put',
data
})
}
// 巡查计划管理-删除堤防巡视检查
export function deleteInspectionPlan(id) {
return request({
url: `/run/df/plan/${id}`,
method: 'delete',
})
}
// 巡查计划管理-获取人员信息
export function getPersonnelInformation(id) {
return request({
url: `/system/user/${id}`,
method: 'get',
})
}
// 巡查计划管理-获取用户列表
export function postUserList(data) {
return request({
url: '/system/user/list',
method: 'post',
data
})
}
export * from './dike'
export * from './reservoir'
export * from './sluice'
export { getDicts } from '../system/dict/data'
export { listUser } from '../system/user'

1
src/api/management/reservoir.js

@ -0,0 +1 @@
// 水库相关接口

1
src/api/management/sluice.js

@ -0,0 +1 @@
// 水闸相关接口

1
src/assets/icons/svg/icon-gcxc.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="14" height="14" viewBox="0 0 14 14"><defs><clipPath id="master_svg0_31_00455"><rect x="0" y="0" width="14" height="14" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_31_00455)"><g><path d="M13.8698765625,13.051065576171874L12.7094765625,11.387265576171876L12.8422765625,11.121665576171875C13.7649765625,9.779525576171874,13.7230765625,7.787265576171875,12.7513765625,6.382205576171875C12.7304765625,6.354245576171875,12.7164765625,6.326285576171875,12.7024765625,6.305315576171875C11.6748765625,4.907235576171875,9.9412865625,4.508785576171875,8.5222365625,5.263745576171875C8.3614665625,5.347625576171875,8.2006865625,5.445495576171875,8.0538865625,5.564335576171875C7.9979665625,5.599285576171875,7.9490265625,5.648215576171875,7.8931065625,5.690155576171875C7.5645565625,5.969775576171875,7.2779565625,6.312305576171875,7.0542665625,6.703765576171875C6.9633865625,6.871525576171875,6.8795065625,7.039295576171875,6.8095965625,7.221045576171875C6.3412465625,8.451355576171874,6.4600765625,9.933315576171875,7.2499965625,11.072765576171875C7.4177665625,11.317365576171875,7.6134965625,11.541065576171874,7.8371865625,11.736865576171875C8.9556465625,12.722465576171874,10.5354765625,12.848265576171874,11.7867765625,12.016465576171875L13.0100765625,13.771065576171875C13.0939765625,13.896865576171875,13.2267765625,13.980765576171875,13.3665765625,13.994765576171876C13.5063765625,14.015665576171875,13.6531765625,13.973765576171875,13.7649765625,13.875865576171876C13.8768765625,13.778065576171874,13.9537765625,13.638165576171875,13.9747765625,13.477465576171875C13.9956765625,13.330665576171874,13.9537765625,13.176865576171876,13.8698765625,13.051065576171874ZM11.6259765625,11.079765576171875C10.7171765625,11.855665576171875,9.4659365625,11.897565576171875,8.5082565625,11.191565576171875C8.3334965625,11.065765576171875,8.1727265625,10.911965576171875,8.0399065625,10.751165576171875C7.9839865625,10.681265576171874,7.9350465625,10.618365576171875,7.8861165625,10.548465576171875C7.2080465625,9.583795576171875,7.1591165625,8.311545576171875,7.6694165625,7.304935576171875C7.8441765625,6.948425576171875,8.0818465625,6.647835576171875,8.3754465625,6.403175576171875C9.4589465625,5.473455576171875,11.0107765625,5.606275576171875,11.9474765625,6.717745576171875C12.0942765625,6.885505576171875,12.2201765625,7.074255576171875,12.3179765625,7.276975576171875C12.9680765625,8.535235576171875,12.7024765625,10.170965576171875,11.6259765625,11.079765576171875ZM9.7455565625,3.935575576171875C10.8709765625,3.935575576171875,11.9195765625,4.306065576171875,12.7933765625,4.928205576171875C12.4857765625,3.565085576171875,12.1991765625,2.355745576171875,12.0453765625,1.852445576171875C11.6538765625,0.524272576171875,10.8639765625,0.034946376171875,9.7455565625,0.034946376171875L8.1587365625,0.034946376171875L8.7669065625,4.033435576171875C9.0884565625,3.963535576171875,9.4170065625,3.935575576171875,9.7455565625,3.935575576171875ZM7.7672765625,3.355375576171875L6.4530865625,3.355375576171875L6.3482365625,5.732095576171875C6.7676565625,5.256755576171875,7.2709665625,4.865295576171875,7.8162165625,4.564705576171875L7.7672765625,3.355375576171875ZM7.6274765625,0.048927276171875L6.5928965625,0.048927276171875L6.4950365625,2.250895576171875L7.7183465625,2.250895576171875L7.6274765625,0.048927276171875ZM0.2526295625,10.198965576171876C0.0988417625,10.723265576171874,0.0149572625,11.184565576171876,0.0009765625,11.583065576171874L0.0009765625,11.785765576171874C0.0289380625,12.708465576171875,0.5042835625,13.211765576171874,1.4340065625,13.211765576171874L3.8526665625,13.211765576171874L4.6076365625,8.933685576171875L0.5951585625,8.933685576171875C0.4693315625,9.430005576171874,0.3435045625,9.870395576171875,0.2526295625,10.198965576171876ZM2.4545965625,1.635745576171875C2.3357565625,2.006235576171875,2.1749865625,2.621385576171875,1.9932365625,3.348385576171875L5.5862865625,3.348385576171875L6.1664865625,0.020965576171875L4.0344165625,0.020965576171875C3.1815965625,0.097859676171875,2.9159565625,0.167763576171875,2.4545965625,1.635745576171875ZM0.8957445625,7.745325576171875L4.8103565625,7.745325576171875L5.3695865625,4.550725576171875L1.6926465625,4.550725576171875C1.4270165625,5.585305576171875,1.1543865625,6.717745576171875,0.8957445625,7.745325576171875Z" fill="#262626" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

1
src/assets/icons/svg/icon-xcjhgl.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="14" height="14" viewBox="0 0 14 14"><defs><clipPath id="master_svg0_31_00415"><rect x="0" y="0" width="14" height="14" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_31_00415)"><g><path d="M5.06033234375,0.76202392578125C2.35575234375,0.76202392578125,0.08740234375,3.11762392578125,0.08740234375,6.04031392578125C0.08740234375,7.52346392578125,0.65449134375,8.83213392578125,1.57055234375,9.79182392578125L4.79860234375,13.19432392578125C4.97309234375,13.36882392578125,5.27844234375,13.36882392578125,5.45293234375,13.19432392578125L8.68097234375,9.79182392578125C9.59704234375,8.83213392578125,10.16410234375,7.47984392578125,10.16410234375,6.04031392578125C10.07688234375,3.11762392578125,7.80853234375,0.76202452659625,5.06033234375,0.76202392578125ZM5.06033234375,7.69795392578125C3.96978234375,7.69795392578125,3.09733234375,6.82551392578125,3.09733234375,5.73495392578125C3.09733234375,4.6444039257812495,3.96978234375,3.77195392578125,5.06033234375,3.77195392578125C6.15089234375,3.77195392578125,7.02333234375,4.6444039257812495,7.02333234375,5.73495392578125C7.02333234375,6.82551392578125,6.15089234375,7.69795392578125,5.06033234375,7.69795392578125ZM9.64066234375,13.36882392578125L6.15089234375,13.36882392578125L7.02333234375,12.49642392578125L8.76822234375,12.49642392578125L9.64066234375,13.36882392578125Z" fill="#262626" fill-opacity="1"/></g><g><path d="M14.00275828125,8.832135703125001C14.00275828125,9.748195703124999,13.65377828125,10.577015703125,13.043068281250001,11.187735703125L10.94919828125,13.281595703125C10.81832828125,13.412465703125001,10.64384828125,13.412465703125001,10.51297828125,13.281595703125L8.41911068125,11.144105703125C8.37548828125,11.100485703124999,8.37548828125,11.100485703124999,8.37548828125,11.056865703125L9.24793328125,10.140795703125C9.46604828125,9.922685703125001,9.640528281249999,9.704575703125,9.81501828125,9.486465703124999C10.03312828125,9.748195703124999,10.38210828125,9.922685703125001,10.77470828125,9.922685703125001C11.47266828125,9.922685703125001,12.03975828125,9.355595703125001,12.03975828125,8.701265703125C12.03975828125,8.046935703125,11.47266828125,7.479845703125,10.77470828125,7.479845703125C10.90557828125,6.9563757031249995,10.992818281249999,6.432911703125,10.992818281249999,5.909445703125L10.992818281249999,5.516845703125C12.65046828125,5.647712703125,14.00275828125,7.0436257031250005,14.00275828125,8.832135703125001Z" fill="#262626" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

1
src/assets/icons/svg/icon-xcjl.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="14" height="14" viewBox="0 0 14 14"><defs><clipPath id="master_svg0_31_00486"><rect x="0" y="0" width="14" height="14" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_31_00486)"><g><path d="M13.9999234375,3L13.9999234375,10.5C13.9999234375,11.2726,13.4129234375,11.9188,12.6439234375,11.993L12.4999234375,12L2.9999134375,12L2.9999134375,14L-0.00008746549999999996,14L-0.00008746549999999996,10.5C-0.00005029450000000005,9.72738,0.5868594375,9.08117,1.3559134375,9.007L1.4999134375,9L10.9999234375,9L10.9999234375,3L13.9999234375,3ZM3.4999134375,2.9814e-7C6.1517234375,-0.00106117,7.8414134375,2.83247,6.5799134375,5.165L7.4129134375,6C7.7825134375,6.39358,7.7729534375,7.00949,7.3913034375,7.39141C7.0096534375,7.77332,6.3937534375,7.78332,5.9999134375,7.414L5.1649134375,6.579C3.1583934375,7.66356,0.6672224375,6.56987,0.1076254375,4.3587C-0.4515965625,2.14705,1.2194134375,2.9814e-7,3.4999134375,2.9814e-7ZM3.4999134375,2C2.6714834375,2,1.9999134375,2.67157,1.9999134375,3.5C1.9999134375,4.32843,2.6714834375,5,3.4999134375,5C4.3283434375,5,4.9999134375,4.32843,4.9999134375,3.5C4.9999134375,2.67157,4.3283434375,2,3.4999134375,2ZM13.9999234375,2.9814e-7L13.9999234375,2L10.9999234375,2L10.9999234375,2.9814e-7L13.9999234375,2.9814e-7Z" fill="#262626" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

1
src/assets/icons/svg/icon-xcxmgl.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="14" height="14" viewBox="0 0 14 14"><defs><clipPath id="master_svg0_31_00763"><rect x="0" y="0" width="14" height="14" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_31_00763)"><g><path d="M12.5074,13.868625903320313L11.8947,13.249725903320313L11.6497,13.249725903320313C11.6934,13.217425903320313,11.7372,13.174525903320312,11.781,13.140325903320312L10.5206,11.879125903320313C9.98674,12.200725903320313,9.37581,12.371925903320312,8.75257,12.374525903320313C6.819,12.374525903320313,5.25154,10.807025903320312,5.25154,8.873485903320313C5.25154,6.9399259033203125,6.819,5.372465903320313,8.75257,5.372465903320313L3.50103,5.372465903320313L3.50103,3.6219559033203126L14.0041,3.6219559033203126L14.0041,5.372465903320313L11.6497,5.372465903320313C11.5621,5.315575903320313,11.4659,5.2709359033203125,11.3783,5.219295903320313L11.3783,5.372465903320313L8.75257,5.372465903320313C10.0105,5.362865903320312,11.1754,6.033925903320313,11.7982,7.126945903320313C12.421,8.219965903320313,12.4043,9.564235903320313,11.7547,10.641525903320312L13.0238,11.902725903320313C13.0565,11.856625903320312,13.0916,11.812225903320313,13.1288,11.769725903320312L13.1288,12.012125903320312L13.7503,12.630925903320312L12.5074,13.868625903320313ZM8.75257,7.122975903320312C7.78578,7.122975903320312,7.00205,7.906705903320312,7.00205,8.873495903320313C7.00205,9.840275903320313,7.78578,10.624025903320312,8.75257,10.624025903320312C9.71935,10.624025903320312,10.5031,9.840275903320313,10.5031,8.873495903320313C10.5031,7.906705903320312,9.71935,7.122975903320312,8.75257,7.122975903320312ZM3.50103,0.1209259033203125L14.0041,0.1209259033203125L14.0041,1.8714359033203125L3.50103,1.8714359033203125L3.50103,0.1209259033203125ZM0,10.624025903320312L1.75051,10.624025903320312L1.75051,12.374525903320313L0,12.374525903320313L0,10.624025903320312ZM0,7.122975903320312L1.75051,7.122975903320312L1.75051,8.873495903320313L0,8.873495903320313L0,7.122975903320312ZM0,3.6219559033203126L1.75051,3.6219559033203126L1.75051,5.372465903320313L0,5.372465903320313L0,3.6219559033203126ZM0,0.1209253692623125L1.75051,0.1209253692623125L1.75051,1.8714359033203125L0,1.8714359033203125L0,0.1209253692623125ZM5.85547,12.374525903320313L3.50103,12.374525903320313L3.50103,10.624025903320312L4.22749,10.624025903320312C4.62957,11.324025903320312,5.18643,11.922825903320312,5.85547,12.374525903320313Z" fill="#262626" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

1
src/assets/icons/svg/icon-yxgh.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="14" height="14" viewBox="0 0 14 14"><defs><clipPath id="master_svg0_31_00467"><rect x="0" y="0" width="14" height="14" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_31_00467)"><g><path d="M13.8659,3.50373C13.8659,3.25394,13.7713,3.03116,13.5891,2.84889L11.0035,0.263286C10.8144,0.087762,10.5984,0,10.3554,0C10.1056,0,9.88956,0.087762,9.70729,0.263286L7.12168,2.84889C6.94616,3.03791,6.8584,3.25394,6.8584,3.50373C6.8584,3.75351,6.94616,3.96954,7.12168,4.14506L9.70729,6.73067C9.89631,6.91294,10.1123,7.00745,10.3554,7.00745C10.6052,7.00745,10.8212,6.91294,11.0035,6.73067L13.5891,4.14507C13.7713,3.96954,13.8659,3.75351,13.8659,3.50373ZM5.47178,0.857301C5.27796,0.670932,5.05431,0.581475,4.78594,0.581475L4.78594,0.57402L0.954207,0.57402C0.685836,0.57402,0.462194,0.663477,0.275825,0.849846C0.0894569,1.03621,0,1.25986,0,1.52823L0,5.36742C0,5.62833,0.0894569,5.85943,0.275825,6.05325C0.462194,6.23962,0.685836,6.33653,0.954207,6.33653L4.78594,6.33653C5.05431,6.33653,5.28541,6.23962,5.47178,6.05325C5.65815,5.85943,5.75506,5.63579,5.75506,5.36742L5.75506,1.53568C5.75506,1.26731,5.65815,1.04367,5.47178,0.857301ZM5.47178,8.52077C5.27796,8.3344,5.05431,8.24495,4.78594,8.24495L0.954207,8.24495C0.685836,8.24495,0.462194,8.3344,0.275825,8.52077C0.0894569,8.70714,0,8.93078,0,9.19915L0,13.0458C0,13.3142,0.0894568,13.5378,0.275825,13.7242C0.462194,13.9105,0.685836,14,0.954207,14L4.78594,14C5.05431,14,5.28541,13.9105,5.47178,13.7242C5.65815,13.5378,5.75506,13.3142,5.75506,13.0458L5.75506,9.19915C5.75506,8.93078,5.65815,8.70714,5.47178,8.52077ZM13.1502,8.52077C12.9638,8.3344,12.7401,8.24495,12.4718,8.24495L8.64004,8.24495C8.37167,8.24495,8.14058,8.3344,7.95421,8.52077C7.76784,8.70714,7.67093,8.93078,7.67093,9.19915L7.67093,13.0458C7.67093,13.3142,7.76784,13.5378,7.95421,13.7242C8.14803,13.9105,8.37167,14,8.64004,14L12.4718,14C12.7401,14,12.9638,13.9105,13.1502,13.7242C13.3365,13.5378,13.426,13.3142,13.426,13.0458L13.426,9.19915C13.426,8.93078,13.3365,8.70714,13.1502,8.52077Z" fill-rule="evenodd" fill="#BFBFBF" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/assets/image/bottom-point.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

BIN
src/assets/image/map-point.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 B

17
src/store/modules/permission.js

@ -25,7 +25,7 @@ const permission = {
component: "Layout",
alwaysShow: true,
hidden: false,
meta: { title: "运行管护", icon: "system" },
meta: { title: "运行管护", icon: "icon-yxgh" },
name: "RunManage",
path: "/runManage",
redirect: "noRedirect",
@ -34,28 +34,35 @@ const permission = {
component: "runManage/engineering",
alwaysShow: true,
hidden: false,
meta: { title: "工程巡查", icon: "user" },
meta: { title: "工程巡查", icon: "icon-gcxc" },
name: "Engineering",
path: "/engineering",
children: [
{
component: "runManage/engineering/inspectionItems",
hidden: false,
meta: { title: "巡查项目管理", icon: "user" },
meta: { title: "巡查项目管理", icon: "icon-xcxmgl" },
name: "InspectionItems",
path: "/inspectionItems"
},
{
component: "runManage/engineering/inspectionPlan",
hidden: false,
meta: { title: "巡查计划管理", icon: "user" },
meta: { title: "巡查计划管理", icon: "icon-xcjhgl" },
name: "InspectionPlan",
path: "/inspectionPlan"
},
{
component: "runManage/engineering/patrolRouteSettings",
hidden: true,
meta: { title: "巡查路线设置", icon: "" },
name: "PatrolRouteSettings",
path: "/patrolRouteSettings"
},
{
component: "runManage/engineering/inspectionRecords",
hidden: false,
meta: { title: "巡查记录", icon: "user" },
meta: { title: "巡查记录", icon: "icon-xcjl" },
name: "InspectionRecords",
path: "/inspectionRecords"
},

36
src/views/runManage/engineering/inspectionItems/Dike.vue

@ -1,6 +1,6 @@
<!-- 巡查项目管理-堤防 -->
<script>
import { getDictionaryList, postEmbankmentInspectionChecklist, postEmbankmentInspection, putEmbankmentInspection, deleteEmbankmentInspection, getEmbankmentInspectionCheck } from '@/api/management'
import { getDicts, postEmbankmentInspectionChecklist, postEmbankmentInspection, putEmbankmentInspection, deleteEmbankmentInspection, getEmbankmentInspectionCheck } from '@/api/management'
export default {
name: 'InspectionItems',
data() {
@ -68,21 +68,20 @@ export default {
//
editTableItem(row) {
getEmbankmentInspectionCheck(row.id).then((res) => {
console.log('🚀res🚀', res)
this.ruleForm.name = res.data.name
this.ruleForm.type = res.data.type
this.ruleForm.items = res.data.items
console.log('🚀res🚀', res.data)
this.ruleForm = res.data
this.ruleForm.checkContentType = res.data.items[0].parts[0]
getDictionaryList(res.data.items[0].parts[0]).then((res) => {
getDicts(res.data.items[0].parts[0]).then((res) => {
this.secondType = res.data
console.log('🚀一级🚀', res.data)
})
this.ruleForm.items.forEach(element => {
getDictionaryList(element.parts[1]).then((res) => {
getDicts(element.parts[1]).then((res) => {
this.$set(element, 'third', res.data)
})
});
this.dialogVisible = true
console.log('🚀this.ruleForm🚀', this.ruleForm)
})
},
//
@ -123,7 +122,7 @@ export default {
},
//
changeContentType(dictValue) {
getDictionaryList(dictValue).then((res) => {
getDicts(dictValue).then((res) => {
this.secondType = res.data
console.log('🚀一级🚀', res.data)
})
@ -136,7 +135,7 @@ export default {
},
//
changeSecondType(row) {
getDictionaryList(row.parts[1]).then((res) => {
getDicts(row.parts[1]).then((res) => {
console.log('🚀二级🚀', res.data)
row.parts[2] = ''
this.$set(row, 'third', res.data)
@ -154,10 +153,17 @@ export default {
this.$refs[formName].validate((valid) => {
if (valid) {
console.log(this.ruleForm);
postEmbankmentInspection(this.ruleForm).then((res) => {
this.getTableData()
this.dialogVisible = false
})
if (this.ruleForm.id) {
putEmbankmentInspection(this.ruleForm).then(() => {
this.getTableData()
this.dialogVisible = false
})
} else {
postEmbankmentInspection(this.ruleForm).then(() => {
this.getTableData()
this.dialogVisible = false
})
}
} else {
console.log('校验不通过');
return false;
@ -200,7 +206,7 @@ export default {
//
this.getTableData()
//
getDictionaryList('xs_classfy').then((res) => {
getDicts('xs_classfy').then((res) => {
if (res.data && Array.isArray(res.data)) {
res.data.forEach(element => {
element.dictValue = Number(element.dictValue)
@ -209,7 +215,7 @@ export default {
}
})
//
getDictionaryList('df_xs_c_classfy').then((res) => {
getDicts('df_xs_c_classfy').then((res) => {
if (res.data && Array.isArray(res.data)) {
this.firstType = res.data
}

154
src/views/runManage/engineering/inspectionPlan/Dike.vue

@ -1,14 +1,12 @@
<!-- 巡查计划管理-堤防 -->
<script>
import { getDictionaryList, postInspectionPlanlist, postInspectionPlan, putEmbankmentInspection, deleteEmbankmentInspection, postEmbankmentInspectionChecklist, getInspectionPlan, deleteInspectionPlan, postUserList } from '@/api/management'
import { getDicts, postInspectionPlanlist, postInspectionPlan, putInspectionPlan, postEmbankmentInspectionChecklist, getInspectionPlan, deleteInspectionPlan, listUser } from '@/api/management'
export default {
name: 'InspectionItems',
data() {
return {
searchInput: '',
dialogVisible: false,
ContentType: '',
loading: false,
patrolType: [], //
personnelList: [], //
examType: [], //
@ -59,18 +57,36 @@ export default {
editTableItem(row) {
getInspectionPlan(row.id).then((res) => {
console.log('🚀res🚀', res)
// select
if (res.data.otherConfig.selectUser) {
this.personnelList = []
res.data.otherConfig.selectUser.forEach(element => {
listUser({
data: {
timeView: {
timeField: "create_time"
},
},
cv: {
name: "nickName",
type: "like",
value: element.nickName
},
pageSize: 10,
pageNum: 1
}).then((res) => {
this.personnelList.push(res.records[0])
})
});
}
this.ruleForm = res.data
this.ruleForm.type = res.data.type.toString()
this.dialogVisible = true
if (res.data.cycleType) {
this.ruleForm.cycleType = res.data.cycleType.toString()
}
this.changePatrolType(res)
this.dialogVisible = true
})
// putEmbankmentInspection({ id: row.id }).then((res) => {
// console.log('🚀res🚀', res)
// this.ruleForm.name = res.data.name
// this.ruleForm.type = res.data.type
// this.dialogVisible = true
// console.log(this.examType);
// })
},
//
deleteTableItem(row) {
@ -80,21 +96,17 @@ export default {
this.getTableData()
})
},
//
addPatrolItem() {
this.ruleForm.items.push(
{
content: '',
parts: ['', '', '']
}
)
// 线
routeSetting(row) {
console.log('🚀row🚀', row)
this.$router.push({
path: '/patrolRouteSettings',
query: { id: row.id, name: row.name, editor: true }
})
},
//
newInspectionItems() {
this.dialogVisible = true
getDictionaryList('xs_cycle_type').then((res) => {
this.patrolType = res.data
})
this.ruleForm = {
name: '',
type: '',
@ -102,11 +114,11 @@ export default {
frequency: '',
cycleType: '',
reminderTime: '',
selectUser: [],
operators: [],
otherConfig: {
week: '',
time: ''
time: '',
selectUser: [],
}
}
},
@ -115,7 +127,7 @@ export default {
this.$refs[formName].validate((valid) => {
if (valid) {
let user = []
this.ruleForm.selectUser.forEach(element => {
this.ruleForm.otherConfig.selectUser.forEach(element => {
let a = {
name: element.nickName,
uid: element.id
@ -124,11 +136,19 @@ export default {
});
console.log('🚀user🚀', user)
this.ruleForm.operators = user
postInspectionPlan(this.ruleForm).then((res) => {
console.log('🚀res🚀', res)
this.getTableData()
this.dialogVisible = false
})
if (this.ruleForm.id) {
putInspectionPlan(this.ruleForm).then((res) => {
console.log('🚀res🚀', res)
this.getTableData()
this.dialogVisible = false
})
} else {
postInspectionPlan(this.ruleForm).then((res) => {
console.log('🚀res🚀', res)
this.getTableData()
this.dialogVisible = false
})
}
} else {
console.log('校验不通过');
return false;
@ -161,8 +181,7 @@ export default {
},
//
searchUser(e) {
console.log(this.ruleForm.selectUser);
postUserList({
listUser({
data: {
timeView: {
timeField: "create_time"
@ -181,7 +200,7 @@ export default {
console.log('🚀用户数据🚀', this.ruleForm.operators)
})
},
getTableData() {
getTableData(search) {
postInspectionPlanlist({
data: {
timeView: {
@ -190,7 +209,8 @@ export default {
},
cv: {
name: "name",
type: "like"
type: "like",
value: search
},
pageSize: this.pageData.pageSize,
pageNum: this.pageData.pageNum
@ -204,42 +224,19 @@ export default {
}
},
mounted() {
this.pageData.total = this.tableData.length
getDictionaryList('xs_classfy').then((res) => {
console.log('🚀检查类型🚀', res)
//
this.getTableData()
getDicts('xs_classfy').then((res) => {
if (res.data && Array.isArray(res.data)) {
res.data.forEach(element => {
element.dictValue = element.dictValue
});
this.examType = res.data
console.log('🚀this.examType🚀', this.examType)
}
})
getDictionaryList('df_xs_c_classfy').then((res) => {
if (res.data && Array.isArray(res.data)) {
console.log('🚀res.data🚀', res.data)
}
})
//
postInspectionPlanlist({
data: {
timeView: {
timeField: "create_time"
}
},
cv: {
name: "name",
type: "like",
value: this.searchInput
},
pageSize: this.pageData.pageSize,
pageNum: this.pageData.pageNum
}).then((res) => {
if (res) {
this.tableData = res.records
this.pageData.total = res.total
}
console.log('🚀res1🚀', res)
getDicts('xs_cycle_type').then((res) => {
console.log('🚀res.data🚀', res.data)
this.patrolType = res.data
})
},
}
@ -254,15 +251,13 @@ export default {
<div class="top-search">
<span>计划名称</span>
<el-input class="search-input" v-model="searchInput" placeholder="请输入计划名称" />
<el-button class="search-btn" type="success">搜索</el-button>
<el-button class="search-btn" type="success" @click="getTableData(searchInput)">搜索</el-button>
</div>
<el-button class="search-btn" style=" margin-right: 16px;margin-bottom: 8px; float: right;" type="success"
@click="newInspectionItems()">添加</el-button>
<el-table class="table" :data="tableData" border>
<el-table-column type="index" align="center" label="序号" width="100">
</el-table-column>
<el-table-column prop="name" align="center" label="计划名称">
</el-table-column>
<el-table class="table" height="650" :data="tableData" border>
<el-table-column type="index" align="center" label="序号" width="100" />
<el-table-column prop="name" align="center" label="计划名称" />
<el-table-column align="center" label="巡查类型">
<template slot-scope="scope">
<span v-if="examType.length > 0">{{ examType.find(item => item.dictValue == scope.row.type).dictLabel ||
@ -270,12 +265,9 @@ export default {
}}</span>
</template>
</el-table-column>
<el-table-column prop="createTime" align="center" sortable label="最近巡查时间">
</el-table-column>
<el-table-column prop="createTime" align="center" sortable label="创建时间">
</el-table-column>
<el-table-column prop="updateTime" align="center" sortable label="更新时间">
</el-table-column>
<el-table-column prop="createTime" align="center" sortable label="最近巡查时间" />
<el-table-column prop="createTime" align="center" sortable label="创建时间" />
<el-table-column prop="updateTime" align="center" sortable label="更新时间" />
<el-table-column prop="address" align="center" label="操作">
<template slot-scope="scope">
<el-button style=" margin-right: 16px;" @click="editTableItem(scope.row)" type="text"
@ -284,7 +276,7 @@ export default {
title="确定删除吗?" @confirm="deleteTableItem(scope.row)">
<el-button style="color: red;margin-right: 16px;" type="text" size="small" slot="reference">删除</el-button>
</el-popconfirm>
<el-button @click="editTableItem(scope.row)" type="text" size="small">路线设置</el-button>
<el-button @click="routeSetting(scope.row)" type="text" size="small">路线设置</el-button>
</template>
</el-table-column>
</el-table>
@ -293,7 +285,7 @@ export default {
:total="pageData.total" @size-change="getTableData()">
</el-pagination>
</div>
<el-dialog title="新增/编辑巡查计划" destroy-on-close :visible.sync="dialogVisible" width="50%">
<el-dialog title="新增/编辑巡查计划" :visible.sync="dialogVisible" width="50%">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-ruleForm">
<el-form-item label-width="120px" label="计划名称" prop="name">
<el-input style="width: 202px;" v-model="ruleForm.name"></el-input>
@ -332,13 +324,13 @@ export default {
<el-radio :label="7">星期日</el-radio>
</el-radio-group>
<el-time-picker v-if="ruleForm.cycleType != 2 && ruleForm.type == 0" v-model="ruleForm.reminderTime"
value-format="hh:mm:ss" placeholder="请选择时间点" />
value-format="yyyy-MM-dd hh:mm:ss" placeholder="请选择时间点" />
<el-date-picker v-if="ruleForm.cycleType == 2 || ruleForm.type != 0" v-model="ruleForm.reminderTime"
value-format="yyyy-MM-dd hh:mm:ss" type="datetime" placeholder="选择日期时间" />
</el-form-item>
<el-form-item label-width="120px" label="巡查人员" prop="operators">
<el-select v-model="ruleForm.selectUser" multiple filterable remote :remote-method="searchUser" value-key="id"
placeholder="请输入关键词搜索用户" prop="selectUser">
<el-form-item label-width="120px" label="责任人" prop="operators">
<el-select v-model="ruleForm.otherConfig.selectUser" multiple filterable remote :remote-method="searchUser"
value-key="id" placeholder="请输入关键词搜索用户" prop="selectUser">
<el-option v-for="item in personnelList" :key="item.id" :label="item.nickName" :value="item">
</el-option>
</el-select>

170
src/views/runManage/engineering/inspectionRecords/Dike.vue

@ -0,0 +1,170 @@
<!-- 巡查记录-堤防 -->
<script>
import { postInspectionRecordsList, } from '@/api/management'
export default {
name: 'InspectionItems',
data() {
return {
searchInput: '',
tableData: [], //
pageData: {
pageNum: 1, //
pageSize: 10, //
pageSizes: [10, 20, 50, 100],
total: 0 //
},
}
},
methods: {
// 线
routeSetting(row) {
console.log('🚀row🚀', row)
this.$router.push({
path: '/patrolRouteSettings',
query: { name: row.name, editor: false,id:row.id }
})
},
getTableData(search) {
postInspectionRecordsList({
data: {
timeView: {
timeField: "create_time"
}
},
cv: {
name: "name",
type: "like",
value: search
},
pageSize: this.pageData.pageSize,
pageNum: this.pageData.pageNum
}).then((res) => {
if (res) {
this.tableData = res.records
this.pageData.total = res.total
}
console.log('🚀列表数据🚀', res)
})
}
},
mounted() {
//
this.getTableData()
},
}
</script>
<template>
<div class="body">
<div class="top-title">
基础信息管理
</div>
<div class="table-box">
<div class="top-search">
<span>巡检记录</span>
<el-input class="search-input" v-model="searchInput" placeholder="请输入巡检记录" />
<el-button class="search-btn" type="success" @click="getTableData(searchInput)">搜索</el-button>
</div>
<el-table class="table" height="650" :data="tableData" border>
<el-table-column type="index" align="center" label="序号" width="100" />
<el-table-column prop="name" align="center" label="巡检记录" />
<el-table-column align="center" label="有无异常">
<template slot-scope="scope">
<div v-if="scope.row.status != 0" style="display: flex; justify-content: center; flex-wrap: wrap;">
<div v-if="scope.row.parts" class="normal">正常</div>
<div v-else v-for="item in scope.row.parts" class="abnormal">{{ item }}</div>
</div>
</template>
</el-table-column>
<el-table-column prop="operatorName" align="center" label="巡查人员" />
<el-table-column prop="status" align="center" label="状态">
<template slot-scope="scope">
<span>{{ scope.row.status === 0 ? '检查中' : '已完成' }}</span>
</template>
</el-table-column>
<el-table-column prop="address" align="center" label="操作">
<template slot-scope="scope">
<el-button @click="routeSetting(scope.row)" type="text" size="small">巡查轨迹</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination background class="pagination" style="margin-top: 16px;margin-right: 16px;float: right;"
:current-page="pageData.pageNum" :page-sizes="pageData.pageSizes" layout="total, prev, pager, next, sizes, jumper"
:total="pageData.total" @size-change="getTableData()">
</el-pagination>
</div>
</div>
</template>
<style scoped lang="less">
.body {
width: 100%;
min-height: calc(100vh - 56px);
margin-left: 24px;
.top-title {
height: 40px;
background-color: white;
display: flex;
padding-left: 16px;
align-items: center;
font-weight: 600;
}
.table-box {
width: 100%;
min-height: calc(100vh - 56px - 64px);
margin-top: 24px;
padding: 16px;
background-color: white;
.top-search {
display: flex;
align-items: center;
margin-bottom: 8px;
.search-input {
width: 300px;
margin-right: 10px;
}
}
.search-btn {
margin-left: 10px;
background-color: #37b29e;
border: none;
&:hover {
background-color: #5ac6b9;
}
&:active {
background-color: #2b8070;
}
;
}
.table {
height: calc(680px - 34px);
.normal {
width: 40px;
border-radius: 5px;
background-color: #ebf7f5;
color: #36b29e;
}
.abnormal {
width: 40px;
border-radius: 5px;
background-color: #feebeb;
color: #d9001b;
margin-right: 10px;
margin-bottom: 10px;
}
}
}
}
</style>

22
src/views/runManage/engineering/inspectionRecords/Reservoir.vue

@ -0,0 +1,22 @@
<!-- 巡查项目管理-水库 -->
<script>
export default {
name: '',
data() {
return {
}
},
methods: {
}
}
</script>
<template>
<div>
水库
</div>
</template>
<style scoped lang="less"></style>

22
src/views/runManage/engineering/inspectionRecords/Sluice.vue

@ -0,0 +1,22 @@
<!-- 巡查项目管理-水闸 -->
<script>
export default {
name: '',
data() {
return {
}
},
methods: {
}
}
</script>
<template>
<div>
水闸
</div>
</template>
<style scoped lang="less"></style>

81
src/views/runManage/engineering/inspectionRecords/index.vue

@ -1,72 +1,29 @@
<!-- 工程巡查 -->
<script lang="ts">
<!-- 巡查记录 -->
<script>
import Dike from './Dike.vue'
import Reservoir from './Reservoir.vue'
import Sluice from './Sluice.vue'
export default {
name: 'IconSelect',
data() {
return {
name: '',
}
name: 'InspectionItems',
components: {
Reservoir, //
Sluice, //
Dike, //
},
methods: {
searchData() {
console.log('搜索内容', this.name);
}
computed: {
selectTab() {
return this.$store.state.topTab.selectTab
},
}
}
</script>
<template>
<div class="body">
<div class="top-title">
基础信息管理
</div>
<div class="table-box">
<div class="top-search">
<span>计划名称</span>
<el-input class="search-input" v-model="this.name" placeholder="请输入计划名称" @input="this.searchData" />
<el-button class="search-btn" type="success">搜索</el-button>
</div>
</div>
<div>
<Reservoir v-if="selectTab == 0"></Reservoir>
<Sluice v-if="selectTab == 1"></Sluice>
<Dike v-if="selectTab == 2"></Dike>
</div>
</template>
<style scoped lang="less">
.body {
width: 100%;
min-height: calc(100vh - 56px);
margin-left: 24px;
.top-title {
height: 40px;
background-color: white;
display: flex;
padding-left: 16px;
align-items: center;
font-weight: 600;
}
.table-box {
width: 100%;
min-height: calc(100vh - 56px - 64px);
margin-top: 24px;
padding: 16px;
background-color: white;
.top-search{
display: flex;
align-items: center;
.search-input{
width: 300px;
margin-right: 10px;
}
.search-btn{
background-color: #37b29e;
border: none;
&:hover{
background-color: #5ac6b9;
};
&:active{
background-color: #2b8070;
};
}
}
}
}
</style>
<style scoped lang="less"></style>

65
src/views/runManage/engineering/patrolRouteSettings/Dike.vue

@ -0,0 +1,65 @@
<!-- 巡查路线设置-堤防 -->
<script>
import GaoDeMap from "./components/GaoDeMap.vue"
export default {
name: '',
components: {
GaoDeMap
},
data() {
return {
selectTab: 'first'
}
},
methods: {
}
}
</script>
<template>
<div class="body">
<div class="top-title">
基础信息管理
</div>
<div class="map-box">
<el-tabs v-model="selectTab" class="tab">
<el-tab-pane style="padding: 0px 16px;" label="电子地图" name="first">
<GaoDeMap />
</el-tab-pane>
<el-tab-pane label="平面图" name="second">平面图</el-tab-pane>
</el-tabs>
</div>
</div>
</template>
<style scoped lang="less">
.body {
width: 100%;
min-height: calc(100vh - 56px);
.top-title {
height: 40px;
background-color: white;
display: flex;
padding-left: 16px;
align-items: center;
font-weight: 600;
}
.map-box {
background-color: #fff;
border-radius: 8px;
min-height: calc(100vh - 56px - 40px - 48px);
margin: 24px;
.tab {
/deep/.el-tabs__nav {
.el-tabs__item:first-of-type {
margin-left: 16px;
}
}
}
}
}
</style>

22
src/views/runManage/engineering/patrolRouteSettings/Reservoir.vue

@ -0,0 +1,22 @@
<!-- 巡查路线设置-水库 -->
<script>
export default {
name: '',
data() {
return {
}
},
methods: {
}
}
</script>
<template>
<div>
水库
</div>
</template>
<style scoped lang="less"></style>

22
src/views/runManage/engineering/patrolRouteSettings/Sluice.vue

@ -0,0 +1,22 @@
<!-- 巡查路线设置-水闸 -->
<script>
export default {
name: '',
data() {
return {
}
},
methods: {
}
}
</script>
<template>
<div>
水闸
</div>
</template>
<style scoped lang="less"></style>

224
src/views/runManage/engineering/patrolRouteSettings/components/Drawer.vue

@ -0,0 +1,224 @@
<!-- 巡查记录抽屉 -->
<script>
export default {
name: '',
data() {
return {
drawerVisible: false,
tableData: [
{ content: '张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三', photos: '编辑', delete: '删除' },
{ content: '张三', photos: '编辑', delete: '删除' },
{ content: '张三', photos: '编辑', delete: '删除' },
{ content: '张三', photos: '编辑', delete: '删除' },
{ content: '张三', photos: '编辑', delete: '删除' },
{ content: '张三', photos: '编辑', delete: '删除' },
{ content: '张三', photos: '编辑', delete: '删除' },
{ content: '张三', photos: '编辑', delete: '删除' },
{ content: '张三', photos: '编辑', delete: '删除' },
{ content: '张三', photos: '编辑', delete: '删除' },
{ content: '张三', photos: '编辑', delete: '删除' },
{ content: '张三', photos: '编辑', delete: '删除' },
{ content: '张三', photos: '编辑', delete: '删除' },
{ content: '张三', photos: '编辑', delete: '删除' },
{ content: '张三', photos: '编辑', delete: '删除' },
{ content: '张三', photos: '编辑', delete: '删除' },
{ content: '张三', photos: '编辑', delete: '删除' },
{ content: '张三', photos: '编辑', delete: '删除' },
{ content: '张三', photos: '编辑', delete: '删除' },
{ content: '张三', photos: '编辑', delete: '删除' },
]
}
},
methods: {
handleSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (rowIndex < 4 || (rowIndex > 4 && rowIndex < 9) || (rowIndex > 8 && rowIndex < 11) || (rowIndex > 10 && rowIndex < 13) || (rowIndex > 12 && rowIndex < 18)) {
if (rowIndex === 0 || rowIndex === 5 || rowIndex === 9 || rowIndex === 11 || rowIndex === 13) {
return {
rowspan: [4, 4, 2, 2, 5][[0, 5, 9, 11, 13].indexOf(rowIndex)],
colspan: 1
};
} else {
return {
rowspan: 0,
colspan: 0
};
}
}
}
},
}
}
</script>
<template>
<div>
<div class="masking" :class="drawerVisible ? 'masking-in' : ''">
<div class="close-btn" @click="drawerVisible = false">
<i class="el-icon-arrow-right"></i>
</div>
<div class="drawer-title">
<span>巡查记录</span>
</div>
<div class="center-table">
<el-table :data="tableData" height="636" border style="width: 100%" :span-method="handleSpanMethod">
<el-table-column align="center" class="first-column" label="工程部位" width="210">
<template slot-scope="scope">
<div v-if="scope.$index == 0">
<div class="box1">
<div class="item1">堤身</div>
<div class="item2">堤顶</div>
<div class="item3">堤坡</div>
<div class="item4">迎水坡</div>
<div class="item5">背水坡</div>
<div class="item6">护坡结构</div>
<div class="item7">堤脚</div>
</div>
</div>
<div v-if="scope.$index == 4" style="height: 88px;">护坡地和堤防工程保护范围</div>
<div v-if="scope.$index == 5">堤岸防护工程</div>
<div v-if="scope.$index == 9">防渗排水设施</div>
<div v-if="scope.$index == 11">交叉建筑物及接连段</div>
<div v-if="scope.$index == 13">管理设施</div>
<div v-if="scope.$index == 18">生物防护工程</div>
<div v-if="scope.$index == 19">其他</div>
</template>
</el-table-column>
<el-table-column prop="content" align="center" class-name="aaaaa" label="检查内容" width="200" />
<el-table-column prop="photos" align="center" label="打卡图片" width="150" />
<el-table-column align="center" label="检查记录">
<el-table-column prop="isNormal" align="center" label="是否正常" width="150" />
<el-table-column prop="problems" align="center" label="存在问题" width="150" />
</el-table-column>
</el-table>
</div>
</div>
</div>
</template>
<style scoped lang="less">
.masking {
position: absolute;
top: 0;
width: 50%;
height: 100%;
left: 120%;
z-index: 2;
background-color: #fff;
transition: left 0.5s ease-in-out;
box-shadow: -8px 0px 38px 0px rgba(0, 0, 0, 0.6);
.close-btn {
width: 32px;
height: 32px;
position: absolute;
top: 48px;
left: -16px;
background-color: #fff;
border: 1px solid #DCDCDC;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
i {
color: #36b29e;
}
}
.drawer-title {
width: 100%;
height: 64px;
line-height: 64px;
padding-left: 16px;
border-bottom: 1px solid #e7e7e7;
}
.center-table {
padding: 16px;
.box1 {
height: 352x;
display: grid;
grid-template-columns: repeat(3, 70px);
grid-template-rows: repeat(8, 44px);
}
.item1 {
grid-row: 1 / 9;
grid-column: 1;
line-height: 352px;
justify-content: center;
align-content: center;
border-right: 1px solid #f4f9f7;
}
.item2 {
grid-row: 1/3;
grid-column: 2/ 4;
line-height: 88px;
justify-content: center;
align-content: center;
border-bottom: 1px solid #f4f9f7;
}
.item3 {
grid-row: 3/7;
grid-column: 2;
line-height: 176px;
justify-content: center;
align-content: center;
border-right: 1px solid #f4f9f7;
}
.item4 {
line-height: 44px;
justify-content: center;
align-content: center;
border-bottom: 1px solid #f4f9f7;
}
.item5 {
line-height: 44px;
justify-content: center;
align-content: center;
border-bottom: 1px solid #f4f9f7;
}
.item6 {
grid-row: 7/5;
grid-column: 3;
line-height: 88px;
justify-content: center;
align-content: center;
}
.item7 {
grid-row: 9/7;
grid-column: 2/4;
line-height: 88px;
justify-content: center;
align-content: center;
border-top: 1px solid #f4f9f7;
}
}
}
.masking-in {
left: 50%;
}
/deep/.el-table__body td {
padding: 0;
height: 88px !important;
/* 设置单元格的固定高度 */
overflow: hidden;
}
/deep/.el-table__body td .cell {
padding: 0 !important;
}
</style>

242
src/views/runManage/engineering/patrolRouteSettings/components/GaoDeMap.vue

@ -0,0 +1,242 @@
<!-- 高德地图 -->
<template>
<div id="container">
<!-- <div class="box">
<span v-for="(checkpoint, index) in checkpoints" :key="index" @click="selectCheckpoint(checkpoint)">{{
checkpoint.name }}</span>
</div> -->
<el-button class="open-drawer-btn" size="mini" @click="drawerVisible = true">展开抽屉</el-button>
</div>
</template>
<script>
import AMapLoader from "@amap/amap-jsapi-loader";
import { postInspectionRoute, getInspectionRoute, postInspectionRecordsTrajectoryList } from '@/api/management'
export default {
name: "map-view",
data() {
return {
checkpoints: [
// {
// name: '1',
// location: [113.431415, 23.104388]
// },
// {
// name: '2',
// location: [113.432021, 23.1038]
// },
// {
// name: '3',
// location: [113.431747, 23.102794]
// }
],
AMap: {},
};
},
mounted() {
this.initAMap();
},
unmounted() {
this.map?.destroy();
},
methods: {
// 线
renderedPolyline() {
this.map.remove(this.map.getAllOverlays('polyline'));
if (this.checkpoints.length > 1) {
const polyline = new this.AMap.Polyline({
path: this.checkpoints.map((checkpoint) => checkpoint.location),
strokeColor: "#37E4FF",
strokeWeight: 4,
strokeOpacity: 1,
bubble: true
});
polyline.setMap(this.map);
}
},
//
addCheckpoint(name, location) {
const icon = new this.AMap.Icon({
size: new this.AMap.Size(20, 20),
image: require('@/assets/image/map-point.png'),
imageSize: new AMap.Size(20, 20),
anchor: 'center',
})
const marker = new this.AMap.Marker({
position: location,
title: name,
icon,
anchor: 'bottom-center',
bubble: true,
label: { content: name, direction: 'top' },
});
marker.setMap(this.map);
this.checkpoints.push({ name, location, marker });
console.log('🚀checkpoints🚀', this.checkpoints)
this.renderedPolyline()
},
//
selectCheckpoint(checkpoint) {
const icon = new this.AMap.Icon({
size: new this.AMap.Size(20, 20),
image: require('@/assets/image/map-point.png'),
imageSize: new AMap.Size(20, 20),
anchor: 'center',
})
this.map.setCenter(checkpoint.location);
this.map.setZoom(18)
this.checkpoints.forEach((cp) => {
const marker = cp.marker;
if (cp === checkpoint) {
marker.setIcon('https://webapi.amap.com/theme/v1.3/markers/n/mark_r.png');
} else {
marker.setIcon(icon);
}
});
},
//
removeLastCheckpoint() {
const lastCheckpoint = this.checkpoints.pop();
const marker = lastCheckpoint.marker;
marker.setMap(null);
this.renderedPolyline()
},
// 线
saveInspectionRoute() {
let data = []
this.checkpoints.forEach(element => {
let a = {
longitude: element.location[0],
latitude: element.location[1]
}
data.push(a)
});
postInspectionRoute(this.$route.query.id, data).then((res) => {
this.$message({
message: '保存成功',
type: 'success'
});
})
},
//
initAMap() {
AMapLoader.load({
key: "67533ae78bf28afc2a3da3d10d308fa1", // WebKey load
version: "2.0", // JSAPI 1.4.15
plugins: [], // 使'AMap.Scale'
})
.then((AMap) => {
this.AMap = AMap
var satellite = new AMap.TileLayer.Satellite() //
this.map = new AMap.Map("container", {
// id
viewMode: "3D", // 3D
zoom: 18, //
doubleClickZoom: false, //
layers: [
satellite,
],
center: [113.43094, 23.10346], //
});
//
this.map.on("complete", () => {
console.log('🚀地图加载完毕🚀')
if (this.$route.query.editor) {
//
getInspectionRoute(this.$route.query.id).then((res) => {
res.data.forEach((element, index) => {
this.addCheckpoint("检查点" + (index + 1), [element.longitude, element.latitude])
});
})
} else {
postInspectionRecordsTrajectoryList({
data: {
timeView: {
timeField: "create_time"
},
recordId: this.$route.query.id
},
cv: {
name: "name",
type: "like",
},
pageSize: 100,
pageNum: 1
}).then((res) => {
console.log('🚀res🚀', res)
res.records.forEach((element, index) => {
this.addCheckpoint("检查点" + (index + 1), [element.longitude, element.latitude])
});
})
}
// 线
if (this.checkpoints.length > 1) {
this.renderedPolyline()
}
});
if (this.$route.query.editor) {
//
this.map.on('click', (e) => {
const { lng, lat } = e.lnglat;
const name = `检查点${this.checkpoints.length + 1}`;
this.addCheckpoint(name, [lng, lat]);
});
//
this.map.on('dblclick', () => {
this.saveInspectionRoute()
console.log('双击保存', this.checkpoints);
});
//
this.map.on('rightclick', () => {
if (this.checkpoints.length > 0) {
// this.removeLastCheckpoint();
this.checkpoints.forEach((checkpoint) => {
checkpoint.marker.setMap(null); // marker
});
this.checkpoints = []; // checkpoints
this.renderedPolyline() // 线
}
});
}
})
.catch((e) => {
console.log(e);
});
},
},
};
</script>
<style scoped lang="scss">
#container {
width: 100%;
height: calc(100vh - 56px - 40px - 48px - 70px);
position: relative;
.box {
width: 100px;
background: #fff;
display: flex;
flex-wrap: wrap;
}
.open-drawer-btn {
position: fixed;
top: 125px;
right: 40px;
}
}
/deep/.amap-marker-label {
background-color: rgba(0, 0, 0, 0.6);
border: none;
border-radius: 2px;
color: #fff;
font-size: 12px;
padding: 4px 8px;
}
</style>

29
src/views/runManage/engineering/patrolRouteSettings/index.vue

@ -0,0 +1,29 @@
<!-- 巡查路线设置 -->
<script>
import Dike from './Dike.vue'
import Reservoir from './Reservoir.vue'
import Sluice from './Sluice.vue'
export default {
name: 'InspectionItems',
components: {
Reservoir, //
Sluice, //
Dike, //
},
computed: {
selectTab() {
return this.$store.state.topTab.selectTab
},
}
}
</script>
<template>
<div>
<Reservoir v-if="selectTab == 0"></Reservoir>
<Sluice v-if="selectTab == 1"></Sluice>
<Dike v-if="selectTab == 2"></Dike>
</div>
</template>
<style scoped lang="less"></style>
Loading…
Cancel
Save