封闭卡口,排水井模块开发

liujun0703-新项目开发
WenShiJun 2024-07-08 16:29:46 +08:00
parent feb7be0e48
commit 9123ad5c5b
10 changed files with 1046 additions and 19256 deletions

19217
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@
"author": "",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --host 192.168.0.90",
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --host 192.168.0.29",
"start": "npm run dev",
"unit": "jest --config test/unit/jest.conf.js --coverage",
"e2e": "node test/e2e/runner.js",

View File

@ -55,7 +55,6 @@
no-children-text="暂无数据"
@input="handleOrgTypeChange"
/>
</el-form-item>
<el-form-item label="运输机构级别" prop="ORG_LEVEL">
<el-input v-model="form.ORG_LEVEL" placeholder="请输入运输机构级别..." />

View File

@ -0,0 +1,247 @@
<template>
<div>
<div class="app-container">
<div class="level-title">
<h1>通信机构详情</h1>
</div>
<div class="mb-20">
<table class="table-ui">
<tr>
<td class="tbg">通信机构名称</td>
<td>{{ form.ORG_NAME }}</td>
<td class="tbg">地址</td>
<td>{{ form.ADDRESS }}</td>
</tr>
<tr>
<td class="tbg">通信机构类型</td>
<td>{{ form.ORG_TYPE_NAME }}</td>
<td class="tbg">通信机构级别</td>
<td>{{ form.ORG_LEVEL }}</td>
</tr>
<tr>
<td class="tbg">邮编</td>
<td>{{ form.POSTAL_CODE }}</td>
<td class="tbg">机构密级</td>
<td>{{ form.SECURITY_LEVEL }}</td>
</tr>
<tr>
<td class="tbg">值班电话</td>
<td>{{ form.DUTY_PHONE }}</td>
<td class="tbg">传真</td>
<td>{{ form.FAX }}</td>
</tr>
<tr>
<td class="tbg">所属区域</td>
<td colspan="3">{{ form.ADMINISTRATIVE_REGION_NAME }}</td>
</tr>
<tr>
<td class="tbg">经度</td>
<td>{{ form.LONGITUDE }}</td>
<td class="tbg">纬度</td>
<td>{{ form.LATITUDE }}</td>
</tr>
<tr>
<td class="tbg">应急通讯车数</td>
<td>{{ form.EMERGENCY_COMMUNICATION_VEHICLES }}</td>
<td class="tbg">应急发电车数</td>
<td>{{ form.EMERGENCY_POWER_VEHICLES }}</td>
</tr>
<tr>
<td class="tbg">卫星电话数</td>
<td>{{ form.SATELLITE_PHONES }}</td>
<td class="tbg">基站总数</td>
<td>{{ form.TOTAL_BASE_STATIONS }}</td>
</tr>
<tr>
<td class="tbg">应急通讯方式</td>
<td colspan="3">{{ form.EMERGENCY_COMMUNICATION_MODE }}</td>
</tr>
<tr>
<td class="tbg">负责人</td>
<td>{{ form.RESPONSIBLE_PERSON }}</td>
<td class="tbg">负责人办公电话</td>
<td>{{ form.RESPONSIBLE_OFFICE_PHONE }}</td>
</tr>
<tr>
<td class="tbg">负责人移动电话</td>
<td>{{ form.RESPONSIBLE_MOBILE_PHONE }}</td>
<td class="tbg">负责人住宅电话</td>
<td>{{ form.RESPONSIBLE_HOME_PHONE }}</td>
</tr>
<tr>
<td class="tbg">联系人</td>
<td>{{ form.CONTACT_PERSON }}</td>
<td class="tbg">联系人办公电话</td>
<td>{{ form.CONTACT_OFFICE_PHONE }}</td>
</tr>
<tr>
<td class="tbg">联系人移动电话</td>
<td>{{ form.CONTACT_MOBILE_PHONE }}</td>
<td class="tbg">联系人住宅电话</td>
<td>{{ form.CONTACT_HOME_PHONE }}</td>
</tr>
<tr>
<td class="tbg">联系人电子邮箱</td>
<td>{{ form.CONTACT_EMAIL }}</td>
</tr>
<tr>
<td class="tbg">主管单位名称</td>
<td>{{ form.SUPERVISING_UNIT_NAME }}</td>
<td class="tbg">主管单位地址</td>
<td>{{ form.SUPERVISING_UNIT_ADDRESS }}</td>
</tr>
<tr>
<td class="tbg">企业基本情况</td>
<td colspan="3">{{ form.COMPANY_OVERVIEW }}</td>
</tr>
<tr>
<td class="tbg">应急能力描述</td>
<td colspan="3">{{ form.EMERGENCY_CAPACITY_DESCRIPTION }}</td>
</tr>
<tr>
<td class="tbg">备注</td>
<td colspan="3">{{ form.REMARK }}</td>
</tr>
</table>
</div>
</div>
<div class="ui-height" />
<div class="ui-foot">
<el-button type="primary" @click="goBack"></el-button>
</div>
</div>
</template>
<script>
import { requestFN } from '@/utils/request'
export default {
data() {
return {
form: {
ORG_NAME: '',
ORG_TYPE: '',
ORG_TYPE_NAME: '',
ORG_LEVEL: '',
ADDRESS: '',
POSTAL_CODE: '',
SECURITY_LEVEL: '',
DUTY_PHONE: '',
FAX: '',
ADMINISTRATIVE_REGION: '',
ADMINISTRATIVE_REGION_NAME: '',
LONGITUDE: '',
LATITUDE: '',
EMERGENCY_COMMUNICATION_VEHICLES: 0,
EMERGENCY_POWER_VEHICLES: 0,
SATELLITE_PHONES: 0,
TOTAL_BASE_STATIONS: 0,
EMERGENCY_COMMUNICATION_MODE: '',
RESPONSIBLE_PERSON: '',
RESPONSIBLE_OFFICE_PHONE: '',
RESPONSIBLE_MOBILE_PHONE: '',
RESPONSIBLE_HOME_PHONE: '',
CONTACT_PERSON: '',
CONTACT_OFFICE_PHONE: '',
CONTACT_MOBILE_PHONE: '',
CONTACT_HOME_PHONE: '',
CONTACT_EMAIL: '',
SUPERVISING_UNIT: '',
SUPERVISING_UNIT_NAME: '',
SUPERVISING_UNIT_ADDRESS: '',
COMPANY_OVERVIEW: '',
EMERGENCY_CAPACITY_DESCRIPTION: '',
REMARK: ''
},
Id: ''
}
},
created() {
console.log('this.$parent.CASE_ID', this.$parent.CASE_ID)
if (this.$parent.CASE_ID) {
this.Id = this.$parent.CASE_ID
this.getDetail(this.Id)
}
this.getTreeList()
this.getDepartmentList()
},
methods: {
goBack() {
this.$parent.activeName = 'list'
},
getTreeList() {
const params = {
PARENT_ID: '5a5d2809ed644aa6ba97a5240ff35484'
}
requestFN('/dictionaries/listTree', params).then((data) => {
this.treeData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
console.error('获取树形数据失败', e)
})
},
getDepartmentList() {
requestFN('/department/listAll').then((data) => {
this.DepartmentData = data.list.map(item => ({
id: item.department_ID,
label: item.name
}))
}).catch((e) => {
console.error('获取主管单位数据失败', e)
})
},
getDetail(Id) {
const params = { Id }
requestFN('/major/communication/detail', params).then((response) => {
const data = response.msg
this.form = {
ORG_NAME: data.ORG_NAME,
ORG_TYPE: data.ORG_TYPE,
ORG_TYPE_NAME: data.ORG_TYPE_NAME,
ORG_LEVEL: data.ORG_LEVEL,
ADDRESS: data.ADDRESS,
POSTAL_CODE: data.POSTAL_CODE,
SECURITY_LEVEL: data.SECURITY_LEVEL,
DUTY_PHONE: data.DUTY_PHONE,
FAX: data.FAX,
ADMINISTRATIVE_REGION: data.ADMINISTRATIVE_REGION,
ADMINISTRATIVE_REGION_NAME: data.ADMINISTRATIVE_REGION_NAME,
LONGITUDE: data.LONGITUDE,
LATITUDE: data.LATITUDE,
EMERGENCY_COMMUNICATION_VEHICLES: data.EMERGENCY_COMMUNICATION_VEHICLES,
EMERGENCY_POWER_VEHICLES: data.EMERGENCY_POWER_VEHICLES,
SATELLITE_PHONES: data.SATELLITE_PHONES,
TOTAL_BASE_STATIONS: data.TOTAL_BASE_STATIONS,
EMERGENCY_COMMUNICATION_MODE: data.EMERGENCY_COMMUNICATION_MODE,
RESPONSIBLE_PERSON: data.RESPONSIBLE_PERSON,
RESPONSIBLE_OFFICE_PHONE: data.RESPONSIBLE_OFFICE_PHONE,
RESPONSIBLE_MOBILE_PHONE: data.RESPONSIBLE_MOBILE_PHONE,
RESPONSIBLE_HOME_PHONE: data.RESPONSIBLE_HOME_PHONE,
CONTACT_PERSON: data.CONTACT_PERSON,
CONTACT_OFFICE_PHONE: data.CONTACT_OFFICE_PHONE,
CONTACT_MOBILE_PHONE: data.CONTACT_MOBILE_PHONE,
CONTACT_HOME_PHONE: data.CONTACT_HOME_PHONE,
CONTACT_EMAIL: data.CONTACT_EMAIL,
SUPERVISING_UNIT: data.SUPERVISING_UNIT,
SUPERVISING_UNIT_NAME: data.SUPERVISING_UNIT_NAME,
SUPERVISING_UNIT_ADDRESS: data.SUPERVISING_UNIT_ADDRESS,
COMPANY_OVERVIEW: data.COMPANY_OVERVIEW,
EMERGENCY_CAPACITY_DESCRIPTION: data.EMERGENCY_CAPACITY_DESCRIPTION,
REMARK: data.REMARK,
Id: data.ID
}
}).catch((e) => {
console.error('获取详情数据失败', e)
})
}
}
}
</script>
<style lang="sass" scoped>
.table-ui
td
line-height: 34px
.tbg
width: 200px
.ui-foot
text-align: center
margin-top: 20px
</style>

