| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" @submit.native.prevent> |
| | | <el-form-item label="点位名称" prop="pointName"> |
| | | <el-input v-model="queryParams.pointName" placeholder="输入点位名称" clearable @keyup.enter.native="handleQuery" /> |
| | | <el-input v-model="queryParams.pointName" placeholder="输入点位名称" clearable @clear="handleQuery" @keyup.enter.native="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="单位" prop="unit"> |
| | | <el-select |
| | | v-model="queryParams.unitId" |
| | | placeholder="请选择单位" |
| | | clearable |
| | | @change="handleQuery" |
| | | > |
| | | <el-option |
| | | v-for="unit in unitList" |
| | | :key="unit.id" |
| | | :label="unit.value" |
| | | :value="unit.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button> |
| | |
| | | size="small" |
| | | v-model="ywTimes" |
| | | type="daterange" |
| | | value-format="yyyy-MM-dd" |
| | | range-separator="至" |
| | | start-placeholder="更换运维时间" |
| | | end-placeholder="更换运维时间"> |
| | |
| | | <!-- <el-button type="danger" plain icon="el-icon-receiving" size="mini" @click="handleEditBatch"--> |
| | | <!-- v-hasPermi="['point:edit']">批量修改</el-button>--> |
| | | <!-- </el-col>--> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | <right-toolbar @refreshHeader= "getDyColumn" :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="pointList" @selection-change="handleSelectionChange"> |
| | | <el-table :key = "refreshkey" v-loading="loading" :data="pointList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="点位名称" prop="pointName" width="200" show-overflow-tooltip/> |
| | | <el-table-column label="标签" align="center" width="200" show-overflow-tooltip> |
| | |
| | | <el-table-column label="运维单位" align="center" prop="unitName" /> |
| | | <el-table-column label="监管部门" align="center" prop="deptName" /> |
| | | <el-table-column label="备注" align="center" prop="remark" /> |
| | | <el-table-column v-for="(column, index) in dynamicColumnList" :key="index" :label="column.labelValue" :prop="column.propName" align="center"> |
| | | <template slot-scope="scope"> |
| | | {{ getDynamicValue(scope.row, column.propName) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" |
| | |
| | | </el-cascader> |
| | | </el-form-item> |
| | | <el-form-item label="运维单位" prop="unitId"> |
| | | <el-select v-model="form.unitId" placeholder="运维单位"> |
| | | <el-select v-model="form.unitId" placeholder="运维单位" clearable @clear = "clearTime"> |
| | | <el-option v-for="item in unitList" :key="item.id" :label="item.value" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | start-placeholder="运维开始时间" |
| | | end-placeholder="运维结束时间"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="用户名" prop="remark"> |
| | | <el-input v-model="form.username"/> |
| | | </el-form-item> |
| | | <el-form-item label="密码" prop="remark"> |
| | | <el-input v-model="form.password"/> |
| | | </el-form-item> |
| | | <el-form-item label="点位备注" prop="remark"> |
| | | <el-input type="textarea" v-model="form.remark"/> |
| | |
| | | inactive-text="普通点位"> |
| | | </el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="省厅:" prop="provinceTag"> |
| | | <el-form-item label="视频:" prop="provinceTagVideo"> |
| | | <el-switch |
| | | v-model="form.provinceTag" |
| | | v-model="form.provinceTagVideo" |
| | | active-color="#13ce66" |
| | | inactive-color="gray" |
| | | active-text="省厅点位" |
| | | inactive-text="普通点位"> |
| | | </el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="车辆:" prop="provinceTagCar"> |
| | | <el-switch |
| | | v-model="form.provinceTagCar" |
| | | active-color="#13ce66" |
| | | inactive-color="gray" |
| | | active-text="省厅点位" |
| | | inactive-text="普通点位"> |
| | | </el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="人脸:" prop="provinceTagFace"> |
| | | <el-switch |
| | | v-model="form.provinceTagFace" |
| | | active-color="#13ce66" |
| | | inactive-color="gray" |
| | | active-text="省厅点位" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { addDynamicColumn, deleteDynamicColumnById, editDynamicColumn, getDynamicColumnList } from '@/api/platform/dynamicColumn' |
| | | import { listPoint, getPoint, delPoint, addPoint, batchEdit, updatePoint, exportData, importData, timeRange } from "@/api/platform/point"; |
| | | import { unitSelect } from "@/api/platform/unit"; |
| | | import { getCascader } from '@/api/platform/region' |
| | | import { cascader } from '@/api/system/dept' |
| | | |
| | | export default { |
| | | name: "Point", |
| | | dicts: ['point_tag', 'area_code'], |
| | | data() { |
| | | return { |
| | | refreshkey : 0, |
| | | dynamicColumnList: [], |
| | | needUpdateUnit: false, |
| | | importantTag: false, |
| | | provinceTag: false, |
| | | importantCommandImageTag: false, |
| | | timeList: [], |
| | | timezone: [], |
| | | timezone: null, |
| | | ywTimes: [], |
| | | fileList: [], |
| | | importFile: null, |
| | |
| | | this.getUnitSelect(); |
| | | // this.getCascader(); |
| | | this.getDeptCascader(); |
| | | this.getDyColumn(); |
| | | }, |
| | | methods: { |
| | | clearTime() { |
| | | console.log("生效") |
| | | this.timezone = ''; |
| | | }, |
| | | getDyColumn() { |
| | | // 查询动态列 |
| | | let params = { |
| | | tableName: 't_yw_point' |
| | | } |
| | | getDynamicColumnList(params).then(res => { |
| | | this.dynamicColumnList = res.data |
| | | this.refreshkey+=1 |
| | | console.log("加载动态列"+this.refreshkey) |
| | | }) |
| | | }, |
| | | getDynamicValue(row, propName) { |
| | | let target = row.dynamicColumnList.filter(item => item.propName === propName) |
| | | return target && target.length > 0 ? target[0].columnValue : '' |
| | | }, |
| | | getTagText(row) { |
| | | let text = ''; |
| | | |
| | | // 检查每个标签,如果为true,则添加到text中 |
| | | if (row.importantTag) text += '重点点位、'; |
| | | if (row.provinceTag) text += '省厅点位、'; |
| | | if (row.provinceTagVideo) text += '省厅视频、'; |
| | | if (row.provinceTagCar) text += '省厅车辆、'; |
| | | if (row.provinceTagFace) text += '省厅人脸、'; |
| | | if (row.importantCommandImageTag) text += '重点指挥图像、'; |
| | | if (row.deptTag) text += '部级、'; |
| | | text === '' ? '普通点位' : text |
| | |
| | | handleEditBatch() { |
| | | this.batchOpen = true; |
| | | }, |
| | | |
| | | // 运维公司下拉数据 |
| | | selectUnit() { |
| | | workList(this.queryParams).then(res => { |
| | | this.unitList = res.data; |
| | | }) |
| | | }, |
| | | // 获取区县级联 |
| | | getCascader() { |
| | | getCascader().then(res => { |
| | |
| | | updateTime: null, |
| | | deleted: null, |
| | | importantTag: false, |
| | | provinceTag: false, |
| | | provinceTagVideo: false, |
| | | provinceTagCar: false, |
| | | provinceTagFace: false, |
| | | deptTag: false, |
| | | }; |
| | | this.resetForm("form"); |
| | |
| | | submitForm() { |
| | | this.$refs['form'].validate(valid => { |
| | | if (valid) { |
| | | if (this.timezone && this.timezone.length > 0) { |
| | | this.form.startTime = this.timezone[0] |
| | | this.form.endTime = this.timezone[1] |
| | | } else { |
| | | this.form.startTime = null |
| | | this.form.endTime = null |
| | | } |
| | | if (this.form.deptId && this.form.deptId.length > 0) { |
| | | this.form.deptId = this.form.deptId[this.form.deptId.length - 1] |
| | | } |