| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2023-04-10 17:28:21 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-04-10 17:29:29 |
| | | * @LastEditTime: 2023-07-10 19:11:32 |
| | | * @FilePath: \srs-police-affairs\src\api\icons\index.js |
| | | * @Description: |
| | | * |
| | |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 获取派出所和责任区数据 |
| | | * @param {*} params |
| | | * @returns |
| | | */ |
| | | export const getWarningsAll = () => { |
| | | return request({ |
| | | url: '/api/data/getWarningsPictureUrlDataList', |
| | | method: 'get', |
| | | }) |
| | | } |
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2023-04-04 16:24:42 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-07-07 15:09:44 |
| | | * @LastEditTime: 2023-07-10 19:11:58 |
| | | * @FilePath: \srs-police-affairs\src\components\warningSelect\index.vue |
| | | * @Description: |
| | | * |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getIconsAll } from "@/api/icons/index" |
| | | import { getWarningsAll } from "@/api/icons/index" |
| | | export default { |
| | | name: 'WarningSelect', |
| | | |
| | |
| | | |
| | | methods: { |
| | | requireImage () { |
| | | this.imageUrls = [ |
| | | { |
| | | url: '/warnings/防范区1.png', |
| | | title: '防范区1', |
| | | }, |
| | | { |
| | | url: '/warnings/防范区2.png', |
| | | title: '防范区2', |
| | | }, |
| | | { |
| | | url: '/warnings/防范区3.png', |
| | | title: '防范区3', |
| | | }, |
| | | { |
| | | url: '/warnings/核心区1.png', |
| | | title: '核心区1', |
| | | }, |
| | | ] |
| | | getWarningsAll().then(res => { |
| | | res.data.data.forEach(item => { |
| | | let imgArr = item.split('/') |
| | | |
| | | let title = imgArr[imgArr.length - 1].split('.')[0] |
| | | |
| | | // getIconsAll().then(res => { |
| | | // res.data.data.forEach(item => { |
| | | // let imgArr = item.split('/') |
| | | |
| | | // let title = imgArr[imgArr.length - 1].split('.')[0] |
| | | |
| | | // this.imageUrls.push({ |
| | | // url: item, |
| | | // title |
| | | // }) |
| | | // }) |
| | | // this.loading = false |
| | | // }) |
| | | this.imageUrls.push({ |
| | | url: item, |
| | | title |
| | | }) |
| | | }) |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | curImgClick (item) { |