View File

@ -0,0 +1,242 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-form inline>
<el-form-item label="名称:" prop="NAME">
<el-input v-model="NAME" placeholder="名称" class="filter-item" style="width: 200px;" />
</el-form-item>
<el-form-item>
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getQuery"></el-button>
<el-button class="filter-item" type="default" icon="el-icon-refresh" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
</div>
<el-table ref="multipleTable" :data="varList" :header-cell-style="{'font-weight': 'bold','color': '#000'}" tooltip-effect="dark" border fit highlight-current-row>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="NAME" label="名称" width="180" />
<el-table-column prop="ADDRESS" label="地址" show-overflow-tooltip="true" />
<el-table-column prop="CONTACT_PERSON" label="联系人" show-overflow-tooltip="true" />
<el-table-column prop="CONTACT_PHONE" label="联系电话" show-overflow-tooltip="true" />
<el-table-column prop="DESCRIPTION" label="描述" show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" width="300">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.ID)"></el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID, row.NAME)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<template>
<el-button type="primary" icon="el-icon-plus" @click="handleAdd"></el-button>
<el-button type="danger" icon="el-icon-delete" plain @click="makeAll('0')"></el-button>
</template>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
<el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='editUser'?'修改':'新增'" width="1000px">
<el-form ref="form" :rules="rules" :model="form" label-width="250px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="名称" prop="NAME">
<el-input v-model="form.NAME" placeholder="请输入名称..." />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="地址" prop="ADDRESS">
<el-input v-model="form.ADDRESS" placeholder="请输入地址..." />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="联系人" prop="CONTACT_PERSON">
<el-input v-model="form.CONTACT_PERSON" placeholder="请输入联系人..." />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系电话" prop="CONTACT_PHONE">
<el-input v-model="form.CONTACT_PHONE" placeholder="请输入联系电话..." />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="描述" prop="DESCRIPTION">
<el-input v-model="form.DESCRIPTION" type="textarea" placeholder="请输入描述..." />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormEdit = false">取消</el-button>
<el-button type="primary" @click="confirm"></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
export default {
components: { Pagination },
data() {
return {
listQuery: {
page: 1,
limit: 10
},
total: 0,
varList: [],
NAME: '',
ADDRESS: '',
CONTACT_PERSON: '',
dialogFormEdit: false,
dialogFormShow: false,
dialogType: 'add',
form: {
NAME: '',
ADDRESS: '',
CONTACT_PERSON: '',
CONTACT_PHONE: '',
DESCRIPTION: ''
}
// rules: {
// NAME: [
// { required: true, message: '', trigger: 'blur' },
// { min: 2, max: 255, message: ' 2 255 ', trigger: 'blur' }
// ],
// ADDRESS: [
// { required: true, message: '', trigger: 'blur' },
// { min: 2, max: 255, message: ' 2 255 ', trigger: 'blur' }
// ],
// CONTACT_PERSON: [
// { required: true, message: '', trigger: 'blur' },
// { min: 2, max: 255, message: ' 2 255 ', trigger: 'blur' }
// ],
// CONTACT_PHONE: [
// { required: true, message: '', trigger: 'blur' },
// { min: 2, max: 50, message: ' 2 50 ', trigger: 'blur' }
// ],
// DESCRIPTION: [
// { required: true, message: '', trigger: 'blur' },
// { min: 2, max: 255, message: ' 2 255 ', trigger: 'blur' }
// ]
// }
}
},
created() {
this.getList()
},
methods: {
getList() {
this.listLoading = true
requestFN(
'/major/checkpoint/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
NAME: this.NAME
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
}).catch((e) => {
this.listLoading = false
})
},
handleEdit(ID) {
this.dialogFormEdit = true
this.dialogType = 'editUser'
this.getDetail(ID)
},
getDetail(ID) {
const params = { Id: ID }
requestFN('/major/checkpoint/detail', params).then((response) => {
const data = response.msg
this.form = {
Id: data.ID,
NAME: data.NAME,
ADDRESS: data.ADDRESS,
CONTACT_PERSON: data.CONTACT_PERSON,
CONTACT_PHONE: data.CONTACT_PHONE,
DESCRIPTION: data.DESCRIPTION
}
}).catch((e) => {
console.error('获取详情数据失败', e)
})
},
handleAdd() {
this.dialogFormEdit = true
this.dialogType = 'saveUser'
this.form = {
NAME: '',
ADDRESS: '',
CONTACT_PERSON: '',
CONTACT_PHONE: '',
DESCRIPTION: ''
}
},
confirm() {
this.dataSave()
},
dataSave() {
this.listLoading = true
requestFN('/major/checkpoint/save', this.form).then((data) => {
this.listLoading = false
this.dialogFormEdit = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
},
handleDelete(id, NAME) {
this.$confirm(`确定要删除[${NAME}]吗?`, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN('/major/checkpoint/delete', { id: id }).then((data) => {
if (data.result == 'success') {
this.listLoading = false
this.getList()
}
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {})
},
makeAll() {
const _selectData = this.$refs.multipleTable.selection
if (_selectData == null || _selectData.length == 0) {
this.$message({ message: '请选中要删除的项...', type: 'error' })
return false
}
const ids = _selectData.map(item => item.ID).join(',')
this.$confirm('确定要删除选中的数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN('/major/checkpoint/deleteAll', { ids: ids }).then(() => {
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.$refs.multipleTable.clearSelection()
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {})
},
resetQuery() {
this.NAME = ''
this.getQuery()
},
getQuery() {
this.$refs.multipleTable.clearSelection()
this.getList()
}
}
}
</script>

View File

@ -0,0 +1,19 @@
<template>
<div>
<list v-show="activeName=='list'" ref="list" />
<detail v-if="activeName=='detail'"/>
</div>
</template>
<script>
import list from './components/list.vue'
import detail from './components/detail.vue'
export default {
components: { list, detail },
data() {
return {
activeName: 'list',
CASE_ID: ''
}
}
}
</script>

View File

@ -0,0 +1,211 @@
<template>
<div>
<div class="app-container">
<div class="level-title">
<h1>运输保障机构详情</h1>
</div>
<div class="mb-20">
<table class="table-ui">
<tr>
<td class="tbg">运输机构名称</td>
<td>{{ form.ORG_NAME }}</td>
<td class="tbg">地址</td>
<td>{{ form.ADDRESS }}</td>
</tr>
<tr>
<td class="tbg">运输机构类型</td>
<td>{{ form.ORG_TYPE }}</td>
<td class="tbg">运输机构级别</td>
<td>{{ form.ORG_LEVEL }}</td>
</tr>
<tr>
<td class="tbg">邮编</td>
<td>{{ form.POSTAL_CODE }}</td>
<td class="tbg">机构密级</td>
<td>{{ form.SECURITY_LEVEL }}</td>
</tr>
<tr>
<td class="tbg">值班电话</td>
<td>{{ form.DUTY_PHONE }}</td>
<td class="tbg">传真</td>
<td>{{ form.FAX }}</td>
</tr>
<tr>
<td class="tbg">所属区域</td>
<td colspan="3">{{ form.ADMINISTRATIVE_REGION_NAME }}</td>
</tr>
<tr>
<td class="tbg">经度</td>
<td>{{ form.LONGITUDE }}</td>
<td class="tbg">纬度</td>
<td>{{ form.LATITUDE }}</td>
</tr>
<tr>
<td class="tbg">应急运输方式</td>
<td colspan="3">{{ form.EMERGENCY_TRANSPORT_MODE }}</td>
</tr>
<tr>
<td class="tbg">负责人</td>
<td>{{ form.RESPONSIBLE_PERSON }}</td>
<td class="tbg">负责人办公电话</td>
<td>{{ form.RESPONSIBLE_OFFICE_PHONE }}</td>
</tr>
<tr>
<td class="tbg">负责人移动电话</td>
<td>{{ form.RESPONSIBLE_MOBILE_PHONE }}</td>
<td class="tbg">负责人住宅电话</td>
<td>{{ form.RESPONSIBLE_HOME_PHONE }}</td>
</tr>
<tr>
<td class="tbg">联系人</td>
<td>{{ form.CONTACT_PERSON }}</td>
<td class="tbg">联系人办公电话</td>
<td>{{ form.CONTACT_OFFICE_PHONE }}</td>
</tr>
<tr>
<td class="tbg">联系人移动电话</td>
<td>{{ form.CONTACT_MOBILE_PHONE }}</td>
<td class="tbg">联系人住宅电话</td>
<td>{{ form.CONTACT_HOME_PHONE }}</td>
</tr>
<tr>
<td class="tbg">联系人电子邮箱</td>
<td>{{ form.CONTACT_EMAIL }}</td>
</tr>
<tr>
<td class="tbg">主管单位名称</td>
<td>{{ form.SUPERVISING_UNIT_NAME }}</td>
<td class="tbg">主管单位地址</td>
<td>{{ form.SUPERVISING_UNIT_ADDRESS }}</td>
</tr>
<tr>
<td class="tbg">企业基本情况</td>
<td colspan="3">{{ form.COMPANY_OVERVIEW }}</td>
</tr>
<tr>
<td class="tbg">客运能力</td>
<td>{{ form.PASSENGER_TRANSPORT_CAPACITY }}</td>
<td class="tbg">货运能力</td>
<td>{{ form.CARGO_TRANSPORT_CAPACITY }}</td>
</tr>
<tr>
<td class="tbg">应急能力描述</td>
<td colspan="3">{{ form.EMERGENCY_CAPACITY_DESCRIPTION }}</td>
</tr>
<tr>
<td class="tbg">备注</td>
<td colspan="3">{{ form.REMARK }}</td>
</tr>
</table>
</div>
</div>
<div class="ui-height" />
<div class="ui-foot">
<el-button type="primary" @click="goBack"></el-button>
</div>
</div>
</template>
<script>
import { requestFN } from '@/utils/request'
export default {
data() {
return {
form: {
ORG_NAME: '',
ORG_TYPE: '',
ORG_LEVEL: '',
ADDRESS: '',
POSTAL_CODE: '',
SECURITY_LEVEL: '',
DUTY_PHONE: '',
FAX: '',
ADMINISTRATIVE_REGION: '',
ADMINISTRATIVE_REGION_NAME: '',
LONGITUDE: '',
LATITUDE: '',
EMERGENCY_TRANSPORT_MODE: '',
RESPONSIBLE_PERSON: '',
RESPONSIBLE_OFFICE_PHONE: '',
RESPONSIBLE_MOBILE_PHONE: '',
RESPONSIBLE_HOME_PHONE: '',
CONTACT_PERSON: '',
CONTACT_OFFICE_PHONE: '',
CONTACT_MOBILE_PHONE: '',
CONTACT_HOME_PHONE: '',
CONTACT_EMAIL: '',
SUPERVISING_UNIT: '',
SUPERVISING_UNIT_NAME: '',
SUPERVISING_UNIT_ADDRESS: '',
COMPANY_OVERVIEW: '',
PASSENGER_TRANSPORT_CAPACITY: '',
CARGO_TRANSPORT_CAPACITY: '',
EMERGENCY_CAPACITY_DESCRIPTION: '',
REMARK: ''
},
Id: ''
}
},
created() {
if (this.$parent.CASE_ID) {
this.Id = this.$parent.CASE_ID
this.getDetail(this.Id)
}
},
methods: {
goBack() {
this.$parent.activeName = 'list'
},
getDetail(Id) {
const params = { Id }
requestFN('/major/transportation/detail', params).then((response) => {
const data = response.msg
this.form = {
ORG_NAME: data.ORG_NAME,
ORG_TYPE: data.ORG_TYPE,
ORG_LEVEL: data.ORG_LEVEL,
ADDRESS: data.ADDRESS,
POSTAL_CODE: data.POSTAL_CODE,
SECURITY_LEVEL: data.SECURITY_LEVEL,
DUTY_PHONE: data.DUTY_PHONE,
FAX: data.FAX,
ADMINISTRATIVE_REGION: data.ADMINISTRATIVE_REGION,
ADMINISTRATIVE_REGION_NAME: data.ADMINISTRATIVE_REGION_NAME,
LONGITUDE: data.LONGITUDE,
LATITUDE: data.LATITUDE,
EMERGENCY_TRANSPORT_MODE: data.EMERGENCY_TRANSPORT_MODE,
RESPONSIBLE_PERSON: data.RESPONSIBLE_PERSON,
RESPONSIBLE_OFFICE_PHONE: data.RESPONSIBLE_OFFICE_PHONE,
RESPONSIBLE_MOBILE_PHONE: data.RESPONSIBLE_MOBILE_PHONE,
RESPONSIBLE_HOME_PHONE: data.RESPONSIBLE_HOME_PHONE,
CONTACT_PERSON: data.CONTACT_PERSON,
CONTACT_OFFICE_PHONE: data.CONTACT_OFFICE_PHONE,
CONTACT_MOBILE_PHONE: data.CONTACT_MOBILE_PHONE,
CONTACT_HOME_PHONE: data.CONTACT_HOME_PHONE,
CONTACT_EMAIL: data.CONTACT_EMAIL,
SUPERVISING_UNIT: data.SUPERVISING_UNIT,
SUPERVISING_UNIT_NAME: data.SUPERVISING_UNIT_NAME,
SUPERVISING_UNIT_ADDRESS: data.SUPERVISING_UNIT_ADDRESS,
COMPANY_OVERVIEW: data.COMPANY_OVERVIEW,
PASSENGER_TRANSPORT_CAPACITY: data.PASSENGER_TRANSPORT_CAPACITY,
CARGO_TRANSPORT_CAPACITY: data.CARGO_TRANSPORT_CAPACITY,
EMERGENCY_CAPACITY_DESCRIPTION: data.EMERGENCY_CAPACITY_DESCRIPTION,
REMARK: data.REMARK
}
}).catch((e) => {
console.error('获取详情数据失败', e)
})
}
}
}
</script>
<style lang="sass" scoped>
.table-ui
td
line-height: 34px
.tbg
width: 200px
.ui-foot
text-align: center
margin-top: 20px
</style>

View File

@ -0,0 +1,269 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-form inline>
<el-form-item label="名称:" prop="NAME">
<el-input v-model="NAME" placeholder="名称" class="filter-item" style="width: 200px;" />
</el-form-item>
<el-form-item label="类型" prop="TYPE">
<Treeselect
:options="yjTypeData"
:normalizer="normalizer"
v-model="TYPE"
placeholder="请选择类型"
no-options-text="暂无数据"
no-children-text="暂无数据"
class="filter-item"
style="width: 200px;"
/>
</el-form-item>
<el-form-item class="filter-buttons">
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getQuery"></el-button>
<el-button class="filter-item" type="default" icon="el-icon-refresh" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
</div>
<el-table ref="multipleTable" :data="varList" :header-cell-style="{'font-weight': 'bold','color': '#000'}" tooltip-effect="dark" border fit highlight-current-row>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="NAME" label="名称" width="180" />
<el-table-column prop="TYPE_NAME" label="类型名称" show-overflow-tooltip="true" />
<el-table-column prop="ADDRESS" label="地址" show-overflow-tooltip="true" />
<el-table-column prop="CONTACT_PERSON" label="联系人" show-overflow-tooltip="true" />
<el-table-column prop="CONTACT_PHONE" label="联系电话" show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" width="300">
<template slot-scope="{ row }">
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.ID)"></el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID, row.NAME)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<template>
<el-button type="primary" icon="el-icon-plus" @click="handleAdd"></el-button>
<el-button type="danger" icon="el-icon-delete" plain @click="makeAll('0')"></el-button>
</template>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
<el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='editUser'?'修改':'新增'" width="1000px">
<el-form ref="form" :rules="rules" :model="form" label-width="250px">
<el-form-item label="名称" prop="NAME">
<el-input v-model="form.NAME" placeholder="请输入名称..." />
</el-form-item>
<el-form-item label="类型" prop="TYPE">
<Treeselect
:options="yjTypeData"
:normalizer="normalizer"
v-model="form.TYPE"
placeholder="请选择类型"
no-options-text="暂无数据"
no-children-text="暂无数据"
@input="handleTypeChange"
/>
</el-form-item>
<el-form-item label="地址" prop="ADDRESS">
<el-input v-model="form.ADDRESS" placeholder="请输入地址..." />
</el-form-item>
<el-form-item label="联系人" prop="CONTACT_PERSON">
<el-input v-model="form.CONTACT_PERSON" placeholder="请输入联系人..." />
</el-form-item>
<el-form-item label="联系电话" prop="CONTACT_PHONE">
<el-input v-model="form.CONTACT_PHONE" placeholder="请输入联系电话..." />
</el-form-item>
<el-form-item label="描述" prop="DESCRIPTION">
<el-input v-model="form.DESCRIPTION" type="textarea" placeholder="请输入描述..." />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormEdit = false">取消</el-button>
<el-button type="primary" @click="confirm"></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import { Treeselect } from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default {
components: { Treeselect, Pagination },
data() {
return {
listQuery: {
page: 1,
limit: 10
},
total: 0,
varList: [],
NAME: '',
TYPE: null,
dialogFormEdit: false,
dialogFormShow: false,
dialogType: 'add',
form: {
NAME: '',
TYPE: null,
TYPE_NAME: '',
ADDRESS: '',
CONTACT_PERSON: '',
CONTACT_PHONE: '',
DESCRIPTION: ''
},
yjTypeData: [],
normalizer(node) {
return {
id: node.DICTIONARIES_ID,
label: node.name,
children: node.nodes
}
}
}
},
created() {
this.getyjTypeDataList()
this.getList()
},
methods: {
handleTypeChange(value) {
const selectedOrgType = this.yjTypeData.find(type => type.DICTIONARIES_ID === value)
if (selectedOrgType) {
this.form.TYPE_NAME = selectedOrgType.name
}
},
resetQuery() {
this.NAME = ''
this.TYPE = null
this.getQuery()
},
getList() {
this.listLoading = true
requestFN(
'/major/drainage/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
NAME: this.NAME,
TYPE: this.TYPE
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
}).catch((e) => {
this.listLoading = false
})
},
getyjTypeDataList() {
const params = {
PARENT_ID: '2bd21d9d4d254f179e79f75d6377f651'
}
requestFN('/dictionaries/listTree', params).then((data) => {
this.yjTypeData = JSON.parse(data.zTreeNodes)
console.log('Data loaded:', this.yjTypeData)
}).catch((e) => {
console.error('获取树形数据失败', e)
})
},
handleEdit(ID) {
this.dialogFormEdit = true
this.dialogType = 'editUser'
this.getDetail(ID)
},
getDetail(ID) {
const params = { Id: ID }
requestFN('/major/drainage/detail', params).then((response) => {
const data = response.msg
this.form = {
Id: data.ID,
NAME: data.NAME,
TYPE: data.TYPE,
TYPE_NAME: data.TYPE_NAME,
ADDRESS: data.ADDRESS,
CONTACT_PERSON: data.CONTACT_PERSON,
CONTACT_PHONE: data.CONTACT_PHONE,
DESCRIPTION: data.DESCRIPTION
}
}).catch((e) => {
console.error('获取详情数据失败', e)
})
},
handleAdd() {
this.dialogFormEdit = true
this.dialogType = 'saveUser'
this.form = {
NAME: '',
TYPE: null,
TYPE_NAME: '',
ADDRESS: '',
CONTACT_PERSON: '',
CONTACT_PHONE: '',
DESCRIPTION: ''
}
console.log('Form initialized:', this.form)
},
confirm() {
this.dataSave()
},
dataSave() {
this.listLoading = true
requestFN('/major/drainage/save', this.form).then((data) => {
this.listLoading = false
this.dialogFormEdit = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
},
handleDelete(id, NAME) {
this.$confirm(`确定要删除[${NAME}]吗?`, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN('/major/drainage/delete', { id: id }).then((data) => {
if (data.result == 'success') {
this.listLoading = false
this.getList()
}
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {})
},
makeAll() {
const _selectData = this.$refs.multipleTable.selection
if (_selectData == null || _selectData.length == 0) {
this.$message({ message: '请选中要删除的项...', type: 'error' })
return false
}
const ids = _selectData.map(item => item.ID).join(',')
this.$confirm('确定要删除选中的数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN('/major/drainage/deleteAll', { ids: ids }).then(() => {
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.$refs.multipleTable.clearSelection()
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {})
},
getQuery() {
this.$refs.multipleTable.clearSelection()
this.getList()
}
}
}
</script>

View File

@ -0,0 +1,19 @@
<template>
<div>
<list v-show="activeName=='list'" ref="list" />
<detail v-if="activeName=='detail'"/>
</div>
</template>
<script>
import list from './components/list.vue'
import detail from './components/detail.vue'
export default {
components: { list, detail },
data() {
return {
activeName: 'list',
CASE_ID: ''
}
}
}
</script>

View File

@ -31,7 +31,6 @@
<el-table-column label="操作" align="center" width="300">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-document" size="mini" @click="goList('detail', row.ID, '1')">查看</el-button>
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.ID)"></el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID, row.RESOURCE_LIBRARY_NAME)">删除</el-button>
</template>
@ -108,41 +107,41 @@ export default {
CONTACT_PHONE: '',
CONTACT_MOBILE_PHONE: '',
COMPANY_NAME: ''
},
rules: {
RESOURCE_LIBRARY_NAME: [
{ required: true, message: '资源库名称不能为空', trigger: 'blur' },
{ min: 2, max: 255, message: '长度在 2 到 255 个字符', trigger: 'blur' }
],
LOCATION: [
{ required: true, message: '所在地点不能为空', trigger: 'blur' },
{ min: 2, max: 255, message: '长度在 2 到 255 个字符', trigger: 'blur' }
],
RESOURCE_CATEGORY: [
{ required: true, message: '存放资源类别不能为空', trigger: 'blur' },
{ min: 2, max: 255, message: '长度在 2 到 255 个字符', trigger: 'blur' }
],
RESOURCE_QUANTITY: [
{ required: true, message: '资源数量不能为空', trigger: 'blur' },
{ min: 1, max: 255, message: '长度在 1 到 255 个字符', trigger: 'blur' }
],
CONTACT_PERSON: [
{ required: true, message: '联系人不能为空', trigger: 'blur' },
{ min: 2, max: 255, message: '长度在 2 到 255 个字符', trigger: 'blur' }
],
CONTACT_PHONE: [
{ required: true, message: '联系电话不能为空', trigger: 'blur' },
{ min: 2, max: 255, message: '长度在 2 到 255 个字符', trigger: 'blur' }
],
CONTACT_MOBILE_PHONE: [
{ required: true, message: '联系人手机号码不能为空', trigger: 'blur' },
{ min: 2, max: 50, message: '长度在 2 到 50 个字符', trigger: 'blur' }
],
COMPANY_NAME: [
{ required: true, message: '企业名称不能为空', trigger: 'blur' },
{ min: 2, max: 255, message: '长度在 2 到 255 个字符', trigger: 'blur' }
]
}
// rules: {
// RESOURCE_LIBRARY_NAME: [
// { required: true, message: '', trigger: 'blur' },
// { min: 2, max: 255, message: ' 2 255 ', trigger: 'blur' }
// ],
// LOCATION: [
// { required: true, message: '', trigger: 'blur' },
// { min: 2, max: 255, message: ' 2 255 ', trigger: 'blur' }
// ],
// RESOURCE_CATEGORY: [
// { required: true, message: '', trigger: 'blur' },
// { min: 2, max: 255, message: ' 2 255 ', trigger: 'blur' }
// ],
// RESOURCE_QUANTITY: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 255, message: ' 1 255 ', trigger: 'blur' }
// ],
// CONTACT_PERSON: [
// { required: true, message: '', trigger: 'blur' },
// { min: 2, max: 255, message: ' 2 255 ', trigger: 'blur' }
// ],
// CONTACT_PHONE: [
// { required: true, message: '', trigger: 'blur' },
// { min: 2, max: 255, message: ' 2 255 ', trigger: 'blur' }
// ],
// CONTACT_MOBILE_PHONE: [
// { required: true, message: '', trigger: 'blur' },
// { min: 2, max: 50, message: ' 2 50 ', trigger: 'blur' }
// ],
// COMPANY_NAME: [
// { required: true, message: '', trigger: 'blur' },
// { min: 2, max: 255, message: ' 2 255 ', trigger: 'blur' }
// ]
// }
}
},
created() {
@ -154,8 +153,9 @@ export default {
requestFN(
'/major/resource/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
RESOURCE_LIBRARY_NAME: this.KEYWORDS_RESOURCE_LIBRARY_NAME,
RESOURCE_CATEGORY: this.KEYWORDS_RESOURCE_CATEGORY
RESOURCE_LIBRARY_NAME: this.RESOURCE_LIBRARY_NAME,
LOCATION: this.LOCATION,
CONTACT_PERSON: this.CONTACT_PERSON
}
).then((data) => {
this.listLoading = false
@ -175,6 +175,7 @@ export default {
requestFN('/major/resource/detail', params).then((response) => {
const data = response.msg
this.form = {
Id: data.ID,
RESOURCE_LIBRARY_NAME: data.RESOURCE_LIBRARY_NAME,
LOCATION: data.LOCATION,
RESOURCE_CATEGORY: data.RESOURCE_CATEGORY,