New file |
| | |
| | | import http from "@/http"; |
| | | |
| | | export default { |
| | | baseCaseQuery: (params) => { |
| | | return http.get('/sccg/base_case/query_case', params); |
| | | } |
| | | } |
New file |
| | |
| | | import http from "@/http"; |
| | | |
| | | export default { |
| | | importImage: (params) => { |
| | | return http.uploadFile('/sccg/file/medias', params); |
| | | }, |
| | | |
| | | getImageResources: (params) => { |
| | | return http.get('/sccg/image_resources/query', params); |
| | | }, |
| | | |
| | | addImageResource: (params) => { |
| | | return http.post('/sccg/image_resources/addition', params); |
| | | }, |
| | | |
| | | deleteImageResource: (params) => { |
| | | return http.delete('/sccg/image_resources/deletion', params); |
| | | }, |
| | | |
| | | updateImageResource: (params) => { |
| | | return http.put('/sccg/image_resources/modification', params); |
| | | }, |
| | | |
| | | deleteImageResources: (params) => { |
| | | return http.delete('/sccg/image_resources/deletion_batch', params); |
| | | } |
| | | } |
New file |
| | |
| | | import http from "@/http"; |
| | | |
| | | export default { |
| | | getMybackLog: (params) => { |
| | | return http.get('/sccg/my_backlog/query', params); |
| | | } |
| | | } |
| | |
| | | import axios from "axios"; |
| | | import {getToken} from '@/utils/helper' |
| | | const baseUrl = '/sccg/equipment_bayonet' |
| | | const token = { |
| | | 'Authorization':getToken() |
| | | } |
| | | import http from "@/http"; |
| | | export default { |
| | | // 获取卡口列表 |
| | | getBayonetList: (data) => axios({ |
| | | method: 'get', |
| | | url: baseUrl+'/query', |
| | | headers:{...token}, |
| | | params: data |
| | | }), |
| | | // 导出卡口设备 |
| | | exportBayonetList:(data)=>axios({ |
| | | method:'get', |
| | | url:baseUrl + '/export', |
| | | headers:{...token}, |
| | | params:data |
| | | }), |
| | | // 新增卡口 |
| | | addBayonet:(data)=>axios({ |
| | | method:'post', |
| | | url:baseUrl + '/addition', |
| | | headers:{...token}, |
| | | data:data |
| | | }) |
| | | }; |
| | | getBayonetList: (params) => { return http.get('/sccg/equipment_bayonet/query', params); }, |
| | | exportBayonetList: (params) => { return http.get('/sccg/equipment_bayonet/export', params); }, |
| | | addBayonet: (params) => { return http.post('/sccg/equipment_bayonet/addition', params); }, |
| | | updateBayonet: (params) => { return http.put('/sccg/equipment_bayonet/modification', params) } |
| | | } |
| | |
| | | } |
| | | |
| | | export function importTeamInfo(data) { |
| | | return http.post('/sccg/team_construction/import', data); |
| | | return http.uploadFile('/sccg/team_construction/import', data); |
| | | } |
| | | |
| | | export function updateTeamInfo(params) { |
| | |
| | | <el-table ref="multipleTable" :data="tableData" style="width: 100%" |
| | | :header-cell-style="{background:'#06122c','font-size':'12px',color:'#4b9bb7','font-weight':'650','line-height':'45px'}" |
| | | :row-class-name="tableRowClassName"> |
| | | <el-table-column type="selection" :min-width="5"> |
| | | </el-table-column> |
| | | <el-table-column v-for="item in option.group" :key="item.prop" :label="item.label" |
| | | :prop="item.prop" :min-width="item['min-width'] ? item['item.min-width']:'10'"> |
| | | <template slot-scope="scope"> |
| | |
| | | methods: { |
| | | // 设置表格斑马纹 |
| | | tableRowClassName({ row, rowIndex }) { |
| | | if ((rowIndex + 1) % 2 == 0) { |
| | | if ((rowIndex + 1) % 2 === 0) { |
| | | return 'warning-row'; |
| | | } else { |
| | | return 'success-row'; |
| | | } |
| | | return ''; |
| | | }, |
| | | // 当前页改变触发事件 |
| | | changeCurrentPage(page) { |
| | |
| | | return true |
| | | }, |
| | | handleSuccess(res, file, filelist) { |
| | | console.log(res); |
| | | this.$emit('getPicUrl', { obj: res.data, value: this.mykey }); |
| | | }, |
| | | getToken() { |
| | |
| | | url: `sccg/car_Manage/query_enforce?current=1&size=1000`, |
| | | }).then((res) => { |
| | | this.carOptions = res.data.records; |
| | | console.log(res); |
| | | }); |
| | | }, |
| | | // 获取顶级部门 |
| | |
| | | url: `sccg/admin/getDepartUser/${id}`, |
| | | }) |
| | | .then((res) => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.personOptions = res.data; |
| | | } else { |
| | |
| | | url: `sccg/base_case/baseCaseDetail/${mycode}` |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.info = res.data; |
| | | this.dialogView = true; |
| | | let pic = res.data.filesPictureVo.imageResources; |
| | |
| | | * @param {boolean?} throwError 是否不使用默认的异常处理方法,而把异常抛出来 |
| | | * @return {Promise} 返回一个promise对象。其中then方法传递回包中的data数据;catch事件则传递整个回包,其参数为{data:{},status{code:123,message:'xxx'}} |
| | | */ |
| | | post(url, data = {}, params = {}, throwError) { |
| | | post(url, data = {}, throwError) { |
| | | const config = { |
| | | method: 'POST', |
| | | url, |
| | | params, |
| | | data: JSON.stringify(data), |
| | | errorHandler: (!throwError && this.defaultErrorHandler) || null, |
| | | headers: { |
| | |
| | | next(); |
| | | } |
| | | }) |
| | | // console.log(process.env.VUE_APP_BASE_API); |
| | | Vue.use(ElementUI); |
| | | new Vue({ |
| | | router, |
| | |
| | | import Vuex from 'vuex' |
| | | import users from "./users" |
| | | import logs from "./logs" |
| | | import bayonet from './system/bayonet' |
| | | import loudspeaker from './system/loudspeaker' |
| | | import handheldTerminal from './system/handheldTerminal' |
| | | import shortMessage from './operate/managenment/shortMessage' |
| | |
| | | modules: { |
| | | users, |
| | | logs, |
| | | bayonet, |
| | | shortMessage, |
| | | loudspeaker, |
| | | handheldTerminal, |
| | |
| | | }, |
| | | actions: { |
| | | async login({ state }, params) { |
| | | console.log("store login"); |
| | | const res = await usersApi.login(params); |
| | | console.log(res); |
| | | const { data } = res; |
| | | return res; |
| | | }, |
| | |
| | | }) |
| | | return arr; |
| | | } |
| | | export async function myDownLoad(arr){ |
| | | let fileName = arr.headers['content-disposition']; |
| | | console.log(fileName); |
| | | if (fileName) { |
| | | fileName = fileName.slice(fileName.indexOf('filename=') + 9); |
| | | } |
| | | const blob = new Blob([arr.data], { |
| | | type: 'application/octet-stream' |
| | | }) |
| | | // content-disposition |
| | | const downloadElement = document.createElement('a') |
| | | // 创建下载的链接 |
| | | const href = window.URL.createObjectURL(blob) |
| | | downloadElement.href = href |
| | | // // 下载后文件名 |
| | | downloadElement.download = fileName |
| | | document.body.appendChild(downloadElement) |
| | | // 点击下载 |
| | | downloadElement.click() |
| | | // 下载完成移除元素 |
| | | document.body.removeChild(downloadElement) |
| | | // 释放掉blob对象 |
| | | window.URL.revokeObjectURL(href) |
| | | |
| | | // data: 文件, contentDisposition:请求头中文件的名字 |
| | | // 默认不用修改,直接将返回的res传入即可 |
| | | export function downloadFile(res) { |
| | | const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' }); |
| | | const fileName = res.contentDisposition.split('=')[1]; |
| | | if (window.navigator && window.navigator.msSaveBlob) { |
| | | navigator.msSaveBlob(blob, fileName); |
| | | } else { |
| | | const link = document.createElement('a'); |
| | | link.style.display = 'none'; |
| | | link.href = URL.createObjectURL(blob); |
| | | link.setAttribute('download', decodeURI(fileName)); |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | URL.revokeObjectURL(link.href); |
| | | document.body.removeChild(link); |
| | | } |
| | | } |
| | | |
| | | // 获取token |
| | | export function getToken() { |
| | | const token = sessionStorage.getItem('token'); |
| | |
| | | if (token && tokenHead) { |
| | | return tokenHead + token; |
| | | } |
| | | return; |
| | | } |
| | | // 获取年月日时分秒 |
| | | export function getNowDate(time){ |
| | |
| | | } |
| | | return config; |
| | | }, (err) => { |
| | | console.log(err, 're'); |
| | | } |
| | | ) |
| | | // 响应 |
| | |
| | | }, |
| | | created() { |
| | | this.setLoginInfo() |
| | | console.log(this.user) |
| | | }, |
| | | methods: { |
| | | baseInfo() { |
| | |
| | | sessionStorage.clear(); |
| | | this.$router.push({ path: "/login" }) |
| | | }).catch(err => { |
| | | console.log(err); |
| | | }) |
| | | }, |
| | | // 改变选中状态 |
| | |
| | | async setLoginInfo() { |
| | | const info = JSON.parse(sessionStorage.getItem('user')); |
| | | if (info) { |
| | | console.log(info) |
| | | this.user = info; |
| | | } else { |
| | | this.user = await this.getLoginInfo(); |
| | | console.log(this.user) |
| | | } |
| | | this.show = true |
| | | }, |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | // console.log(this.info); |
| | | // this.car = JSON.parse(JSON.stringify(this.info)); |
| | | }, |
| | | methods: { |
| | | }, |
| | |
| | | method: "get", |
| | | url: "sccg/system/portal/menu/search_myself", |
| | | }).then((res) => { |
| | | console.log(res); |
| | | }); |
| | | }, |
| | | }, |
| | |
| | | handleLogin() { |
| | | const { username, password } = this.loginForm; |
| | | const that = this; |
| | | console.log(this.login); |
| | | this.$axios |
| | | .post("sccg/admin/login", { |
| | | password, |
| | |
| | | if (response.code === 200) { |
| | | // 设置toke时间 |
| | | // 保存token |
| | | console.log(response); |
| | | sessionStorage.setItem('token',response.data.token); |
| | | // 保存token |
| | | sessionStorage.setItem('tokenHead',response.data.tokenHead); |
| | |
| | | } |
| | | }) |
| | | } |
| | | // console.log(response); |
| | | }) |
| | | .catch(function (error) { |
| | | console.log(error); |
| | | }); |
| | | }, |
| | | }, |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | url: `sccg/illegal_building/delete?id=${number}`, |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.$message({ |
| | | type: res.code === 200 ? 'success' : 'warning', |
| | | message: res.message |
| | |
| | | url: 'sccg/violations/query/type_four' |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.parentList = res.data; |
| | | }) |
| | | }, |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | url: `sccg/violations/delete?id=${number}`, |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.$message({ |
| | | type: res.code === 200 ? 'success' : 'warning', |
| | | message: res.message |
| | |
| | | url: "sccg/car_Manage/addition_enforce", |
| | | data: car, |
| | | }).then((res) => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: "success", |
| | |
| | | }, |
| | | // 部门修改 |
| | | handleCheck(data, checked) { |
| | | console.log(data); |
| | | // this.car.belong = data.departName |
| | | this.car.departId = data.id; |
| | | this.car.departName = data.departName; |
| | | // 获取当前选择的id在数组中的索引 |
| | |
| | | methods: { |
| | | // 添加车辆 |
| | | handleCar() { |
| | | console.log(this.car); |
| | | this.$refs.user.validate((valid) => { |
| | | if (valid) { |
| | | const { car } = this; |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | console.log(this.info); |
| | | const { getDepartTree } = this; |
| | | // 初始化部门树 |
| | | getDepartTree(); |
| | |
| | | ...car, |
| | | }, |
| | | }).then((res) => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: "success", |
| | |
| | | }, |
| | | // 部门修改 |
| | | handleCheck(data, checked) { |
| | | console.log(data); |
| | | this.car.departId = data.id; |
| | | this.car.departName = data.departName; |
| | | // 获取当前选择的id在数组中的索引 |
| | |
| | | created() { |
| | | // 初始化数据 |
| | | this.car = JSON.parse(JSON.stringify(this.info)); |
| | | console.log('------------',this.car); |
| | | }, |
| | | methods: { |
| | | // 添加车辆 |
| | | handleCar() { |
| | | console.log(this.car); |
| | | this.$refs.user.validate((valid) => { |
| | | if (valid) { |
| | | const { car } = this; |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | methods: { |
| | | // 编辑车辆 |
| | | handleEdit(data){ |
| | | console.log(data) |
| | | this.dialogEdit = true |
| | | this.info = data; |
| | | }, |
| | |
| | | url: `/sccg/car_Manage/${myurl}?id=${id}`, |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.$message({ |
| | | type: res.code === 200 ? 'success' : 'warning', |
| | | message: res.message |
| | |
| | | this.getCarList(); |
| | | }) |
| | | }) |
| | | .catch(_ => { console.log(2) }); |
| | | .catch(_ => { }); |
| | | }, |
| | | // 获取车辆列表 |
| | | async getCarList() { |
| | |
| | | url:`sccg/car_Manage/query_enforce?current=${currentPage}&size=${pageSize}&carNum=${carNum}`, |
| | | }) |
| | | .then(res=>{ |
| | | console.log(res); |
| | | arr = res.data; |
| | | }) |
| | | return arr; |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | console.log(this.info); |
| | | this.car = JSON.parse(JSON.stringify(this.info)); |
| | | }, |
| | | methods: { |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | console.log(this.info); |
| | | this.car = JSON.parse(JSON.stringify(this.info)); |
| | | }, |
| | | methods: { |
| | |
| | | url: `sccg/violations/delete?id=${number}`, |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.$message({ |
| | | type: res.code === 200 ? 'success' : 'warning', |
| | | message: res.message |
| | |
| | | // 获取用户列表 |
| | | getUserList() { |
| | | const { currentPage, pageSize, context, statusArr } = this; |
| | | console.log(statusArr); |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `sccg/base_case/query?state=${statusArr[0]}¤t=${currentPage}&size=${pageSize}&resource=2&type=${statusArr[1]}` |
| | | }).then(res => { |
| | | this.totalNum = res.data.total; |
| | | this.tableData = res.data.records; |
| | | console.log(res); |
| | | }) |
| | | }, |
| | | // 更改违规/违建 |
| | |
| | | methods: { |
| | | handleSuccess(res, file, filelist) { |
| | | const baseUrl = 'http://140.143.152.226:8410/'; |
| | | console.log(res); |
| | | console.log(this.fileList); |
| | | if (this.arrive.situationPic.length < 4) { |
| | | this.arrive.situationPic.push(baseUrl + res.data.url1) |
| | |
| | | }, |
| | | handleSuccess2(res, file, filelist) { |
| | | const baseUrl = 'http://140.143.152.226:8410/'; |
| | | console.log(res); |
| | | if (this.evidence.pic.length < 4) { |
| | | this.evidence.pic.push(baseUrl + res.data.url1) |
| | | } |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | url:'sccg/admin/info?name='+myname, |
| | | }) |
| | | .then(res=>{ |
| | | console.log(res); |
| | | }) |
| | | }, |
| | | handleBack(){ |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | }, |
| | | handleSuccess(res, file, filelist) { |
| | | const baseUrl = 'http://140.143.152.226:8410/'; |
| | | console.log(res); |
| | | this.ill.positive = baseUrl + res.data.url1; |
| | | |
| | | }, |
| | | handleSuccess2(res, file, filelist) { |
| | | const baseUrl = 'http://140.143.152.226:8410/'; |
| | | console.log(res); |
| | | this.ill.negative = baseUrl + res.data.url1; |
| | | } |
| | | }, |
| | |
| | | url: 'sccg/violations/query/type_second' |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.smallKindList = res.data; |
| | | }) |
| | | }, |
| | |
| | | url: 'sccg/violations/query/event_type' |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.eventLevelList = res.data; |
| | | }) |
| | | }, |
| | |
| | | // 获取用户列表 |
| | | getUserList() { |
| | | const { currentPage, pageSize, context, statusArr } = this; |
| | | console.log(statusArr); |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `sccg/base_case/query?state=${statusArr[0]}¤t=${currentPage}&size=${pageSize}&resource=2&type=${statusArr[1]}` |
| | | }).then(res => { |
| | | this.totalNum = res.data.total; |
| | | this.tableData = res.data.records; |
| | | console.log(res); |
| | | }) |
| | | }, |
| | | // 设置表格斑马纹 |
| | |
| | | url: `sccg/violations/delete?id=${number}`, |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.$message({ |
| | | type: res.code === 200 ? 'success' : 'warning', |
| | | message: res.message |
| | |
| | | // 获取用户列表 |
| | | getUserList() { |
| | | const { currentPage, pageSize, context, statusArr } = this; |
| | | console.log(statusArr); |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `sccg/base_case/query?state=${statusArr[0]}¤t=${currentPage}&size=${pageSize}&resource=2&type=${statusArr[1]}` |
| | | }).then(res => { |
| | | this.totalNum = res.data.total; |
| | | this.tableData = res.data.records; |
| | | console.log(res); |
| | | }) |
| | | }, |
| | | // 更改违规/违建 |
| | |
| | | url: 'sccg/base_case/case_status_update?caseId=' + id + '&state=0' |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | methods: { |
| | | handleSuccess(res, file, filelist) { |
| | | const baseUrl = 'http://140.143.152.226:8410/'; |
| | | console.log(res); |
| | | if (this.arrive.situationPic.length < 4) { |
| | | this.arrive.situationPic.push(baseUrl + res.data.url1) |
| | | } |
| | |
| | | methods: { |
| | | handleSuccess2(res, file, filelist) { |
| | | const baseUrl = 'http://140.143.152.226:8410/'; |
| | | console.log(res); |
| | | if (this.evidence.pic.length < 4) { |
| | | this.evidence.pic.push(baseUrl + res.data.url1) |
| | | } |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | <!-- 详情页展示 --> |
| | | <el-dialog :visible.sync="dialogView" width="80%" title="基础信息(人工)" v-if="dialogView" |
| | | :before-close="handleClose"> |
| | | <MyDetail :info=info v-if="mystatus==1 ? true:false"></MyDetail> |
| | | <MyDetail :info=info v-if="mystatus===1"></MyDetail> |
| | | <MyIllDetail :info=info v-else></MyIllDetail> |
| | | </el-dialog> |
| | | <!-- 上传页面 --> |
| | |
| | | </div> |
| | | <div class="pagination"> |
| | | <el-pagination background :current-page="currentPage" layout="prev, pager, next" |
| | | :total="totalNum" :page-size="pageSize" @current-change="changeCurrentPage" |
| | | @prev-click="handlePrev" @next-click="handleNext"> |
| | | :total="totalNum" :page-size="pageSize" @current-change="changeCurrentPage"> |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | |
| | | list.forEach(item => { |
| | | this.tempList.push(item.code); |
| | | }) |
| | | if (list.length === this.tableData.length) { |
| | | this.all = true; |
| | | } else { |
| | | this.all = false |
| | | } |
| | | this.all = list.length === this.tableData.length; |
| | | }, |
| | | // 全选 |
| | | selectAll() { |
| | |
| | | url: `sccg/violations/delete?id=${number}`, |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.$message({ |
| | | type: res.code === 200 ? 'success' : 'warning', |
| | | message: res.message |
| | |
| | | // 获取用户列表 |
| | | getUserList() { |
| | | const { currentPage, pageSize, context, statusArr } = this; |
| | | console.log(statusArr); |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `sccg/base_case/query?state=${statusArr[0]}¤t=${currentPage}&size=${pageSize}&resource=2&type=${statusArr[1]}` |
| | | }).then(res => { |
| | | this.totalNum = res.data.total; |
| | | this.tableData = res.data.records; |
| | | console.log(res); |
| | | }) |
| | | }, |
| | | // 更改违规/违建 |
| | | changeTypeChecked(idx) { |
| | | this.typeList.forEach((item, index) => { |
| | | if (index === idx) { |
| | | item.checked = true; |
| | | } else { |
| | | item.checked = false; |
| | | } |
| | | item.checked = index === idx; |
| | | }) |
| | | this.mystatus = idx + 1; |
| | | this.statusArr[1] = this.typeList[idx].value; |
| | |
| | | }, |
| | | // 设置表格斑马纹 |
| | | tableRowClassName({ row, rowIndex }) { |
| | | if ((rowIndex + 1) % 2 == 0) { |
| | | if ((rowIndex + 1) % 2 === 0) { |
| | | return 'warning-row'; |
| | | } else { |
| | | return 'success-row'; |
| | | } |
| | | return ''; |
| | | }, |
| | | // 当前页改变触发事件 |
| | | changeCurrentPage(page) { |
| | | this.currentPage = page; |
| | | this.getUserList(); |
| | | }, |
| | | // 上一页点击事件 |
| | | handlePrev(page) { |
| | | this.currentPage = page; |
| | | this.getUserList(); |
| | | }, |
| | | // 下一页点击事件 |
| | | handleNext(page) { |
| | | this.currentPage = page; |
| | | this.getUserList(); |
| | | }, |
| | |
| | | url:'sccg/base_case/case_status_update?caseId='+id+'&state=0' |
| | | }) |
| | | .then(res=>{ |
| | | console.log(res); |
| | | if(res.code === 200){ |
| | | this.$message({ |
| | | type:'success', |
| | |
| | | color: #4b9bb7; |
| | | header { |
| | | background-color: #09152f; |
| | | border: 1pox solid #fff; |
| | | |
| | | .headerContent { |
| | | padding: 0 40px; |
| | |
| | | background-color: #09152f; |
| | | margin-top: 20px; |
| | | padding-bottom: 50px; |
| | | border: 1pox solid #fff; |
| | | .btn span:hover{ |
| | | cursor: pointer; |
| | | } |
| | |
| | | methods: { |
| | | handleSuccess(res, file, filelist) { |
| | | const baseUrl = 'http://140.143.152.226:8410/'; |
| | | console.log(res); |
| | | if (this.arrive.situationPic.length < 4) { |
| | | this.arrive.situationPic.push(baseUrl + res.data.url1) |
| | | } |
| | |
| | | methods: { |
| | | handleSuccess2(res, file, filelist) { |
| | | const baseUrl = 'http://140.143.152.226:8410/'; |
| | | console.log(res); |
| | | if (this.evidence.pic.length < 4) { |
| | | this.evidence.pic.push(baseUrl + res.data.url1) |
| | | } |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | methods: { |
| | | handleUser() { |
| | | const that = this; |
| | | // console.log(this.$refs); |
| | | this.$refs.user.validate((valid) => { |
| | | console.log(valid) |
| | | if (valid) { |
| | | that.$refs.condition.validate((flag) => { |
| | | console.log(flag); |
| | | if (flag) { |
| | | const { ill } = this; |
| | | ill.buildingLength = parseFloat(ill.buildingLength); |
| | | ill.buildingHigh = parseFloat(ill.buildingHigh); |
| | | ill.buildingWidth = parseFloat(ill.buildingWidth); |
| | | ill.buildingArea = parseFloat(ill.buildingArea); |
| | | console.log(ill); |
| | | that.$axios({ |
| | | method: 'post', |
| | | url: 'sccg/base_case/addition_illegal_building', |
| | |
| | | url: 'sccg/illegal_building/query/type_second' |
| | | }).then(res => { |
| | | this.bigKindList = res.data; |
| | | // console.log(res); |
| | | }) |
| | | }, |
| | | // 获取token |
| | |
| | | }, |
| | | handleSuccess(res, file, filelist) { |
| | | const baseUrl = 'http://140.143.152.226:8410/'; |
| | | // if(res.code === 500){ |
| | | // console.log('err'); |
| | | // return; |
| | | // } |
| | | this.ill.positive = baseUrl + res.data.url1; |
| | | |
| | | }, |
| | | handleSuccess2(res, file, filelist) { |
| | | const baseUrl = 'http://140.143.152.226:8410/'; |
| | | console.log(res); |
| | | this.ill.negative = baseUrl + res.data.url1; |
| | | }, |
| | | // 查询社区 |
| | |
| | | url: 'sccg/dict/query_type?level=1&typeCode=' + '10' |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | }) |
| | | }, |
| | | // 获取街道信息 |
| | |
| | | }) |
| | | .then(res => { |
| | | arr = res.data; |
| | | console.log(res); |
| | | }) |
| | | return arr; |
| | | }, |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | } |
| | | }) |
| | | }) |
| | | .catch(err => { console.log(err) }) |
| | | .catch(err => { }) |
| | | }, |
| | | // 执行下拉框操作 |
| | | selectChange(list) { |
| | |
| | | <div class="search"> |
| | | <span>类型查询:</span> |
| | | <div class="option"> |
| | | <el-input v-model="info.type" placeholder="请输入问题类型"></el-input> |
| | | <el-input v-model="type" placeholder="请输入类型"></el-input> |
| | | </div> |
| | | <span>上传时间:</span> |
| | | <div class="option"> |
| | | <el-input v-model="info.startTime" placeholder="选择上传时间"></el-input> |
| | | <el-date-picker |
| | | v-model="datePicked" |
| | | type="datetimerange" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期"> |
| | | </el-date-picker> |
| | | </div> |
| | | <div class="findBtn"> |
| | | <el-button type="primary" @click="getUserList">查询</el-button> |
| | | <el-button type="primary" @click="getImageResourceList">查询</el-button> |
| | | </div> |
| | | <div class="findBtn"> |
| | | <el-button type="primary" @click="addImages">添加图片</el-button> |
| | | <el-button type="primary" @click="handleUpdateImageResource(null, 'create')">添加图片</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <main> |
| | | <div class="mainContent"> |
| | | <div class="type-nav"> |
| | | <div @click="changeTypeChecked(index)" v-for="(item, index) in typeList" :key="item.name" |
| | | <div @click="changeTypeChecked(item.value)" v-for="item in typeList" :key="item.name" |
| | | :class="[item.checked ? 'is-active' : '', 'type-item']">{{ item.name }}</div> |
| | | </div> |
| | | <!-- 数据展示 --> |
| | |
| | | @selection-change="tableChange"> |
| | | <el-table-column type="selection" min-width="5"> |
| | | </el-table-column> |
| | | <el-table-column prop="code" label="所属事件编号" min-width="18"> |
| | | <el-table-column prop="baseId" label="所属事件编号" min-width="18"> |
| | | </el-table-column> |
| | | <el-table-column prop="questionType" label="问题类型" min-width="8"> |
| | | <el-table-column prop="category" label="问题类型" min-width="8"> |
| | | </el-table-column> |
| | | <el-table-column prop="bigType" label="大类名称" min-width="8"> |
| | | <el-table-column prop="eventSource" label="大类名称" min-width="8"> |
| | | </el-table-column> |
| | | <el-table-column prop="smallType" label="小类名称" min-width="8"> |
| | | <el-table-column prop="regionName" label="小类名称" min-width="8"> |
| | | </el-table-column> |
| | | <el-table-column prop="imagesId" label="图片Id" min-width="8"> |
| | | <el-table-column prop="id" label="图片Id" min-width="8"> |
| | | </el-table-column> |
| | | <el-table-column prop="uploadTime" label="上传时间" min-width="15" v-if="mystatus === 1"> |
| | | <el-table-column prop="createTime" label="上传时间" min-width="15" v-if="mystatus === 1"> |
| | | </el-table-column> |
| | | <el-table-column prop="operation" label="操作" min-width="15"> |
| | | <template slot-scope="scope"> |
| | | <div class="operation"> |
| | | <span @click="handleFind(scope.row)">查看</span> |
| | | <span @click="handleUpdateImageResource(scope.row, 'view')">查看</span> |
| | | <span class="line">|</span> |
| | | <span @click="handleUpdate(scope.row)">修改</span> |
| | | <span @click="handleUpdateImageResource(scope.row, 'update')">修改</span> |
| | | <span class="line">|</span> |
| | | <span @click="handleDelete(scope.row)">删除</span> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!-- 详情页展示 --> |
| | | <el-dialog :visible.sync="dialogView" width="80%" title="基础信息(人工)" v-if="dialogView" |
| | | :before-close="handleClose"> |
| | | <MyDetail :info=info v-if="mystatus == 1 ? true : false"></MyDetail> |
| | | <MyIllDetail :info=info v-else></MyIllDetail> |
| | | <el-dialog |
| | | :visible.sync="isShowUploadDialog" |
| | | width="40%" |
| | | :title="getDialogTitle" |
| | | > |
| | | <updateUser @closeDialog="closeDialog" :dialogType="dialogType" :originalData="originalData" /> |
| | | </el-dialog> |
| | | <!-- 上传页面 --> |
| | | <!-- <el-dialog :visible.sync="dialogUpload" width="80%" title="上传处置结果" v-if="dialogUpload" |
| | | :before-close="handleClose"> --> |
| | | <!-- <uploadVio v-if="mystatus === 1" :caseId="caseId" :mycode="caseCode" @closeDialog="closeDialog"></uploadVio> |
| | | <uploadIll v-else :caseId="caseId" :mycode="caseCode" @closeDialog="closeDialog"></uploadIll> --> |
| | | <!-- </el-dialog> --> |
| | | <!-- tools --> |
| | | <!-- 查看修改页面 --> |
| | | <el-dialog |
| | | :visible.sync="dialogUpdate" |
| | | width="40%" |
| | | title="修改" |
| | | v-if="dialogUpdate" |
| | | :before-close="handleClose" |
| | | > |
| | | <updateUser |
| | | /> |
| | | <!-- :updateFlag="updateFlag" |
| | | :userInfo="userInfo" |
| | | :getDepartList="context === '' ? getUserList : search" |
| | | @changeDialog="changMyDialog" --> |
| | | </el-dialog> |
| | | <el-dialog |
| | | :visible.sync="dialogcheck" |
| | | width="40%" |
| | | title="查看" |
| | | v-if="dialogcheck" |
| | | :before-close="handleClose" |
| | | > |
| | | <detailUser |
| | | /> |
| | | <!-- :updateFlag="updateFlag" |
| | | :userInfo="userInfo" |
| | | :getDepartList="context === '' ? getUserList : search" |
| | | @changeDialog="changMyDialog" --> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | :visible.sync="dialogAdd" |
| | | width="40%" |
| | | title="添加" |
| | | v-if="dialogAdd" |
| | | :before-close="handleClose" |
| | | > |
| | | <createUser |
| | | /> |
| | | <!-- :updateFlag="updateFlag" |
| | | :userInfo="userInfo" |
| | | :getDepartList="context === '' ? getUserList : search" |
| | | @changeDialog="changMyDialog" --> |
| | | </el-dialog> |
| | | |
| | | <div class="tools"> |
| | | <div class="funs"> |
| | | <div class="funsItem funs-sp"> |
| | |
| | | </div> |
| | | <div class="pagination"> |
| | | <el-pagination background :current-page="currentPage" layout="prev, pager, next" |
| | | :total="totalNum" :page-size="pageSize" @current-change="changeCurrentPage" |
| | | @prev-click="handlePrev" @next-click="handleNext"> |
| | | :total="totalNum" :page-size="pageSize" @current-change="changeCurrentPage"> |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | // import uploadVio from './updateUser/uploadResult/vio' |
| | | // import uploadIll from "./updateUser/uploadResult/ill" |
| | | import createUser from "./createUser"; |
| | | import updateUser from "./updateUser"; |
| | | import detailUser from "./detailUser"; |
| | | import imageManagement from "@/api/operate/imageManagement"; |
| | | |
| | | export default { |
| | | components: { |
| | | // updateUser, |
| | | // uploadVio, uploadIll, |
| | | updateUser, createUser,detailUser |
| | | components: { updateUser }, |
| | | |
| | | computed: { |
| | | getDialogTitle() { |
| | | if (this.dialogType === 'create') { |
| | | return '创建'; |
| | | } |
| | | |
| | | if (this.dialogType === 'update') { |
| | | return '更新'; |
| | | } |
| | | |
| | | if (this.dialogType === 'view') { |
| | | return '查看'; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | dialogUpdate:false, |
| | | dialogcheck:false, |
| | | tableData: [ |
| | | { |
| | | code: "IMG202211010001", |
| | | questionType: "违规", |
| | | bigType: "违反国家有关标准编制城乡规划", |
| | | smallType: "在居民住宅楼、未配套设立专用烟道的商住综合楼、商住综合楼内与居住层相邻的商业楼层内新建、改建、扩建产生油烟、异味、废气的餐饮服务项目", |
| | | imagesId: "1", |
| | | uploadTime: "2022-10-31 20:20:01" |
| | | }, |
| | | { |
| | | code: "IMG202211010002", |
| | | questionType: "违规", |
| | | bigType: "违反国家有关标准编制城乡规划", |
| | | smallType: "在居民住宅楼、未配套设立专用烟道的商住综合楼、商住综合楼内与居住层相邻的商业楼层内新建、改建、扩建产生油烟、异味、废气的餐饮服务项目", |
| | | imagesId: "1", |
| | | uploadTime: "2022-10-31 20:20:01" |
| | | }, |
| | | { |
| | | code: "IMG202211010003", |
| | | questionType: "违规", |
| | | bigType: "违反国家有关标准编制城乡规划", |
| | | smallType: "在居民住宅楼、未配套设立专用烟道的商住综合楼、商住综合楼内与居住层相邻的商业楼层内新建、改建、扩建产生油烟、异味、废气的餐饮服务项目", |
| | | imagesId: "1", |
| | | uploadTime: "2022-10-31 20:20:01" |
| | | }, |
| | | { |
| | | code: "IMG202211010004", |
| | | questionType: "违规", |
| | | bigType: "违反国家有关标准编制城乡规划", |
| | | smallType: "在居民住宅楼、未配套设立专用烟道的商住综合楼、商住综合楼内与居住层相邻的商业楼层内新建、改建、扩建产生油烟、异味、废气的餐饮服务项目", |
| | | imagesId: "1", |
| | | uploadTime: "2022-10-31 20:20:01" |
| | | } |
| | | ], |
| | | context: "", |
| | | isShowUploadDialog:false, |
| | | dialogType: 'create', |
| | | originalData: null, |
| | | type: '', |
| | | size: '', |
| | | importTime: null, |
| | | tableData: [], |
| | | dialogUpload: false, |
| | | // dialogUpdate: false, |
| | | dialogView: false, |
| | | updateFlag:false, |
| | | userInfo:{}, |
| | |
| | | checked: false, |
| | | }, |
| | | ], |
| | | statusArr: [], |
| | | mystatus: 1, |
| | | caseId: '', |
| | | caseCode: null, |
| | | dialogAdd:false, |
| | | dialogAdd: false, |
| | | datePicked: null |
| | | } |
| | | }, |
| | | created() { |
| | | this.statusArr[0] = 6; |
| | | this.typeList.forEach(item => { |
| | | if (item.checked) { |
| | | this.statusArr[1] = item.value; |
| | | } |
| | | }) |
| | | this.getUserList(); |
| | | this.size = this.typeList.find(item => item.checked).value; |
| | | this.getImageResourceList(); |
| | | }, |
| | | methods: { |
| | | //修改 |
| | | handleUpdate(){ |
| | | this.dialogUpdate=true; |
| | | handleUpdateImageResource(data, type){ |
| | | this.dialogType = type; |
| | | this.originalData = data; |
| | | this.isShowUploadDialog = true; |
| | | }, |
| | | // 查看 |
| | | handleFind(){ |
| | | this.dialogcheck=true; |
| | | }, |
| | | // 顶部下拉框 |
| | | setMystatus(value) { |
| | | console.log(value); |
| | | this.statusArr[1] = value; |
| | | this.changeTypeChecked(value - 1); |
| | | this.getUserList(); |
| | | }, |
| | | |
| | | // 批量删除 |
| | | mulDelete(idArr) { |
| | | console.log(idArr); |
| | | this.$axios({ |
| | | method: 'delete', |
| | | url: 'sccg/violations/batch_delete?ids=' + idArr, |
| | | }).then(res => { |
| | | this.getUserList(); |
| | | this.$message({ |
| | | message: res.message, |
| | | type: res.code === 200 ? 'success' : 'warning' |
| | | }) |
| | | }) |
| | | imageManagement.deleteImageResources({ ids: idArr }) |
| | | .then(() => { |
| | | this.$message.success('操作成功'); |
| | | this.getImageResourceList(); |
| | | }) |
| | | .catch(err => this.$message.error(`${err}`)) |
| | | }, |
| | | // 执行下拉框操作 |
| | | selectChange(list) { |
| | | console.log(this.tempList); |
| | | if (this.tempList.length !== 0) { |
| | | if (list === 3) { |
| | | this.preMyIdx = list; |
| | |
| | | list.forEach(item => { |
| | | this.tempList.push(item.code); |
| | | }) |
| | | if (list.length === this.tableData.length) { |
| | | this.all = true; |
| | | } else { |
| | | this.all = false |
| | | } |
| | | this.all = list.length === this.tableData.length; |
| | | }, |
| | | // 全选 |
| | | selectAll() { |
| | |
| | | }) |
| | | }, |
| | | // 删除单条数据 |
| | | handleDelete({ number }) { |
| | | console.log(number); |
| | | handleDelete({ id }) { |
| | | this.$confirm('确认删除?') |
| | | .then(_ => { |
| | | console.log(1); |
| | | this.$axios({ |
| | | method: 'delete', |
| | | url: `sccg/violations/delete?id=${number}`, |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.$message({ |
| | | type: res.code === 200 ? 'success' : 'warning', |
| | | message: res.message |
| | | }) |
| | | |
| | | this.getUserList(); |
| | | }) |
| | | .then(() => { |
| | | imageManagement.deleteImageResource({ id: id }) |
| | | .then(() => { |
| | | this.$message.success('操作成功'); |
| | | }) |
| | | .catch(err => this.$message.error(`${err}`)) |
| | | }) |
| | | .catch(_ => { console.log(2) }); |
| | | }, |
| | | // 获取用户列表 |
| | | getUserList() { |
| | | const { currentPage, pageSize, context, statusArr } = this; |
| | | console.log(statusArr); |
| | | // this.$axios({ |
| | | // method: 'get', |
| | | // url: `sccg/base_case/query?state=${statusArr[0]}¤t=${currentPage}&size=${pageSize}&resource=2&type=${statusArr[1]}` |
| | | // }).then(res => { |
| | | // this.totalNum = res.data.total; |
| | | // this.tableData = res.data.records; |
| | | // console.log(res); |
| | | // }) |
| | | |
| | | getImageResourceList() { |
| | | const dateParams = {}; |
| | | if (this.datePicked) { |
| | | dateParams.startTime = dateParams[0]; |
| | | dateParams.endTime = dateParams[1] |
| | | } |
| | | imageManagement.getImageResources({ current: this.currentPage, size: this.size, type: this.type, ...dateParams }) |
| | | .then(({ records, total }) => { |
| | | this.tableData = records; |
| | | this.totalNum = total; |
| | | }) |
| | | .catch(err => this.$message({ type: 'error', message: err })) |
| | | }, |
| | | // 更改违规/违建 |
| | | changeTypeChecked(idx) { |
| | | this.typeList.forEach((item, index) => { |
| | | if (index === idx) { |
| | | item.checked = true; |
| | | } else { |
| | | item.checked = false; |
| | | } |
| | | item.checked = index === idx; |
| | | }) |
| | | this.mystatus = idx + 1; |
| | | console.log(this.mystatus); |
| | | this.statusArr[1] = this.typeList[idx].value; |
| | | this.getUserList(); |
| | | this.size = idx; |
| | | this.getImageResourceList(); |
| | | }, |
| | | // 设置表格斑马纹 |
| | | tableRowClassName({ row, rowIndex }) { |
| | | if ((rowIndex + 1) % 2 == 0) { |
| | | if ((rowIndex + 1) % 2 === 0) { |
| | | return 'warning-row'; |
| | | } else { |
| | | return 'success-row'; |
| | | } |
| | | return ''; |
| | | }, |
| | | // 当前页改变触发事件 |
| | | changeCurrentPage(page) { |
| | | this.currentPage = page; |
| | | this.getUserList(); |
| | | }, |
| | | // 上一页点击事件 |
| | | handlePrev(page) { |
| | | this.currentPage = page; |
| | | this.getUserList(); |
| | | }, |
| | | // 下一页点击事件 |
| | | handleNext(page) { |
| | | this.currentPage = page; |
| | | this.getUserList(); |
| | | }, |
| | | addImages(){ |
| | | this.dialogAdd=true; |
| | | }, |
| | | handleClose(done) { |
| | | this.$confirm('确认关闭?') |
| | | .then(_ => { |
| | | this.dialogUpload = false; |
| | | // this.dialogUpdate = false; |
| | | done(); |
| | | }) |
| | | .catch(_ => { }); |
| | | }, |
| | | handleClose(done) { |
| | | this.$confirm('确认关闭?') |
| | | .then(_ => { |
| | | this.dialogUpload = false; |
| | | // this.dialogUpdate = false; |
| | | done(); |
| | | }) |
| | | .catch(_ => { }); |
| | | }, |
| | | async JumpView(data) { |
| | | await this.getEventInfo(data.code); |
| | | }, |
| | | // 获取案件信息 |
| | | async getEventInfo(code) { |
| | | await this.$axios({ |
| | | method: 'get', |
| | | url: `sccg/base_case/baseCaseDetail/${code}` |
| | | }) |
| | | .then(res => { |
| | | this.info = res.data; |
| | | this.dialogView = true; |
| | | }) |
| | | this.getImageResourceList(); |
| | | }, |
| | | opernDialog(data) { |
| | | this.dialogUpload = true; |
| | | this.caseId = data.id; |
| | | this.caseCode = data.code |
| | | // console.log(data); |
| | | }, |
| | | // 关闭上传界面 |
| | | closeDialog({ flag }) { |
| | | this.dialogUpload = flag; |
| | | this.getUserList(); |
| | | }, |
| | | // 处理时间 |
| | | filterTime(time) { |
| | | return helper(time); |
| | | |
| | | closeDialog() { |
| | | this.isShowUploadDialog = false; |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | header { |
| | | background-color: #09152f; |
| | | border: 1pox solid #fff; |
| | | |
| | | .headerContent { |
| | | padding: 0 40px; |
| | |
| | | background-color: #09152f; |
| | | margin-top: 20px; |
| | | padding-bottom: 50px; |
| | | border: 1pox solid #fff; |
| | | |
| | | .btn span:hover { |
| | | cursor: pointer; |
| | |
| | | .line { |
| | | padding: 0 5px; |
| | | } |
| | | |
| | | :deep(.el-range-input) { |
| | | background-color: #09152f; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <div class="updateUser"> |
| | | <main> |
| | | <div class="mainContent"> |
| | | <el-form ref="user" style="width: 100%;"> |
| | | <el-form-item prop="code" label="所属事件编号"> |
| | | <el-input v-model="imagedata.code"></el-input> |
| | | <el-form :disabled="isDisabled" ref="user" style="width: 100%;"> |
| | | <el-form-item prop="baseId" label="所属事件编号"> |
| | | <el-input v-model="imagedata.baseId"></el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="code" label="大类名称"> |
| | | <el-input v-model="imagedata.questionType"></el-input> |
| | | <el-form-item prop="eventSource" label="大类名称"> |
| | | <el-input v-model="imagedata.eventSource"></el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="code" label="小类名称"> |
| | | <el-input v-model="imagedata.bigType"></el-input> |
| | | <el-form-item prop="regionName" label="小类名称"> |
| | | <el-input v-model="imagedata.regionName"></el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="code" label="图片Id"> |
| | | <el-input v-model="imagedata.imagesId"></el-input> |
| | | <el-form-item prop="id" label="图片Id"> |
| | | <el-input v-model="imagedata.id"></el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="code" label="上传时间"> |
| | | <el-input v-model="imagedata.uploadTime"></el-input> |
| | | <el-form-item prop="createTime" label="上传时间"> |
| | | <el-input v-model="imagedata.createTime"></el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="questionType" label="图片:" min-width="8"> |
| | | <img style="width: 180px;height: 120px;" :src=imagedata.imageUrl> |
| | | <el-form-item prop="eventSource" label="图片:" min-width="8"> |
| | | <!-- <img style="width: 180px;height: 120px;" :src=imagedata.url>--> |
| | | <el-upload |
| | | action="" |
| | | :show-file-list="false" |
| | | :on-success="handleImageSuccess" |
| | | :before-upload="beforeImageUpload"> |
| | | <img v-if="imagedata.url" :src="imagedata.url" class="avatar"> |
| | | <i v-else class="el-icon-plus avatar-uploader-icon"></i> |
| | | </el-upload> |
| | | </el-form-item> |
| | | <!-- <el-form-item prop="bigType" label="大类名称" min-width="8" v-model="imagedata.bigType"> |
| | | </el-form-item> |
| | | <el-form-item prop="smallType" label="小类名称" min-width="8" v-model="imagedata.smallType"> |
| | | </el-form-item> |
| | | <el-form-item prop="imagesId" label="图片Id" min-width="8" v-model="imagedata.imagesId"> --> |
| | | <!-- </el-form-item> |
| | | <el-form-item prop="uploadTime" label="上传时间" min-width="15" v-model="imagedata.uploadTime"> |
| | | </el-form-item> --> |
| | | <!-- <el-form-item v-if="updateFlag"> --> |
| | | <div class="optionBtn"> |
| | | <el-button type="primary" class="btn submit" @click.native.prevent="handleUser">提交 |
| | | </el-button> |
| | | <div v-if="!isDisabled" class="optionBtn"> |
| | | <el-button type="primary" class="btn submit" @click.native.prevent="onSubmit">提交</el-button> |
| | | </div> |
| | | <!-- </el-form-item> --> |
| | | </el-form> |
| | | </div> |
| | | </main> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { getTypeList } from "@/utils/helper"; |
| | | import { deepClone } from "@/utils/helper"; |
| | | import imageManagement from "@/api/operate/imageManagement"; |
| | | |
| | | export default { |
| | | data() { |
| | | |
| | | return { |
| | | |
| | | imagedata: { |
| | | code: "SJ202211010001", |
| | | questionType: "违规", |
| | | bigType: "违反国家有关标准编制城乡规划", |
| | | smallType: "在居民住宅楼、未配套设立专用烟道的商住综合楼、商住综合楼内与居住层相邻的商业楼层内新建、改建、扩建产生油烟、异味、废气的餐饮服务项目", |
| | | imagesId: "1", |
| | | uploadTime: "2022-10-31 20:20:01", |
| | | imageUrl: "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.fabao365.xuanfa.cn%2Fimage%2F202107%2F130f9d19f204302f.jpg&refer=http%3A%2F%2Fimg.fabao365.xuanfa.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1670034077&t=974b018f9e27023a01d2d8ad3c7c44f2" |
| | | code: '', |
| | | eventSource: '', |
| | | regionName: '', |
| | | smallType: '', |
| | | id: '', |
| | | createTime: '', |
| | | url: '' |
| | | }, |
| | | isDisabled: false |
| | | } |
| | | }, |
| | | created() { |
| | | // const that = this; |
| | | // this.user = JSON.parse(JSON.stringify(that.userInfo)); |
| | | // console.log(this.user); |
| | | // this.user.parentId = this.user.parentId === 0 ? '暂无上级部门' : this.user.parentId; |
| | | // this.checkedList = this.user.userInfoDTOS; |
| | | // this.checkedList.forEach((e) => { |
| | | // this.checkedUser.push(e.userId); |
| | | // }); |
| | | // console.log(this.checkedUser) |
| | | // this.$axios({ |
| | | // method: "get", |
| | | // url: "sccg/depart/tree", |
| | | // }).then((res) => { |
| | | // that.departList = res.data; |
| | | // }); |
| | | // this.getUserList(this.user.id); |
| | | // // 获取部门类型 |
| | | // this.getDepartType(); |
| | | this.imagedata = deepClone(this.originalData); |
| | | this.isDisabled = this.dialogType === 'view'; |
| | | }, |
| | | methods: { |
| | | // handleUser() { |
| | | // this.$refs["user"].validate((valid) => { |
| | | // if (valid) { |
| | | // const { user, checkedList } = this; |
| | | // const arr = []; |
| | | // checkedList.forEach((item) => { |
| | | // arr.push({ leader: item.leader, userId: item.id ? item.id : item.userId }); |
| | | // }); |
| | | // if (arr.length === 0) { |
| | | // this.$message({ |
| | | // type: 'warning', |
| | | // message: '请选择部门人员', |
| | | // }) |
| | | // } else { |
| | | // this.$axios |
| | | // .post("sccg/depart/update", { |
| | | // id: user.id, |
| | | // departName: user.departName, |
| | | // parentId: user.parentId === '暂无上级部门' ? 0 : user.parentId, |
| | | // departDes: user.departDes, |
| | | // departManagerList: arr, |
| | | // }) |
| | | // .then((res) => { |
| | | // this.$message({ |
| | | // message: res.message, |
| | | // type: res.code === 200 ? "success" : "warning", |
| | | // }); |
| | | // this.$emit("changeDialog", { flag: false }); |
| | | // this.getDepartList(); |
| | | // }); |
| | | // } |
| | | // } else { |
| | | // return false; |
| | | // } |
| | | // }); |
| | | // }, |
| | | // // 获取部门类型 |
| | | // async getDepartType() { |
| | | // this.typeList = await getTypeList(1, "08"); |
| | | // }, |
| | | |
| | | // // 设置领导 |
| | | // setLeader(idx) { |
| | | // if (this.updateFlag) { |
| | | // this.checkedList.forEach((item, index) => { |
| | | // item.leader = index === idx; |
| | | // }); |
| | | // } |
| | | // }, |
| | | |
| | | // // 获取所有用户信息 |
| | | // getUserList(id) { |
| | | // // 获取所有用户信息、用户查询(暂时支持电话号码) |
| | | // this.$axios.get(`/sccg/depart/query_surplus_exist_user?id=`+id).then((res) => { |
| | | // if (res.code === 200) { |
| | | // this.userList = res.data; |
| | | // } |
| | | // }); |
| | | // }, |
| | | // addUser() { |
| | | // this.checkedList = []; |
| | | // this.userList.forEach((item) => { |
| | | // this.checkedUser.forEach((child) => { |
| | | // if (item.id == child) { |
| | | // this.checkedList.push({ |
| | | // id: item.id, |
| | | // username: item.username, |
| | | // leader: false, |
| | | // }); |
| | | // } |
| | | // }); |
| | | // }); |
| | | // this.checkedList[0].leader = true; |
| | | // console.log(this.checkedList); |
| | | // this.openUser = false; |
| | | // }, |
| | | // }, |
| | | // props: ["userInfo", "updateFlag", "getDepartList", "changeDialog"], |
| | | onSubmit() { |
| | | this.$refs.user.validate(valid => { |
| | | if (valid) { |
| | | if (this.dialogType === 'create') { |
| | | imageManagement.addImageResource(this.imagedata) |
| | | .then(() => { |
| | | this.$message.success('操作成功'); |
| | | this.$emit('closeDialog'); |
| | | }) |
| | | .catch(err => this.$message.error(`${err}`)) |
| | | } else { |
| | | imageManagement.updateImageResource(this.imagedata) |
| | | .then(() => { |
| | | this.$message.success('操作成功'); |
| | | this.$emit('closeDialog'); |
| | | }) |
| | | .catch(err => this.$message.error(`${err}`)) |
| | | } |
| | | } else { |
| | | this.$message.warning('请检查必填项'); |
| | | } |
| | | }) |
| | | }, |
| | | handleImageSuccess() {}, |
| | | beforeImageUpload(file) { |
| | | imageManagement.importImage(file) |
| | | .then(res => { |
| | | }) |
| | | .catch(err => this.$message.error(`${err}`)) |
| | | } |
| | | }, |
| | | props: ['updateFlag'] |
| | | props: { |
| | | originalData: { |
| | | type: Object, |
| | | default: () => null |
| | | }, |
| | | dialogType: { |
| | | type: String, |
| | | default: () => 'create' |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | |
| | | async handleExport() { |
| | | const { currentPage, pageSize, context, operationType, mysort, mytime } = |
| | | this; |
| | | console.log(mytime); |
| | | let arr = await this.exportLogs({ |
| | | content: context, |
| | | current: currentPage, |
| | |
| | | async getLogList() { |
| | | const { currentPage, pageSize, context, operationType, mysort, mytime } = |
| | | this; |
| | | console.log(mytime); |
| | | let arr = await this.getLogsList({ |
| | | content: context, |
| | | current: currentPage, |
| | |
| | | startTime: mytime[0] !== "" ? parseTime(mytime[0]) : "", |
| | | sort: mysort, |
| | | }); |
| | | console.log(arr); |
| | | return arr.data.data; |
| | | }, |
| | | // 批量下拉框操作 |
| | | async selectChange(list) { |
| | | console.log(this.tempList); |
| | | if (this.tempList.length !== 0) { |
| | | this.preMyIdx = list; |
| | | if (list === 3) { |
| | |
| | | message: res.message, |
| | | }); |
| | | } |
| | | console.log(res); |
| | | }); |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err); |
| | | }); |
| | | }, |
| | | // 表格监听 |
| | |
| | | done(); |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err); |
| | | }); |
| | | }, |
| | | // 自定义关闭弹窗 |
| | |
| | | }, |
| | | // |
| | | timechange(data) { |
| | | console.log(data); |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | <div class="header-content"> |
| | | <div class="search"> |
| | | <span>ID:</span> |
| | | <el-input placeholder="ID" v-model="context"></el-input> |
| | | <el-input placeholder="请输入ID" v-model="context"></el-input> |
| | | </div> |
| | | <div class="status"> |
| | | <span>短信状态:</span> |
| | |
| | | }, |
| | | // 改变更新时间 |
| | | changeUpdateTime(time) { |
| | | console.log(time) |
| | | if (time) { |
| | | return helper(time); |
| | | } |
| | |
| | | url: 'sccg/base_case/end_case?caseId='+baseCase.id +'&opinion='+baseCase.finalOpinion +'&result='+'结案成功', |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | }) |
| | | } |
| | | }, |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | }) |
| | | }, |
| | | }, |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | }) |
| | | }, |
| | | }, |
| | |
| | | url: 'sccg/base_case/end_case?caseId='+baseCase.id +'&opinion='+baseCase.finalOpinion+'&result='+'结案成功' , |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | }) |
| | | } |
| | | }, |
| | |
| | | url: `sccg/violations/delete?id=${number}`, |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.$message({ |
| | | type: res.code === 200 ? 'success' : 'warning', |
| | | message: res.message |
| | |
| | | url: `sccg/base_case/baseCaseDetail/${code}` |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.info = res.data; |
| | | this.dialogView = true; |
| | | }) |
| | |
| | | url: `sccg/base_case/baseCaseDetail/${code}` |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.info = res.data; |
| | | this.dialogExamine = true; |
| | | }) |
| | |
| | | url: `sccg/base_case/baseCaseDetail/${code}` |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.info = res.data; |
| | | this.dialogClosure = true; |
| | | }) |
| | |
| | | } |
| | | }) |
| | | }) |
| | | .catch(err => { console.log(err) }) |
| | | .catch(err => { }) |
| | | }, |
| | | |
| | | // 表格监听 |
| | |
| | | done(); |
| | | }) |
| | | .catch(err => { |
| | | console.log(err); |
| | | }) |
| | | }, |
| | | |
| | |
| | | methods: { |
| | | handleUser() { |
| | | this.$refs['user'].validate((valid) => { |
| | | console.log(valid); |
| | | if (valid) { |
| | | const { role } = this; |
| | | console.log(role); |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: 'sccg/message_column/addColumn', |
| | |
| | | }, |
| | | // 删除数据 |
| | | handleDelete(idArr) { |
| | | console.log(idArr); |
| | | this.$confirm('是否确定确定删除栏目?') |
| | | .then(_ => { |
| | | this.$axios({ |
| | |
| | | }) |
| | | }) |
| | | .catch(err=>{ |
| | | console.log(err); |
| | | }) |
| | | }, |
| | | // 修改栏目状态 |
| | | handleChangeStatus({ id, status }) { |
| | | console.log(id, status); |
| | | status === true ? status = 1 : status = 0; |
| | | this.$axios({ |
| | | method: 'post', |
| | |
| | | item.isShow === 1 ? item.isShow = true : item.isShow = false; |
| | | }) |
| | | arr = res.data |
| | | // console.log(res); |
| | | }) |
| | | return arr; |
| | | }, |
| | |
| | | }, |
| | | // 下拉框监听 |
| | | async selectChange(list) { |
| | | console.log(this.tempList); |
| | | if (this.tempList.length !== 0) { |
| | | this.preMyIdx = list; |
| | | if (list === 3) { |
| | |
| | | message: res.message |
| | | }) |
| | | } |
| | | console.log(res); |
| | | }) |
| | | }) |
| | | .catch(err => { console.log(err) }) |
| | | .catch(err => { }) |
| | | }, |
| | | // 表格状态监听 |
| | | tableChange(list) { |
| | |
| | | done(); |
| | | }) |
| | | .catch(err => { |
| | | console.log(err); |
| | | }) |
| | | }, |
| | | // 自定义关闭弹窗 |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | console.log(this.info); |
| | | this.role = JSON.parse(JSON.stringify(this.info)) ; |
| | | }, |
| | | methods: { |
| | | handleUser() { |
| | | this.$refs['user'].validate((valid) => { |
| | | console.log(valid); |
| | | if (valid) { |
| | | const { role } = this; |
| | | console.log(role); |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: `sccg/message_column/update/${role.id}`, |
| | |
| | | url: 'sccg/violations/query/event_type' |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.eventLevelList = res.data; |
| | | }) |
| | | }, |
| | | // 提交新增违规类型 |
| | | handleSubmit(){ |
| | | console.log(this.things); |
| | | } |
| | | }, |
| | | props: ['getUserList'] |
| | |
| | | <span>筛选条件:</span> |
| | | <el-input placeholder="请输入内容" v-model="context"></el-input> |
| | | <div class="findBtn"> |
| | | <el-button type="primary" @click="getUserList">查询</el-button> |
| | | <el-button type="primary" @click="getTableData">查询</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="eventSource" label="问题来源" min-width="10"> |
| | | <template slot-scope="scope"> |
| | | <span>{{scope.row.eventSource===1 ? '视频巡查': '人工上报'}}</span> |
| | | <span>{{scope.row}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="category" label="问题类别" min-width="10"> |
| | | <template slot-scope="scope"> |
| | | <span>{{scope.row.category===1 ? '违规': '违建'}}</span> |
| | | <span>{{scope.row}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="创建时间" min-width="10"> |
| | | <template slot-scope="scope"> |
| | | <span>{{changeTime(scope.row.createTime)}}</span> |
| | | <span>{{changeTime(scope.row)}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="type" label="剩余时间" min-width="10"> |
| | | <template slot-scope="scope"> |
| | | <span>{{getRestTime(scope.row.limitTime)}}</span> |
| | | <span>{{getRestTime(scope.row)}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="stepName" label="问题状态" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column min-width="10"> |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="operation" label="操作" min-width="10"> |
| | | <template slot-scope="scope"> |
| | | <div class="operation"> |
| | | <span @click="handleFind(scope.row)">查看</span> |
| | | <span class="line">|</span> |
| | | <span @click="handleDelete(scope.row)">删除</span> |
| | | </div> |
| | | </template> |
| | | </el-table-column> --> |
| | | </el-table> |
| | | <!-- 查看修改页面 --> |
| | | <el-dialog :visible.sync="dialogUpdate" width="45%" :title="updateFlag ? '权限设置' :'查看角色信息'" |
| | | v-if="dialogUpdate" :before-close="handleClose"> |
| | | <updateUser :updateFlag="updateFlag" :userInfo=userInfo |
| | | :getUserList=" context ? getUserList : getUserList" @changeDialog="changeDialog" /> |
| | | :getTableData=" context ? getTableData : getTableData" @changeDialog="changeDialog" /> |
| | | </el-dialog> |
| | | <!-- tools --> |
| | | <div class="tools"> |
| | |
| | | import createUser from "./createUser" |
| | | import {computeTime} from '@/utils/helper' |
| | | import filterTime from '@/utils/mydate' |
| | | import myWait from "@/api/operate/myWait"; |
| | | |
| | | export default { |
| | | components: { |
| | | updateUser,createUser |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.getUserList(); |
| | | this.getTableData(); |
| | | }, |
| | | methods: { |
| | | // 批量删除 |
| | | mulDelete(idArr){ |
| | | console.log(idArr); |
| | | this.$axios({ |
| | | method:'delete', |
| | | url:'sccg/violations/batch_delete?ids='+idArr, |
| | | }).then(res=>{ |
| | | this.getUserList(); |
| | | this.$message({ |
| | | message:res.message, |
| | | type:res.code === 200 ? 'success' : 'warning' |
| | | }) |
| | | getTableData() { |
| | | myWait.getMybackLog({ num: this.context }) |
| | | .then(res => { |
| | | this.tableData = res; |
| | | }) |
| | | .catch(err => this.$message({ type: 'error', message: err })) |
| | | }, |
| | | |
| | | // 批量删除 |
| | | mulDelete(idArr){ |
| | | }, |
| | | // 执行下拉框操作 |
| | | selectChange(val) { |
| | |
| | | // 监听表格选中状态 |
| | | tableChange(list) { |
| | | this.tempList = list; |
| | | if (list.length === this.tableData.length) { |
| | | this.all = true; |
| | | } else { |
| | | this.all = false |
| | | } |
| | | this.all = list.length === this.tableData.length; |
| | | }, |
| | | // 全选 |
| | | selectAll() { |
| | |
| | | }, |
| | | // 删除单条数据 |
| | | handleDelete({ number }) { |
| | | console.log(number); |
| | | this.$confirm('确认删除?') |
| | | .then(_ => { |
| | | console.log(1); |
| | | this.$axios({ |
| | | method: 'delete', |
| | | url: `sccg/violations/delete?id=${number}`, |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.$message({ |
| | | type: res.code === 200 ? 'success' : 'warning', |
| | | message: res.message |
| | | }) |
| | | |
| | | this.getUserList(); |
| | | }) |
| | | }) |
| | | .catch(_ => { console.log(2) }); |
| | | }, |
| | | // 获取用户列表 |
| | | getUserList() { |
| | | const { currentPage, pageSize, context } = this; |
| | | // 获取所有用户信息 |
| | | this.$axios({ |
| | | method: 'get', |
| | | // ?current=${currentPage},&size=${pageSize}& |
| | | url: `sccg/my_backlog/query?num=${context}`, |
| | | }) |
| | | .then(res => { |
| | | this.tableData = res.data; |
| | | this.totalNum = res.data.length; |
| | | }) |
| | | }, |
| | | // 设置表格斑马纹 |
| | | tableRowClassName({ row, rowIndex }) { |
| | |
| | | } else { |
| | | return 'success-row'; |
| | | } |
| | | return ''; |
| | | }, |
| | | // 查看用户信息(不可修改) |
| | | handleFind(rowData) { |
| | |
| | | // 当前页改变触发事件 |
| | | changeCurrentPage(page) { |
| | | this.currentPage = page; |
| | | this.getUserList(); |
| | | this.getTableData(); |
| | | }, |
| | | // 上一页点击事件 |
| | | handlePrev(page) { |
| | | this.currentPage = page; |
| | | this.getUserList(); |
| | | this.getTableData(); |
| | | }, |
| | | // 下一页点击事件 |
| | | handleNext(page) { |
| | | this.currentPage = page; |
| | | this.getUserList(); |
| | | this.getTableData(); |
| | | }, |
| | | changeDialog(val) { |
| | | this.dialogUpdate = val.dialogUpdate; |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | console.log(this.userInfo); |
| | | this.things = JSON.parse(JSON.stringify(this.userInfo)); |
| | | // 获取所属类型列表 |
| | | this.getTypeThird(); |
| | |
| | | description: myInterface.description, |
| | | applicationName: myInterface.applicationName |
| | | }).then(res => { |
| | | console.log(res); |
| | | // if (res.code === 200) { |
| | | // this.refresh(); |
| | | // } |
| | |
| | | }, |
| | | }) |
| | | .then((res) => { |
| | | console.log(res); |
| | | }); |
| | | }, |
| | | // // 当前页改变触发事件 |
| | |
| | | description: myInterface.description, |
| | | applicationName: myInterface.applicationName |
| | | }).then(res => { |
| | | console.log(res); |
| | | // if (res.code === 200) { |
| | | // this.refresh(); |
| | | // } |
| | |
| | | id |
| | | } |
| | | }).then(res => { |
| | | console.log(res); |
| | | }) |
| | | } |
| | | // // 当前页改变触发事件 |
| | |
| | | this.$message({ type: 'error', message: err }); |
| | | }) |
| | | }) |
| | | .catch(err => { console.log(err) }) |
| | | .catch(err => { }) |
| | | }, |
| | | // 表格监听 |
| | | tableChange(list) { |
| | |
| | | } |
| | | }) |
| | | }) |
| | | .catch(err => { console.log(err) }) |
| | | .catch(err => { }) |
| | | }, |
| | | // 表格监听 |
| | | tableChange(list) { |
| | |
| | | checkedList.forEach((item) => { |
| | | arr.push({ leader: item.leader, userId: item.id }); |
| | | }); |
| | | console.log(arr); |
| | | this.$axios({ |
| | | method: "post", |
| | | url: "/sccg/depart/create", |
| | |
| | | }); |
| | | }, |
| | | addUser() { |
| | | console.log(this.checkedUser); |
| | | console.log(this.userList); |
| | | this.checkedList = []; |
| | | this.userList.forEach((item) => { |
| | | this.checkedUser.forEach((child) => { |
| | |
| | | method: "delete", |
| | | url: `sccg/violations/delete?id=${number}`, |
| | | }).then((res) => { |
| | | console.log(res); |
| | | this.$message({ |
| | | type: res.code === 200 ? "success" : "warning", |
| | | message: res.message, |
| | |
| | | // 获取用户列表 |
| | | getUserList() { |
| | | const { currentPage, pageSize, context, statusArr } = this; |
| | | console.log(statusArr); |
| | | // this.$axios({ |
| | | // method: 'get', |
| | | // url: `sccg/base_case/query?state=${statusArr[0]}¤t=${currentPage}&size=${pageSize}&resource=2&type=${statusArr[1]}` |
| | |
| | | url: 'sccg/base_case/end_case?caseId='+baseCase.id +'&opinion='+baseCase.finalOpinion +'&result='+'结案成功', |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | }) |
| | | } |
| | | }, |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | }) |
| | | }, |
| | | }, |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | }) |
| | | }, |
| | | }, |
| | |
| | | url: 'sccg/base_case/end_case?caseId='+baseCase.id +'&opinion='+baseCase.finalOpinion+'&result='+'结案成功' , |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | }) |
| | | } |
| | | }, |
| | |
| | | <div class="contentItem"> |
| | | <span>按编号: </span> |
| | | <div> |
| | | <el-input placeholder=" 请输入编号" v-model="info.code"></el-input> |
| | | <el-input placeholder=" 请输入编号" v-model="searchData.number"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="contentItem"> |
| | | <span>按类型: </span> |
| | | <div class="search"> |
| | | <el-input placeholder=" 请输入编号" v-model="info.type"></el-input> |
| | | <el-input placeholder=" 请输入类型" v-model="searchData.categories"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="contentItem"> |
| | | <span>按社区: </span> |
| | | <div class="search"> |
| | | <el-input placeholder=" 请输入编号" v-model="info.community"></el-input> |
| | | <el-input placeholder=" 请输入社区" v-model="searchData.communityId"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="contentItem"> |
| | | <span>按事发地点: </span> |
| | | <div class="search"> |
| | | <el-input placeholder=" 请输入编号" v-model="info.site"></el-input> |
| | | <el-input placeholder=" 请输入事发地点" v-model="searchData.site"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="date-search contentItem"> |
| | | <div class="btn"> |
| | | <el-button icon="el-icon-plus" type="primary">搜索</el-button> |
| | | <el-button icon="el-icon-plus" categories="primary" @click="getList">搜索</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="headerContent"> |
| | | <span>时间: </span> |
| | | <div> |
| | | <el-input placeholder=" 请输入开始时间" v-model="info.startTime"></el-input> |
| | | </div> |
| | | <div class="line"> |
| | | -- |
| | | </div> |
| | | <div> |
| | | <el-input placeholder=" 请输入结束时间" v-model="info.endTime"></el-input> |
| | | </div> |
| | | <el-date-picker |
| | | v-model="datepick" |
| | | type="daterange" |
| | | @change="datepickChange" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期"> |
| | | </el-date-picker> |
| | | </div> |
| | | </header> |
| | | <main> |
| | |
| | | :header-cell-style="{ background: '#06122c', 'font-size': '12px', color: '#4b9bb7', 'font-weight': '650', 'line-height': '45px' }" |
| | | :data="tableData" style="width: 100%" :row-class-name="tableRowClassName" |
| | | @selection-change="tableChange"> |
| | | <el-table-column type="selection" min-width="5"> |
| | | <el-table-column categories="selection" min-width="5"> |
| | | </el-table-column> |
| | | <el-table-column prop="code" label="事件编号" min-width="18"> |
| | | <el-table-column prop="id" label="事件编号" min-width="18"> |
| | | <template slot-scope="scope"> |
| | | <el-link @click="JumpView(scope.row)">{{ scope.row.code }}</el-link> |
| | | <el-link @click="JumpView(scope.row)">{{ scope.row.id }}</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="eventSource" label="问题来源" min-width="8"> |
| | |
| | | <el-table-column :prop="myproblem === 1 ? 'category' : 'category'" |
| | | :label="myproblem === 1 ? '大类名称' : '违建类别'" :min-width="myproblem === 1 ? '10' : '20'"> |
| | | </el-table-column> |
| | | <el-table-column :prop="myproblem === 1 ? 'type' : 'site'" |
| | | <el-table-column :prop="myproblem === 1 ? 'categories' : 'site'" |
| | | :label="myproblem === 1 ? '小类名称' : '违建地点'" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column :prop="myproblem === 1 ? 'actionCause' : 'communityId'" |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | <!-- 审核页面 --> |
| | | <el-dialog :visible.sync="dialogExamine" width="80%" title="基础信息(人工)" v-if="dialogExamine" |
| | | <el-dialog :visible.sync="dialogExamine" width="80%" title="基础信息(人工)" |
| | | :before-close="handleClose"> |
| | | <MyExamine :info="info" v-if="myproblem === 1" @closeDialog="closeDialog"></MyExamine> |
| | | <MyIllExamine :info="info" v-else @closeDialog="closeDialog"></MyIllExamine> |
| | | </el-dialog> |
| | | <!-- 结案页面 --> |
| | | <el-dialog :visible.sync="dialogClosure" width="80%" title="基础信息(人工)" v-if="dialogClosure" |
| | | <el-dialog :visible.sync="dialogClosure" width="80%" title="基础信息(人工)" |
| | | :before-close="handleClose"> |
| | | <MyClosure :info="info" v-if="myproblem === 1" @closeDialog="closeDialog"></MyClosure> |
| | | <MyIllClosure :info="info" v-else @closeDialog="closeDialog"></MyIllClosure> |
| | | </el-dialog> |
| | | <!-- 详情页面 --> |
| | | <el-dialog :visible.sync="dialogView" width="80%" title="基础信息(人工)" v-if="dialogView" |
| | | <el-dialog :visible.sync="dialogView" width="80%" title="基础信息(人工)" |
| | | :before-close="handleNoClose"> |
| | | <MyDetail :info=info v-if="myproblem === 1" :mycode='code'></MyDetail> |
| | | <MyIllDetail :info=info v-else :mycode="code"></MyIllDetail> |
| | | <MyDetail :info=info v-if="myproblem === 1" :mycode='number'></MyDetail> |
| | | <MyIllDetail :info=info v-else :mycode="number"></MyIllDetail> |
| | | </el-dialog> |
| | | <!-- tools --> |
| | | <div class="tools"> |
| | |
| | | </div> |
| | | <div class="pagination"> |
| | | <el-pagination background :current-page="currentPage" layout="prev, pager, next" |
| | | :total="totalNum" :page-size="pageSize" @current-change="changeCurrentPage" |
| | | @prev-click="handlePrev" @next-click="handleNext"> |
| | | :total="totalNum" :page-size="pageSize" @current-change="changeCurrentPage"> |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | |
| | | import MyDetail from '@/components/detail' |
| | | import MyIllDetail from '@/components/illdetail' |
| | | import helper from '@/utils/mydate' |
| | | import casequery from "@/api/operate/casequery"; |
| | | |
| | | export default { |
| | | components: { |
| | | MyExamine, MyClosure, MyDetail, MyIllDetail, MyIllExamine, MyIllClosure |
| | | }, |
| | | data() { |
| | | return { |
| | | datepick: null, |
| | | tableData: [], |
| | | dialogExamine: false, |
| | | dialogClosure: false, |
| | |
| | | caseId: '', |
| | | myproblem: 1, |
| | | instatus: 7, |
| | | code: '' |
| | | number: '', |
| | | searchData: { |
| | | categories: null, |
| | | number: null, |
| | | communityId: null, |
| | | endTime: null, |
| | | site: null, |
| | | startTime: null |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.getUserList(); |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | // 批量删除 |
| | | mulDelete(idArr) { |
| | | console.log(idArr); |
| | | this.$axios({ |
| | | method: 'delete', |
| | | url: 'sccg/violations/batch_delete?ids=' + idArr, |
| | | }).then(res => { |
| | | this.getUserList(); |
| | | this.getList(); |
| | | this.$message({ |
| | | message: res.message, |
| | | type: res.code === 200 ? 'success' : 'warning' |
| | | categories: res.number === 200 ? 'success' : 'warning' |
| | | }) |
| | | }) |
| | | }, |
| | | // 执行下拉框操作 |
| | | selectChange(list) { |
| | | console.log(this.tempList); |
| | | if (this.tempList.length !== 0) { |
| | | if (list === 3) { |
| | | this.preMyIdx = list; |
| | |
| | | } else { |
| | | this.myIdx = this.preMyIdx; |
| | | this.$message({ |
| | | type: 'warning', |
| | | categories: 'warning', |
| | | message: '您还没选中任何数据', |
| | | }) |
| | | } |
| | |
| | | tableChange(list) { |
| | | this.tempList = []; |
| | | list.forEach(item => { |
| | | this.tempList.push(item.code); |
| | | this.tempList.push(item.number); |
| | | }) |
| | | if (list.length === this.tableData.length) { |
| | | this.all = true; |
| | | } else { |
| | | this.all = false |
| | | } |
| | | this.all = list.length === this.tableData.length; |
| | | }, |
| | | // 全选 |
| | | selectAll() { |
| | |
| | | }, |
| | | // 删除单条数据 |
| | | handleDelete({ number }) { |
| | | console.log(number); |
| | | this.$confirm('确认删除?') |
| | | .then(_ => { |
| | | console.log(1); |
| | | this.$axios({ |
| | | method: 'delete', |
| | | url: `sccg/violations/delete?id=${number}`, |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.$message({ |
| | | type: res.code === 200 ? 'success' : 'warning', |
| | | categories: res.number === 200 ? 'success' : 'warning', |
| | | message: res.message |
| | | }) |
| | | |
| | | this.getUserList(); |
| | | this.getList(); |
| | | }) |
| | | }) |
| | | .catch(_ => { console.log(2) }); |
| | | }, |
| | | // 获取用户列表 |
| | | getUserList() { |
| | | const { currentPage, pageSize, instatus, myproblem } = this; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `sccg/base_case/query?state=${instatus}¤t=${currentPage}&size=${pageSize}&resource=2&type=${myproblem}` |
| | | }).then(res => { |
| | | this.totalNum = res.data.total; |
| | | this.tableData = res.data.records; |
| | | }) |
| | | // 获取列表 |
| | | getList() { |
| | | casequery.baseCaseQuery({ current: this.currentPage, pageSize: this.pageSize, ...this.searchData }) |
| | | .then((res) => { |
| | | this.tableData = res; |
| | | }) |
| | | .catch(err => this.$message({ type: 'error', message: err })) |
| | | }, |
| | | // 设置表格斑马纹 |
| | | tableRowClassName({ row, rowIndex }) { |
| | | if ((rowIndex + 1) % 2 == 0) { |
| | | if ((rowIndex + 1) % 2 === 0) { |
| | | return 'warning-row'; |
| | | } else { |
| | | return 'success-row'; |
| | | } |
| | | return ''; |
| | | }, |
| | | // 当前页改变触发事件 |
| | | changeCurrentPage(page) { |
| | | this.currentPage = page; |
| | | this.getUserList(); |
| | | this.getList(); |
| | | }, |
| | | // 上一页点击事件 |
| | | handlePrev(page) { |
| | | this.currentPage = page; |
| | | this.getUserList(); |
| | | |
| | | datepickChange() { |
| | | this.searchData.startTime = this.datepick[0]; |
| | | this.searchData.endTime = this.datepick[1].replace('00:00:00', '23:59:59'); |
| | | }, |
| | | // 下一页点击事件 |
| | | handleNext(page) { |
| | | this.currentPage = page; |
| | | this.getUserList(); |
| | | }, |
| | | |
| | | handleClose(done) { |
| | | this.$confirm('确认关闭?') |
| | | .then(_ => { |
| | |
| | | handleNoClose(done) { |
| | | done(); |
| | | }, |
| | | async JumpView(data) { |
| | | this.code = data.code |
| | | await this.getEventInfo(data.code); |
| | | JumpView(data) { |
| | | |
| | | }, |
| | | // 获取案件信息 |
| | | getEventInfo(code) { |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `sccg/base_case/baseCaseDetail/${code}` |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.info = res.data; |
| | | this.dialogView = true; |
| | | }) |
| | | }, |
| | | // 获取案件信息 |
| | | getEventInfo3(code) { |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `sccg/base_case/baseCaseDetail/${code}` |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.info = res.data; |
| | | this.dialogExamine = true; |
| | | }) |
| | | }, |
| | | // 获取案件信息 |
| | | getEventInfo2(code) { |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `sccg/base_case/baseCaseDetail/${code}` |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.info = res.data; |
| | | this.dialogClosure = true; |
| | | }) |
| | | }, |
| | | // 去审核 |
| | | handleExamine({ code }) { |
| | | this.getEventInfo3(code); |
| | | }, |
| | | // 去结案 |
| | | handleClosure({ code }) { |
| | | this.getEventInfo2(code); |
| | | }, |
| | | |
| | | // 关闭dialog |
| | | closeDialog({ flag }) { |
| | | this.dialogExamine = flag; |
| | | this.dialogClosure = flag; |
| | | this.getUserList(); |
| | | this.getList(); |
| | | }, |
| | | |
| | | // 问题类型 |
| | | changeMyProblem(val) { |
| | | this.getUserList(); |
| | | this.getList(); |
| | | }, |
| | | |
| | | // 审核状态 |
| | | changeInStatus(val) { |
| | | this.getUserList(); |
| | | this.getList(); |
| | | }, |
| | | |
| | | filterTime(time) { |
| | | return helper(time); |
| | | } |
| | |
| | | display: flex; |
| | | line-height: 60px; |
| | | flex-direction: column; |
| | | // justify-content: space-between; |
| | | padding: 0 20px; |
| | | color: #4b9bb7; |
| | | |
| | |
| | | background-color: #09152f; |
| | | margin-top: 20px; |
| | | padding-bottom: 50px; |
| | | border: 1pox solid #fff; |
| | | |
| | | .btn span:hover { |
| | | cursor: pointer; |
| | |
| | | &::v-deep .el-dialog__body { |
| | | padding: 0; |
| | | } |
| | | |
| | | &::v-deep .el-range-input { |
| | | background-color: #06122c; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | id, |
| | | }, |
| | | }).then((res) => { |
| | | console.log(res); |
| | | this.$message({ |
| | | type: res.code === 404 ? "warning" : "success", |
| | | message: res.message, |
| | |
| | | message: res.message |
| | | }) |
| | | } |
| | | console.log(res); |
| | | }) |
| | | }) |
| | | .catch(err => { console.log(err) }) |
| | |
| | | .then(res => { |
| | | this.myIdx = 0; |
| | | this.preMyIdx = 0; |
| | | console.log(res); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: res.message |
| | |
| | | if (context == '') { |
| | | this.$axios.get('sccg/role/list?keyword=' + '&pageNum=' + currentPage + '&pageSize=' + pageSize).then(res => { |
| | | if (res.code === 200) { |
| | | console.log(res); |
| | | res.data.list.forEach(item => { |
| | | // item.createTime = helper(item.createTime); |
| | | item.status == 1 ? item.status = true : item.status = false; |
| | |
| | | message: res.message, |
| | | }); |
| | | } |
| | | console.log(res); |
| | | }); |
| | | }) |
| | | .catch((err) => { |
| | |
| | | message: res.message, |
| | | }); |
| | | } |
| | | console.log(res); |
| | | }); |
| | | }) |
| | | .catch((err) => { |
| | |
| | | method: "post", |
| | | url: "sccg/admin/delete/" + id, |
| | | }).then((res) => { |
| | | console.log(res); |
| | | this.$message({ |
| | | message: res.message, |
| | | type: "success", |
| | |
| | | this.$axios |
| | | .post(`sccg/admin/updateStatus/` + id + "?status=" + status) |
| | | .then((res) => { |
| | | console.log(res); |
| | | }); |
| | | }, |
| | | // 获取用户列表 |
| | |
| | | <template> |
| | | <div class="create"> |
| | | <el-form ref="device" label-position="right" label-width="120px" :model="bayonet" :rule="rules"> |
| | | <el-form ref="device" label-position="right" label-width="120px" :model="bayonet" :rules="rules"> |
| | | <!-- 卡口名称 --> |
| | | <div class="device-item"> |
| | | <div class="item-left"> |
| | |
| | | <!-- 所属区域 --> |
| | | <div class="device-item"> |
| | | <div class="item-left"> |
| | | <el-form-item label="所属区域:" prop="area"> |
| | | <el-input v-model="bayonet.area" placeholder="请填写区域名称"></el-input> |
| | | <el-form-item label="所属区域:" prop="belong_area"> |
| | | <el-input v-model="bayonet.belong_area" placeholder="请填写区域名称"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | |
| | | <!-- 域名/ip --> |
| | | <div class="device-item"> |
| | | <div class="item-left"> |
| | | <el-form-item label="域名/IP:" prop="domainName"> |
| | | <el-input v-model="bayonet.domainName" placeholder="请填写域名或者IP"></el-input> |
| | | <el-form-item label="域名/IP:" prop="ipAddress"> |
| | | <el-input v-model="bayonet.ipAddress" placeholder="请填写域名或者IP"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | |
| | | <!-- 前端类型 --> |
| | | <div class="device-item"> |
| | | <div class="item-left"> |
| | | <el-form-item label="前端类型:" prop="webType"> |
| | | <el-input v-model="bayonet.webType" placeholder="请输入前端类型"></el-input> |
| | | <el-form-item label="前端类型:" prop="frontEndType"> |
| | | <el-input v-model="bayonet.frontEndType" placeholder="请输入前端类型"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | |
| | | <!-- 出入城类型 --> |
| | | <div class="device-item"> |
| | | <div class="item-left"> |
| | | <el-form-item label="出入城类型:" prop="cityType"> |
| | | <el-input v-model="bayonet.cityType" placeholder="出城/入城"></el-input> |
| | | <el-form-item label="出入城类型:" prop="inOutCityType"> |
| | | <el-input v-model="bayonet.inOutCityType" placeholder="出城/入城"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right"></div> |
| | |
| | | </div> |
| | | <!-- 按钮 --> |
| | | <div class="device-btn"> |
| | | <el-button>返回</el-button> |
| | | <el-button type="primary">确定</el-button> |
| | | <el-button @click="closeDialog">返回</el-button> |
| | | <el-button type="primary" @click="onSubmit">确定</el-button> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | bayonet: { |
| | | bayonetName: '', |
| | | latitude: '', |
| | | longitude: '', |
| | | area: '', |
| | | ipAddress: '', |
| | | port: '', |
| | | frontEndType: '', |
| | | inOutCityType: '', |
| | | description: '', |
| | | }, |
| | | rules: { |
| | | import bayonet from "@/api/system/bayonet"; |
| | | import { deepClone } from "@/utils/helper"; |
| | | |
| | | } |
| | | } |
| | | export default { |
| | | props: { |
| | | originalBayonet: { |
| | | type: Object, |
| | | default: () => {} |
| | | }, |
| | | isEdit: { |
| | | type: Boolean, |
| | | default: () => false |
| | | } |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | bayonet: { |
| | | name: '', |
| | | latitude: '', |
| | | longitude: '', |
| | | belong_area: '', |
| | | ipAddress: '', |
| | | port: '', |
| | | frontEndType: '', |
| | | inOutCityType: '', |
| | | description: '' |
| | | }, |
| | | rules: { |
| | | name: [{ required: true, trigger: 'blur', message: '请填写卡口名称' }], |
| | | latitude: [{ required: true, trigger: ['blur', 'change'], message: '请填写纬度位置' }], |
| | | longitude: [{ required: true, trigger: ['blur', 'change'], message: '请填写经度位置' }], |
| | | belong_area: [{ required: true, trigger: ['blur', 'change'], message: '请填写区域名称' }], |
| | | ipAddress: [{ required: true, trigger: ['blur', 'change'], message: '请填写域名或者IP' }], |
| | | port: [{ required: true, trigger: ['blur', 'change'], message: '请输入端口号' }], |
| | | frontEndType: [{ required: true, trigger: ['blur', 'change'], message: '请输入前端类型' }], |
| | | inOutCityType: [{ required: true, trigger: ['blur', 'change'], message: '请填写出城/入城' }], |
| | | description: [{ required: true, trigger: ['blur', 'change'], message: '请输入描述内容' }] |
| | | } |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | onSubmit() { |
| | | this.$refs.device.validate(valid => { |
| | | if (valid) { |
| | | const copyBayonet = deepClone(this.bayonet); |
| | | if (!this.isEdit) { |
| | | bayonet.addBayonet(this.bayonet) |
| | | .then(() => { |
| | | this.$message({ type: 'success', message: '操作成功' }); |
| | | this.$emit('closeDialog'); |
| | | }) |
| | | .catch(err => { |
| | | this.$message({ type: 'error', message: err }); |
| | | }) |
| | | } else { |
| | | bayonet.updateBayonet(copyBayonet) |
| | | .then(() => { |
| | | this.$message({ type: 'success', message: '操作成功' }); |
| | | this.$emit('closeDialog'); |
| | | }) |
| | | .catch(err => { |
| | | this.$message({ type: 'error', message: err }); |
| | | }) |
| | | } |
| | | } else { |
| | | this.$message({ type: 'warning', message: '请检查必填项' }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | closeDialog() { |
| | | this.$emit('closeDialog'); |
| | | } |
| | | } |
| | | |
| | | } |
| | | </script> |
| | |
| | | <div class="header-content"> |
| | | <div class="search"> |
| | | <span style="padding-right:20px">筛选条件:</span> |
| | | <el-select v-model="context" placeholder="请选择"> |
| | | <el-select v-model="context" placeholder="请选择" @change="getBayonetListData"> |
| | | <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | <main> |
| | | <div class="main-content"> |
| | | <div class="main-title"> |
| | | <el-button class="el-icon-plus" type="primary" @click="dialogCreate = true">添加</el-button> |
| | | <el-button class="el-icon-plus" type="primary" @click="showDialog(false, null)">添加</el-button> |
| | | <el-button @click="handleExport">导出卡口</el-button> |
| | | </div> |
| | | <!-- 数据展示 --> |
| | | <MyTable |
| | | <MyTable |
| | | :tableOption="tableOption" |
| | | :tableData="list" |
| | | :pageShow="false"> |
| | | <template #operation="info"> |
| | | <el-link :underline="false" style="color:#4b9bb7">编辑</el-link> |
| | | <el-link :underline="false" style="color:#4b9bb7" @click="showDialog(true, info)">编辑</el-link> |
| | | </template> |
| | | </MyTable> |
| | | </div> |
| | | </main> |
| | | <footer> |
| | | <!-- 添加卡口 --> |
| | | <el-dialog title="添加卡口" :visible.sync="dialogCreate" width="60%" :before-close="handleClose"> |
| | | <MyCreate :addBayonet="addBayonet"></MyCreate> |
| | | <el-dialog :title="getDialogTitle" :visible.sync="isShowDialog" width="60%" :before-close="handleClose"> |
| | | <MyCreate @closeDialog="closeDialog" :originalBayonet="originalBayonet" :isEdit="isEdit"></MyCreate> |
| | | </el-dialog> |
| | | </footer> |
| | | </div> |
| | |
| | | <script> |
| | | import MyCreate from './create' |
| | | import MyTable from '@/components/Table' |
| | | import {myDownLoad} from '@/utils/helper' |
| | | import { createNamespacedHelpers } from "vuex"; |
| | | const { mapActions } = createNamespacedHelpers("bayonet"); |
| | | import bayonet from "@/api/system/bayonet"; |
| | | import {downloadFile} from "@/utils/helper"; |
| | | |
| | | export default { |
| | | components: { |
| | | MyCreate, MyTable, |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogCreate: false, |
| | | isShowDialog: false, |
| | | context: 0, |
| | | options: [ |
| | | { |
| | |
| | | type: 'text', |
| | | prop: 'latitude', |
| | | }, |
| | | // { |
| | | // label: '所属区域', |
| | | // type: 'text', |
| | | // prop: '', |
| | | // }, |
| | | { |
| | | label: '域名/IP', |
| | | type: 'text', |
| | |
| | | }, |
| | | ] |
| | | }, |
| | | originalBayonet: null, |
| | | isEdit: false |
| | | } |
| | | }, |
| | | |
| | | computed: { |
| | | getDialogTitle() { |
| | | return this.isEdit ? '编辑卡口' : '新建卡口'; |
| | | }, |
| | | }, |
| | | created() { |
| | | const { setTableData } = this; |
| | | setTableData(); |
| | | this.getBayonetListData(); |
| | | }, |
| | | methods: { |
| | | // 弹窗关闭 |
| | | handleClose(done) { |
| | | this.$confirm('确认关闭?') |
| | | .then(_ => { |
| | | done(); |
| | | }) |
| | | }, |
| | | ...mapActions(['getBayonetList', 'exportBayonetList','addBayonet']), |
| | | // 设置tableData |
| | | async setTableData() { |
| | | const { current, size, context } = this; |
| | | let arr = await this.getBayonetList({ |
| | | // bayonetName:context, |
| | | current, size |
| | | getBayonetListData() { |
| | | bayonet.getBayonetList({ bayonetName: '', current: this.current, size: this.size }) |
| | | .then(data => { |
| | | this.list = data; |
| | | }) |
| | | this.list = arr.data.data |
| | | }, |
| | | // 导出 |
| | | async handleExport(){ |
| | | const { current, size, context } = this; |
| | | let arr = await this.exportBayonetList({ |
| | | current, size |
| | | .catch(err => { |
| | | this.$message({ type: 'error', message: err }); |
| | | }) |
| | | myDownLoad(arr); |
| | | console.log(arr); |
| | | } |
| | | }, |
| | | // 弹窗关闭 |
| | | handleClose(done) { |
| | | this.$confirm('确认关闭?') |
| | | .then(_ => { |
| | | done(); |
| | | }) |
| | | }, |
| | | |
| | | closeDialog() { |
| | | this.isShowDialog = false; |
| | | }, |
| | | |
| | | handleExport() { |
| | | bayonet.exportBayonetList({ bayonetName: this.context, current: this.current, size: this.size }) |
| | | .then(res => { |
| | | downloadFile(res); |
| | | this.$message({ type: 'success', message: '操作成功' }); |
| | | }) |
| | | .catch(err => { |
| | | this.$message({ type: 'error', message: err }); |
| | | }) |
| | | }, |
| | | showDialog(isEdit, data) { |
| | | this.isShowDialog = true; |
| | | this.isEdit = isEdit; |
| | | this.originalBayonet = data; |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | |
| | | header { |
| | | background-color: #09152f; |
| | | border: 1pox solid #fff; |
| | | |
| | | .header-content { |
| | | padding: 0 40px; |
| | |
| | | background-color: #09152f; |
| | | margin-top: 20px; |
| | | padding-bottom: 50px; |
| | | border: 1pox solid #fff; |
| | | |
| | | .main-title { |
| | | line-height: 60px; |
| | |
| | | message: res.message |
| | | }) |
| | | } |
| | | console.log(res); |
| | | }) |
| | | }) |
| | | .catch(err => { console.log(err) }) |
| | |
| | | message: res.message |
| | | }) |
| | | } |
| | | console.log(res); |
| | | }) |
| | | }) |
| | | .catch(err => { console.log(err) }) |
| | |
| | | method: 'post', |
| | | url: 'sccg/admin/delete/' + id, |
| | | }).then(res => { |
| | | console.log(res); |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'success' |
| | |
| | | let { id, status } = obj; |
| | | status == true ? status = 1 : status = 0; |
| | | this.$axios.post(`sccg/admin/updateStatus/` + id + '?status=' + status).then(res => { |
| | | console.log(res); |
| | | }) |
| | | }, |
| | | // 获取用户列表 |
| | |
| | | import detailUser from "./detailUser"; |
| | | import { deleteTeam, exportTeamInfo, importTeamInfo, searchTeamInfo } from "@/api/system/portal/teamConstruction"; |
| | | import {SUCCESS_CODE} from "@/utils"; |
| | | import {downloadFile} from "@/utils/helper"; |
| | | |
| | | export default { |
| | | components: { updateUser, detailUser }, |
| | |
| | | exportTable() { |
| | | exportTeamInfo({ current: this.currentPage, size: this.pageSize, departName: this.searchDepartment, status: this.searchStatus }) |
| | | .then(res => { |
| | | const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' }); |
| | | const fileName = res.contentDisposition.split('=')[1]; |
| | | if (window.navigator && window.navigator.msSaveBlob) { |
| | | navigator.msSaveBlob(blob, fileName); |
| | | } else { |
| | | const link = document.createElement('a'); |
| | | link.style.display = 'none'; |
| | | link.href = URL.createObjectURL(blob); |
| | | link.setAttribute('download', decodeURI(fileName)); |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | URL.revokeObjectURL(link.href); |
| | | document.body.removeChild(link); |
| | | } |
| | | downloadFile(res); |
| | | this.$message({ type: 'success', message: '操作成功' }); |
| | | }) |
| | | .catch(err => { |
| | | this.$message({ type: 'error', message: err }); |
| | |
| | | |
| | | // 导入 |
| | | importTable(file) { |
| | | importTeamInfo({ 'multipartFile': file.file }) |
| | | importTeamInfo(file.file) |
| | | .then(() => { |
| | | this.$message({ type: 'success', message: '操作成功' }); |
| | | this.getDepartmentList(); |
| | |
| | | description:myInterface.description, |
| | | applicationName:myInterface.applicationName |
| | | }).then(res => { |
| | | console.log(res); |
| | | // if (res.code === 200) { |
| | | // this.refresh(); |
| | | // } |
| | |
| | | this.$axios.delete('sccg/system/portal/thirdApp/delete',{params:{ |
| | | id |
| | | }}).then(res=>{ |
| | | console.log(res); |
| | | }) |
| | | } |
| | | // // 当前页改变触发事件 |
| | |
| | | url: 'sccg/system/portal/logo/add', |
| | | data: icon |
| | | }).then(res => { |
| | | console.log(res); |
| | | if (res.code == 200) { |
| | | this.$axios({ |
| | | method: 'get', |
| | |
| | | url: 'sccg/system/portal/logo/update', |
| | | data: obj |
| | | }).then(res => { |
| | | console.log(res); |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'success' |
| | |
| | | }, |
| | | methods: { |
| | | handleNodeClick(data) { |
| | | console.log(data); |
| | | } |
| | | } |
| | | }; |