新增消息管理
This commit is contained in:
commit
cdc209485f
|
|
@ -11,12 +11,11 @@ VITE_OPEN_PROXY = false
|
||||||
|
|
||||||
VITE_PROXY_API = /dev-api
|
VITE_PROXY_API = /dev-api
|
||||||
|
|
||||||
# VITE_PROXY = [ ["/dev-api", "http://192.168.110.186:8040" ],["/dev-img-api", "http://file.sczysoft.com" ]]
|
|
||||||
|
|
||||||
# http://42.193.40.239:8017/doc.html//线上 http://192.168.110.186:8017/doc.html//本地
|
# http://42.193.40.239:8017/doc.html//线上 http://192.168.110.186:8017/doc.html//本地
|
||||||
VITE_PROXY = [ ["/dev-api", "http://192.168.110.186:8017" ],["/dev-img-api", "http://file.sczysoft.com" ]]
|
|
||||||
|
VITE_PROXY = [ ["/dev-api", "http://42.193.40.239:8017" ],["/dev-img-api", "http://file.sczysoft.com" ]]
|
||||||
|
# VITE_PROXY = [ ["/dev-api", "http://192.168.110.186:8017" ],["/dev-img-api", "http://file.sczysoft.com" ]]
|
||||||
#
|
#
|
||||||
VITE_GLOB_UPLOAD_URL=/dev-api
|
VITE_GLOB_UPLOAD_URL=/dev-api
|
||||||
VITE_UPLOAD_IMG_URL=/dev-img-api
|
VITE_UPLOAD_IMG_URL=/dev-img-api
|
||||||
VITE_UPLOAD_URL = http://192.168.110.186
|
VITE_UPLOAD_URL = http://192.168.110.186
|
||||||
VITE_IFRAMEURL=http://192.168.110.39:8010
|
|
||||||
|
|
|
||||||
|
|
@ -157,6 +157,16 @@ export function getOtheWareHousePage(data) {
|
||||||
params: data
|
params: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*应急仓库详情
|
||||||
|
*/
|
||||||
|
export function getHouseDetail(houseId) {
|
||||||
|
return request({
|
||||||
|
url: `admin/OtheWareHouse/getOtheWareHouse`,
|
||||||
|
method: "GET",
|
||||||
|
params: { houseId }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*应急仓库管理员列表
|
*应急仓库管理员列表
|
||||||
|
|
@ -171,9 +181,9 @@ export function getHouseSysUser(userId) {
|
||||||
/**
|
/**
|
||||||
*应急仓库添加-修改
|
*应急仓库添加-修改
|
||||||
*/
|
*/
|
||||||
export function delOthpersonHouse(data) {
|
export function saveOtheWareHouse(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `admin/OtheWareHouse/delOthperson`,
|
url: `admin/OtheWareHouse/saveOtheWareHouse`,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
|
|
@ -194,7 +204,7 @@ export function delOtheWareHouse(data) {
|
||||||
*/
|
*/
|
||||||
export function getOthplanPage(params) {
|
export function getOthplanPage(params) {
|
||||||
return request({
|
return request({
|
||||||
url: `admin/Othplan/getOthplanPage`,
|
url: `admin/Othplan/saveOthplan`,
|
||||||
method: "GET",
|
method: "GET",
|
||||||
params: params
|
params: params
|
||||||
});
|
});
|
||||||
|
|
|
||||||
1
src/assets/icons/icon-statistic.svg
Normal file
1
src/assets/icons/icon-statistic.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16.017" viewBox="0 0 16 16.017"><defs><style>.a{fill:#b5c4e1;}.b{fill:#fff;opacity:0;}.c{clip-path:url(#a);}</style><clipPath id="a"><rect class="a" width="16" height="16.017"/></clipPath></defs><g transform="translate(-8913 -343.983)"><rect class="b" width="16" height="16" transform="translate(8913 344)"/><g transform="translate(8363 212.983)"><g transform="translate(550 131)"><g class="c"><path class="a" d="M963.789,137.567v-5.619a1.143,1.143,0,0,1,1.332-1.126,8,8,0,0,1,6.557,6.557,1.143,1.143,0,0,1-1.126,1.332h-5.619a1.143,1.143,0,0,1-1.143-1.143Zm0,0" transform="translate(-955.704 -130.81)"/><path class="a" d="M557.7,231.124h5.319a1.143,1.143,0,0,1,1.143,1.338,7.146,7.146,0,1,1-8.372-8.358,1.143,1.143,0,0,1,1.338,1.143v5.3a.572.572,0,0,0,.572.572Zm0,0" transform="translate(-549.999 -222.268)"/></g></g></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 933 B |
1
src/assets/icons/icon-trends.svg
Normal file
1
src/assets/icons/icon-trends.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><defs><style>.a{fill:#fff;opacity:0;}.b{fill:#b5c4e1;}</style></defs><g transform="translate(-865 -102)"><rect class="a" width="16" height="16" transform="translate(865 102)"/><g transform="translate(258 -145.367)"><path class="b" d="M618.152,253.66a.644.644,0,1,1,.589-.589.644.644,0,0,1-.589.589ZM623,248.715v9.871a.714.714,0,0,1-.714.715h-6.7v2.289h3.4a.584.584,0,0,1,.586.582.572.572,0,0,1-.572.561h-7.99a.584.584,0,0,1-.586-.58v-.006a.572.572,0,0,1,.572-.56h3.448V259.3H607.8l4.326-4.326,2.025,2.034a.572.572,0,0,0,.808,0l2.393-2.393a1.784,1.784,0,1,0-.81-.81l-1.985,1.986-1.986-1.983a.571.571,0,0,0-.8-.085.49.49,0,0,0-.045.041L607,258.49v-9.662a.828.828,0,0,1,.828-.828h14.455a.714.714,0,0,1,.715.714Zm0,0" transform="translate(0 0)"/></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 839 B |
1
src/assets/icons/icon-work.svg
Normal file
1
src/assets/icons/icon-work.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><style>.a{fill:#b5c4e1;}.b{fill:#fff;opacity:0;}.c{clip-path:url(#a);}</style><clipPath id="a"><rect class="a" width="16" height="16"/></clipPath></defs><g transform="translate(-8914 -324)"><rect class="b" width="16" height="16" transform="translate(8914 324)"/><g transform="translate(8286 115)"><g transform="translate(628 209)"><g class="c" transform="translate(0 0)"><path class="a" d="M628.481,367.9h1.771a.6.6,0,0,0,.6-.572.58.58,0,0,0-.6-.572h-1.771a.6.6,0,0,0-.6.572.582.582,0,0,0,.6.572Zm2.342,6.683a.58.58,0,0,0-.6-.572h-1.742a.6.6,0,0,0-.6.572.58.58,0,0,0,.6.572h1.771a.573.573,0,0,0,.572-.572Zm0,0" transform="translate(-627.883 -362.953)"/></g></g><path class="a" d="M695.564,221.031l-.257-.172a.592.592,0,0,1-.114-.828l1.456-1.8-.458-.371-1.485,1.8a.588.588,0,0,1-.828.085l-.228-.172,6.683-8.054a2.234,2.234,0,0,0-2.342-2.2H687.709a1.629,1.629,0,0,0-1.829,1.514v1.143h.886a1.568,1.568,0,0,1,1.543,1.514A1.441,1.441,0,0,1,686.853,215h-.971v4.2h.886a1.568,1.568,0,0,1,1.543,1.514,1.441,1.441,0,0,1-1.456,1.514h-.971V223.6a1.759,1.759,0,0,0,1.829,1.686h10.854a1.838,1.838,0,0,0,1.914-1.686v-8.485Zm-2.17,1.114c-.2.085-.714-.085-.685-.315l.6-1.8,1.829,1.456Zm0,0" transform="translate(-56.483 -0.312)"/></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
|
|
@ -1,74 +1,95 @@
|
||||||
<script setup name="Tools">
|
<script setup name="Tools">
|
||||||
import { useFullscreen } from '@vueuse/core'
|
import { useFullscreen } from "@vueuse/core";
|
||||||
import eventBus from '@/utils/eventBus'
|
import eventBus from "@/utils/eventBus";
|
||||||
import { useMainPage } from '@/utils/composables'
|
import { useMainPage } from "@/utils/composables";
|
||||||
import useSettingsStore from '@/store/modules/settings'
|
import useSettingsStore from "@/store/modules/settings";
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from "@/store/modules/user";
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter();
|
||||||
|
|
||||||
const settingsStore = useSettingsStore()
|
const settingsStore = useSettingsStore();
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore();
|
||||||
|
|
||||||
const { isFullscreen, toggle } = useFullscreen()
|
const { isFullscreen, toggle } = useFullscreen();
|
||||||
|
|
||||||
function userCommand(command) {
|
function userCommand(command) {
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case 'dashboard':
|
case "pwd":
|
||||||
router.push({
|
router.push({
|
||||||
name: 'dashboard'
|
name: "personalEditPassword",
|
||||||
})
|
});
|
||||||
break
|
break;
|
||||||
case 'setting':
|
case "logout":
|
||||||
router.push({
|
|
||||||
name: 'personalSetting'
|
|
||||||
})
|
|
||||||
break
|
|
||||||
case 'logout':
|
|
||||||
userStore.logout().then(() => {
|
userStore.logout().then(() => {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'login'
|
name: "login",
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
break
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function pro() {
|
function pro() {
|
||||||
window.open('https://www.baidu.com/', 'top')
|
window.open("https://www.baidu.com/", "top");
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<span v-if="settingsStore.mode == 'pc' && false" class="item item-pro" @click="pro">
|
<span
|
||||||
<el-icon>
|
v-if="settingsStore.topbar.enableNavSearch"
|
||||||
<svg-icon name="pro" />
|
class="item"
|
||||||
</el-icon>
|
@click="eventBus.emit('global-search-toggle')"
|
||||||
<span class="title">查看专业版</span>
|
>
|
||||||
</span>
|
|
||||||
<span v-if="settingsStore.topbar.enableNavSearch" class="item" @click="eventBus.emit('global-search-toggle')">
|
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<svg-icon name="ep:search" />
|
<svg-icon name="ep:search" />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="settingsStore.mode === 'pc' && settingsStore.topbar.enableFullscreen" class="item" @click="toggle">
|
<span
|
||||||
|
v-if="
|
||||||
|
settingsStore.mode === 'pc' && settingsStore.topbar.enableFullscreen
|
||||||
|
"
|
||||||
|
class="item"
|
||||||
|
@click="toggle"
|
||||||
|
>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<svg-icon :name="isFullscreen ? 'fullscreen-exit' : 'fullscreen'" />
|
<svg-icon :name="isFullscreen ? 'fullscreen-exit' : 'fullscreen'" />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="settingsStore.topbar.enablePageReload" class="item" @click="useMainPage().reload()">
|
<span
|
||||||
|
v-if="settingsStore.topbar.enablePageReload"
|
||||||
|
class="item"
|
||||||
|
@click="useMainPage().reload()"
|
||||||
|
>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<svg-icon name="ep:refresh-right" />
|
<svg-icon name="ep:refresh-right" />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="settingsStore.topbar.enableColorScheme" class="item" @click="settingsStore.setColorScheme(settingsStore.app.colorScheme === 'dark' ? 'light' : 'dark')">
|
<span
|
||||||
|
v-if="settingsStore.topbar.enableColorScheme"
|
||||||
|
class="item"
|
||||||
|
@click="
|
||||||
|
settingsStore.setColorScheme(
|
||||||
|
settingsStore.app.colorScheme === 'dark' ? 'light' : 'dark'
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<svg-icon v-show="settingsStore.app.colorScheme === 'light'" name="ep:sunny" />
|
<svg-icon
|
||||||
<svg-icon v-show="settingsStore.app.colorScheme === 'dark'" name="ep:moon" />
|
v-show="settingsStore.app.colorScheme === 'light'"
|
||||||
|
name="ep:sunny"
|
||||||
|
/>
|
||||||
|
<svg-icon
|
||||||
|
v-show="settingsStore.app.colorScheme === 'dark'"
|
||||||
|
name="ep:moon"
|
||||||
|
/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="settingsStore.topbar.enableAppSetting" class="item" @click="eventBus.emit('global-theme-toggle')">
|
<span
|
||||||
|
v-if="settingsStore.topbar.enableAppSetting"
|
||||||
|
class="item"
|
||||||
|
@click="eventBus.emit('global-theme-toggle')"
|
||||||
|
>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<svg-icon name="ep:setting" />
|
<svg-icon name="ep:setting" />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
|
|
@ -88,8 +109,7 @@ function pro() {
|
||||||
</div>
|
</div>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu class="user-dropdown">
|
<el-dropdown-menu class="user-dropdown">
|
||||||
<el-dropdown-item v-if="settingsStore.dashboard.enable" command="dashboard">控制台</el-dropdown-item>
|
<el-dropdown-item command="pwd">修改密码</el-dropdown-item>
|
||||||
<el-dropdown-item command="setting">个人设置</el-dropdown-item>
|
|
||||||
<el-dropdown-item divided command="logout">退出登录</el-dropdown-item>
|
<el-dropdown-item divided command="logout">退出登录</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,9 @@ export default {
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'team_detail',
|
path: 'team-detail',
|
||||||
name: 'team_detail',
|
name: 'team-detail',
|
||||||
component: () => import('@/views/emergency/procession/form_details.vue'),
|
component: () => import('@/views/emergency/procession/team-details.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
auth: "emer.team.detail",
|
auth: "emer.team.detail",
|
||||||
title: '队伍详情',
|
title: '队伍详情',
|
||||||
|
|
@ -36,15 +36,29 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'resourse',
|
path: 'house',
|
||||||
name: 'resourse',
|
name: 'house',
|
||||||
component: () => import('@/views/emergency/matter/index.vue'),
|
component: () => import('@/views/emergency/house/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
icon: 'point',
|
icon: 'point',
|
||||||
auth: "emer.resourse",
|
auth: "emer.house",
|
||||||
title: '物资管理',
|
title: '物资管理',
|
||||||
breadcrumb: true, //是否显示面包屑
|
breadcrumb: true, //是否显示面包屑
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'house-detail',
|
||||||
|
name: 'house-detail',
|
||||||
|
component: () => import('@/views/emergency/house/details.vue'),
|
||||||
|
meta: {
|
||||||
|
auth: "emer.house.detail",
|
||||||
|
title: '仓库详情',
|
||||||
|
sidebar: false, //是否在菜单栏显示
|
||||||
|
breadcrumb: true, //是否显示面包屑
|
||||||
|
activeMenu: '/emergency/house'
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'shelter',
|
path: 'shelter',
|
||||||
|
|
@ -78,6 +92,17 @@ export default {
|
||||||
title: '应急预案',
|
title: '应急预案',
|
||||||
breadcrumb: true, //是否显示面包屑
|
breadcrumb: true, //是否显示面包屑
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'point',
|
||||||
|
name: 'point',
|
||||||
|
component: () => import('@/views/emergency/danger-points/index.vue'),
|
||||||
|
meta: {
|
||||||
|
icon: 'point',
|
||||||
|
auth: "emer.plan",
|
||||||
|
title: '隐患点位',
|
||||||
|
breadcrumb: true, //是否显示面包屑
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -8,7 +8,7 @@ export default {
|
||||||
meta: {
|
meta: {
|
||||||
auth: "statistic",
|
auth: "statistic",
|
||||||
title: '统计分析',
|
title: '统计分析',
|
||||||
icon: 'point',
|
icon: 'icon-statistic',
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ export default {
|
||||||
meta: {
|
meta: {
|
||||||
auth: "daily",
|
auth: "daily",
|
||||||
title: '工作管理',
|
title: '工作管理',
|
||||||
icon: 'point',
|
icon: 'icon-work',
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ export default {
|
||||||
meta: {
|
meta: {
|
||||||
auth: "trends",
|
auth: "trends",
|
||||||
title: '工作动态',
|
title: '工作动态',
|
||||||
icon: 'point',
|
icon: 'icon-trends',
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,7 @@ const useUserStore = defineStore(
|
||||||
}
|
}
|
||||||
return retn
|
return retn
|
||||||
},
|
},
|
||||||
companyInfo: state => {
|
|
||||||
return state.company || '{}'
|
|
||||||
// return JSON.parse(state.company || '{}')
|
|
||||||
},
|
|
||||||
userInfo: state => {
|
userInfo: state => {
|
||||||
return state.user || '{}'
|
return state.user || '{}'
|
||||||
// return JSON.parse(state.user || '{}')
|
// return JSON.parse(state.user || '{}')
|
||||||
|
|
@ -36,10 +33,10 @@ const useUserStore = defineStore(
|
||||||
loginIn(data).then(res => {
|
loginIn(data).then(res => {
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
conpanyInfo(res.data.sysuserid).then(result => {
|
conpanyInfo(res.data.sysuserid).then(result => {
|
||||||
localStorage.setItem('user', JSON.stringify(res.data))
|
localStorage.setItem('user-df', JSON.stringify(res.data))
|
||||||
localStorage.setItem('account', res.data.postName)
|
localStorage.setItem('account-df', res.data.postName)
|
||||||
localStorage.setItem('token', res.data.tokenValue)
|
localStorage.setItem('token-df', res.data.tokenValue)
|
||||||
localStorage.setItem('failure_time', 1664008260)
|
localStorage.setItem('failure_time-df', 1664008260)
|
||||||
resolve()
|
resolve()
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
|
|
@ -56,11 +53,10 @@ const useUserStore = defineStore(
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
const routeStore = useRouteStore()
|
const routeStore = useRouteStore()
|
||||||
const menuStore = useMenuStore()
|
const menuStore = useMenuStore()
|
||||||
localStorage.removeItem('account')
|
localStorage.removeItem('account-df')
|
||||||
localStorage.removeItem('token')
|
localStorage.removeItem('token-df')
|
||||||
localStorage.removeItem('user')
|
localStorage.removeItem('user-df')
|
||||||
localStorage.removeItem('company')
|
localStorage.removeItem('failure_time-df')
|
||||||
localStorage.removeItem('failure_time')
|
|
||||||
this.account = ''
|
this.account = ''
|
||||||
this.token = ''
|
this.token = ''
|
||||||
this.failure_time = ''
|
this.failure_time = ''
|
||||||
|
|
|
||||||
133
src/views/emergency/danger-points/dialog/add-edit.vue
Normal file
133
src/views/emergency/danger-points/dialog/add-edit.vue
Normal file
|
|
@ -0,0 +1,133 @@
|
||||||
|
<template>
|
||||||
|
<BaseDialog
|
||||||
|
:dialogVisible="props.visible"
|
||||||
|
@close="onclone"
|
||||||
|
:titleName="titleName + '隐患点'"
|
||||||
|
width="50%"
|
||||||
|
@onSubmit="handleSubmit"
|
||||||
|
:footerclosed="true"
|
||||||
|
:diafooter="true"
|
||||||
|
>
|
||||||
|
<div class="detailForm-content">
|
||||||
|
<el-form
|
||||||
|
ref="formRef"
|
||||||
|
label-width="120"
|
||||||
|
:rules="ruleForm"
|
||||||
|
:model="formData"
|
||||||
|
class="center-form"
|
||||||
|
>
|
||||||
|
<el-form-item label="点位名称" prop="name">
|
||||||
|
<el-input placeholder="请输入" type="input" v-model="formData.name" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="点位类型" prop="type">
|
||||||
|
<el-select
|
||||||
|
v-model="type"
|
||||||
|
@change="getList"
|
||||||
|
clearable
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in types"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="详细地址" prop="address" style="width: 94%">
|
||||||
|
<el-input
|
||||||
|
placeholder="请输入"
|
||||||
|
type="input"
|
||||||
|
v-model="formData.address"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="简介/备注" prop="remarks" style="width: 94%">
|
||||||
|
<el-input
|
||||||
|
placeholder="请输入"
|
||||||
|
:rows="4"
|
||||||
|
type="textarea"
|
||||||
|
v-model="formData.remarks"
|
||||||
|
/></el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</BaseDialog>
|
||||||
|
</template>
|
||||||
|
<script setup lang='ts'>
|
||||||
|
import { reactive, ref, onMounted, watch } from "vue";
|
||||||
|
import { ElMessage, FormInstance, FormRules } from "element-plus";
|
||||||
|
import { getUUID } from "@/utils/common";
|
||||||
|
const uuid = ref(getUUID());
|
||||||
|
|
||||||
|
import { inListAdd } from "@/api/industry";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
form: Object,
|
||||||
|
});
|
||||||
|
|
||||||
|
const emits = defineEmits(["close"]);
|
||||||
|
const titleName = ref("新增");
|
||||||
|
// 表单
|
||||||
|
const formRef = ref<FormInstance>();
|
||||||
|
const ruleForm = reactive<FormRules>({
|
||||||
|
name: [{ required: true, message: "请输入名字", trigger: "blur" }],
|
||||||
|
type: [{ required: true, message: "请选择类型", trigger: "blur" }],
|
||||||
|
address: [{ required: true, message: "请输入地址", trigger: "blur" }],
|
||||||
|
remarks: [{ required: true, message: "请输入简介/备注", trigger: "blur" }],
|
||||||
|
});
|
||||||
|
const formData = ref<any>({});
|
||||||
|
|
||||||
|
const types = ref([
|
||||||
|
{ label: "防汛", value: 1 },
|
||||||
|
{ label: "火灾", value: 2 },
|
||||||
|
{ label: "治安", value: 3 },
|
||||||
|
{ label: "安全生产", value: 4 },
|
||||||
|
]);
|
||||||
|
|
||||||
|
//保存并退出
|
||||||
|
const handleSubmit = () => {
|
||||||
|
formRef.value?.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
formData.value.sortId = formData.value.sortId || 1;
|
||||||
|
formData.value.industryId = props.id;
|
||||||
|
formData.value.delState = formData.value.delState || 1;
|
||||||
|
inListAdd(formData.value).then((res: any) => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
ElMessage.success({
|
||||||
|
message: "操作成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
onclone();
|
||||||
|
} else {
|
||||||
|
ElMessage.error({
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
//关闭弹窗
|
||||||
|
const onclone = () => {
|
||||||
|
formRef.value?.clearValidate();
|
||||||
|
formData.value = {};
|
||||||
|
emits("close");
|
||||||
|
};
|
||||||
|
onMounted(() => {});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.form,
|
||||||
|
(val: any) => {
|
||||||
|
titleName.value = val.id ? "编辑" : "新增";
|
||||||
|
formData.value = JSON.parse(JSON.stringify(val));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
<style scoped></style>
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
|
<!-- 应急值守 -->
|
||||||
<template>
|
<template>
|
||||||
<div class="percentage-content">
|
<div class="percentage-content">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div style="margin-bottom: 16px" class="h-layout space-between h-center">
|
<div style="margin-bottom: 16px" class="h-layout space-between h-center">
|
||||||
<div>
|
<div>
|
||||||
<div class="h-layout">
|
<div class="h-layout h-center">
|
||||||
<div
|
<div
|
||||||
class="tool-item"
|
class="tool-item"
|
||||||
@click="(dialogVisible = true), (form = {}), (readonly = false)"
|
@click="(dialogVisible = true), (form = {}), (readonly = false)"
|
||||||
|
|
@ -11,26 +12,39 @@
|
||||||
<svg-icon name="add" class="icon" />
|
<svg-icon name="add" class="icon" />
|
||||||
<span>新增</span>
|
<span>新增</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="tool-item" @click="getCompanyList">
|
<div class="tool-item" @click="getList">
|
||||||
<svg-icon name="refurbish" class="icon" />
|
<svg-icon name="refurbish" class="icon" />
|
||||||
<span>刷新</span>
|
<span>刷新</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="tool-item" @click="exportCompanys">
|
<div class="label-select filter-tab">
|
||||||
<svg-icon name="delete" class="icon" />
|
<label>点位类型</label>
|
||||||
<span>删除</span>
|
<el-select
|
||||||
</div> -->
|
v-model="type"
|
||||||
|
@change="getList"
|
||||||
|
clearable
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in types"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 30%">
|
<div style="width: 30%">
|
||||||
<div>
|
<div>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="search"
|
v-model="search"
|
||||||
@keydown.enter.native="getCompanyList"
|
@keydown.enter.native="getList"
|
||||||
placeholder="请输入关键字"
|
placeholder="请输入关键字"
|
||||||
class="search-input"
|
class="search-input"
|
||||||
>
|
>
|
||||||
<template #append>
|
<template #append>
|
||||||
<span @click="getCompanyList" class="search-bottom">
|
<span @click="getList" class="search-bottom">
|
||||||
<svg-icon name="search" class="icon_class" />
|
<svg-icon name="search" class="icon_class" />
|
||||||
<span>搜索</span>
|
<span>搜索</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -54,40 +68,22 @@
|
||||||
width="60"
|
width="60"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="houseName"
|
prop="name"
|
||||||
:resizable="true"
|
:resizable="true"
|
||||||
align="center"
|
align="center"
|
||||||
label="仓库名称"
|
label="点位名称"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="equname"
|
prop="address"
|
||||||
:resizable="true"
|
:resizable="true"
|
||||||
align="center"
|
align="center"
|
||||||
label="装备名称"
|
label="点位类型"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="equnum"
|
prop="phone"
|
||||||
:resizable="true"
|
:resizable="true"
|
||||||
align="center"
|
align="center"
|
||||||
label="数量"
|
label="详细地址"
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="equtype"
|
|
||||||
:resizable="true"
|
|
||||||
align="center"
|
|
||||||
label="装备类型"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="storageplace"
|
|
||||||
:resizable="true"
|
|
||||||
align="center"
|
|
||||||
label="存放场所"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="industry"
|
|
||||||
:resizable="true"
|
|
||||||
align="center"
|
|
||||||
label="行业领域"
|
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
@ -125,8 +121,8 @@
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<el-pagination
|
<el-pagination
|
||||||
class="pagination"
|
class="pagination"
|
||||||
@size-change="getCompanyList"
|
@size-change="getList"
|
||||||
@current-change="getCompanyList"
|
@current-change="getList"
|
||||||
v-model:current-page.sync="currentPage"
|
v-model:current-page.sync="currentPage"
|
||||||
:page-sizes="[10, 15, 20, 30]"
|
:page-sizes="[10, 15, 20, 30]"
|
||||||
v-model:page-size.sync="pageSize"
|
v-model:page-size.sync="pageSize"
|
||||||
|
|
@ -136,36 +132,32 @@
|
||||||
>
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<AddWarehouse
|
<AddEdit :visible="dialogVisible" :form="form" @close="onclone" />
|
||||||
:visible="dialogVisible"
|
|
||||||
:form="form"
|
|
||||||
:readonly="readonly"
|
|
||||||
@close="onclone"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang='ts' setup>
|
<script lang='ts' setup>
|
||||||
import { onMounted, reactive, ref } from "vue";
|
import { onMounted, reactive, ref } from "vue";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import { getOthequipmentPage, delOthequipment } from "@/api/Othteam";
|
import { getOthequipmentPage, delOthequipment } from "@/api/Othteam";
|
||||||
import AddWarehouse from "../equip/inventory/AddWarehouse.vue";
|
import AddEdit from "./dialog/add-edit.vue";
|
||||||
|
|
||||||
import useUserStore from "@/store/modules/user";
|
import useUserStore from "@/store/modules/user";
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const user = ref(JSON.parse(userStore.userInfo));
|
const user = ref(JSON.parse(userStore.userInfo));
|
||||||
const userId = ref(user.value.userId);
|
const userId = ref(user.value.userId);
|
||||||
|
|
||||||
const search = ref([]);
|
const types = ref([
|
||||||
const tableData = ref([
|
{ label: "防汛", value: 1 },
|
||||||
{
|
{ label: "火灾", value: 2 },
|
||||||
houseName: "鲜水镇",
|
{ label: "治安", value: 3 },
|
||||||
equname: "消防车",
|
{ label: "安全生产", value: 4 },
|
||||||
equnum: "3辆",
|
|
||||||
equtype: "消防器材",
|
|
||||||
industry: "消防",
|
|
||||||
storageplace: "-",
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
|
const type = ref();
|
||||||
|
|
||||||
|
const search = ref([]);
|
||||||
|
const tableData = ref([]);
|
||||||
const currentPage = ref(1);
|
const currentPage = ref(1);
|
||||||
const pageSize = ref(10);
|
const pageSize = ref(10);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
|
|
@ -177,7 +169,7 @@ const readonly = ref(false);
|
||||||
const handleSelectionChange = () => {};
|
const handleSelectionChange = () => {};
|
||||||
//获取列表
|
//获取列表
|
||||||
const tableDataloading = ref(false);
|
const tableDataloading = ref(false);
|
||||||
const getCompanyList = () => {
|
const getList = () => {
|
||||||
tableDataloading.value = true;
|
tableDataloading.value = true;
|
||||||
let params = {
|
let params = {
|
||||||
equname: search.value,
|
equname: search.value,
|
||||||
|
|
@ -211,7 +203,7 @@ const deletelist = (id) => {
|
||||||
type: "error",
|
type: "error",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
getCompanyList();
|
getList();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -220,13 +212,14 @@ const onclone = () => {
|
||||||
dialogVisible.value = false;
|
dialogVisible.value = false;
|
||||||
form.value = {};
|
form.value = {};
|
||||||
};
|
};
|
||||||
onMounted(() => {});
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.content {
|
.content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// flex: auto;
|
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 0.26042vw;
|
border-radius: 0.26042vw;
|
||||||
box-shadow: 0 0 0.41667vw 0 rgba(8, 33, 85, 0.1);
|
box-shadow: 0 0 0.41667vw 0 rgba(8, 33, 85, 0.1);
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<svg-icon name="add" class="icon" />
|
<svg-icon name="add" class="icon" />
|
||||||
<span>新增</span>
|
<span>新增</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="tool-item" @click="getCompanyList">
|
<div class="tool-item" @click="getList">
|
||||||
<svg-icon name="refurbish" class="icon" />
|
<svg-icon name="refurbish" class="icon" />
|
||||||
<span>刷新</span>
|
<span>刷新</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -22,12 +22,12 @@
|
||||||
<div>
|
<div>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="search"
|
v-model="search"
|
||||||
@keydown.enter.native="getCompanyList"
|
@keydown.enter.native="getList"
|
||||||
placeholder="请输入关键字"
|
placeholder="请输入关键字"
|
||||||
class="search-input"
|
class="search-input"
|
||||||
>
|
>
|
||||||
<template #append>
|
<template #append>
|
||||||
<span @click="getCompanyList" class="search-bottom">
|
<span @click="getList" class="search-bottom">
|
||||||
<svg-icon name="search" class="icon_class" />
|
<svg-icon name="search" class="icon_class" />
|
||||||
<span>搜索</span>
|
<span>搜索</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -110,8 +110,8 @@
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<el-pagination
|
<el-pagination
|
||||||
class="pagination"
|
class="pagination"
|
||||||
@size-change="getCompanyList"
|
@size-change="getList"
|
||||||
@current-change="getCompanyList"
|
@current-change="getList"
|
||||||
v-model:current-page.sync="currentPage"
|
v-model:current-page.sync="currentPage"
|
||||||
:page-sizes="[10, 15, 20, 30]"
|
:page-sizes="[10, 15, 20, 30]"
|
||||||
v-model:page-size.sync="pageSize"
|
v-model:page-size.sync="pageSize"
|
||||||
|
|
@ -137,20 +137,7 @@ const user = ref(JSON.parse(userStore.userInfo));
|
||||||
const userId = ref(user.value.userId);
|
const userId = ref(user.value.userId);
|
||||||
|
|
||||||
const search = ref([]);
|
const search = ref([]);
|
||||||
const tableData = ref([
|
const tableData = ref([]);
|
||||||
{
|
|
||||||
name: "张三",
|
|
||||||
phone: "18628725626",
|
|
||||||
time: "2023-12-15",
|
|
||||||
address: "xxxxxx地址",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "王五",
|
|
||||||
phone: "18628725626",
|
|
||||||
time: "2023-12-15",
|
|
||||||
address: "xxxxxx地址",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
const currentPage = ref(1);
|
const currentPage = ref(1);
|
||||||
const pageSize = ref(10);
|
const pageSize = ref(10);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
|
|
@ -162,7 +149,7 @@ const readonly = ref(false);
|
||||||
const handleSelectionChange = () => {};
|
const handleSelectionChange = () => {};
|
||||||
//获取列表
|
//获取列表
|
||||||
const tableDataloading = ref(false);
|
const tableDataloading = ref(false);
|
||||||
const getCompanyList = () => {
|
const getList = () => {
|
||||||
tableDataloading.value = true;
|
tableDataloading.value = true;
|
||||||
let params = {
|
let params = {
|
||||||
equname: search.value,
|
equname: search.value,
|
||||||
|
|
@ -196,7 +183,7 @@ const deletelist = (id) => {
|
||||||
type: "error",
|
type: "error",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
getCompanyList();
|
getList();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -205,7 +192,9 @@ const onclone = () => {
|
||||||
dialogVisible.value = false;
|
dialogVisible.value = false;
|
||||||
form.value = {};
|
form.value = {};
|
||||||
};
|
};
|
||||||
onMounted(() => {});
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
|
|
@ -1,184 +0,0 @@
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<!-- 表格1 -->
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-table
|
|
||||||
ref="loading"
|
|
||||||
:data="tableData"
|
|
||||||
header-row-class-name="el-one-header"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
border
|
|
||||||
>
|
|
||||||
<el-table-column
|
|
||||||
type="selection"
|
|
||||||
align="center"
|
|
||||||
width="55"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="houseName"
|
|
||||||
:resizable="true"
|
|
||||||
align="center"
|
|
||||||
label="仓库名称"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="equname"
|
|
||||||
:resizable="true"
|
|
||||||
align="center"
|
|
||||||
label="装备名称"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="equnum"
|
|
||||||
:resizable="true"
|
|
||||||
align="center"
|
|
||||||
label="数量"
|
|
||||||
width="70"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="equtype"
|
|
||||||
:resizable="true"
|
|
||||||
align="center"
|
|
||||||
label="装备类型"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="storageplace"
|
|
||||||
:resizable="true"
|
|
||||||
align="center"
|
|
||||||
label="存放场所"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="industry"
|
|
||||||
:resizable="true"
|
|
||||||
align="center"
|
|
||||||
label="行业领域"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
:resizable="true"
|
|
||||||
width="255"
|
|
||||||
align="center"
|
|
||||||
label="操作"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span
|
|
||||||
class="operate"
|
|
||||||
@click="(row = scope.row), (addDialogVisible = true),(readonly=true)"
|
|
||||||
>
|
|
||||||
<svg-icon icon-class="detail"></svg-icon>
|
|
||||||
<span class="detail">详情</span>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class="operate" @click="del(scope.row)">
|
|
||||||
<svg-icon class-name="icon-style" icon-class="delete" />
|
|
||||||
<span class="detail">删除</span>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<!-- 分页 -->
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-pagination
|
|
||||||
class="pagination"
|
|
||||||
@size-change="refresh"
|
|
||||||
@current-change="refresh"
|
|
||||||
:current-page.sync="currentPage"
|
|
||||||
:page-sizes="[10, 15, 20, 30]"
|
|
||||||
:page-size.sync="pageSize"
|
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
|
||||||
:total="total"
|
|
||||||
background
|
|
||||||
>
|
|
||||||
</el-pagination>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<!-- 装备弹窗 -->
|
|
||||||
<add-warehouse
|
|
||||||
:form="row"
|
|
||||||
:isMaterial="false"
|
|
||||||
:readonly="readonly"
|
|
||||||
:visible="addDialogVisible"
|
|
||||||
@close="(addDialogVisible = false), (read = false)"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { getEquipmentById, deleteEquip } from "@/api/emergency";
|
|
||||||
import AddWarehouse from "./AddWarehouse.vue";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
AddWarehouse,
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
addDialogVisible: false,
|
|
||||||
row: {},
|
|
||||||
readonly:false,
|
|
||||||
// 分页
|
|
||||||
currentPage: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
tableData: [],
|
|
||||||
total: 0,
|
|
||||||
selected: "",
|
|
||||||
activeName: "first",
|
|
||||||
command: "",
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 库存列表
|
|
||||||
getInventory(condition) {
|
|
||||||
getEquipmentById(
|
|
||||||
(this.houseId = this.$route.params.id),
|
|
||||||
this.currentPage,
|
|
||||||
this.pageSize,
|
|
||||||
condition
|
|
||||||
).then((res) => {
|
|
||||||
this.tableData = res.data.rows;
|
|
||||||
this.total = res.data.total;
|
|
||||||
this.$loadingT(null, this.instance, "instance");
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//选中
|
|
||||||
handleSelectionChange(val) {
|
|
||||||
this.tableCheckBoxs = [];
|
|
||||||
for (let index = 0; index < val.length; index++) {
|
|
||||||
const element = val[index];
|
|
||||||
this.tableCheckBoxs.push(element.listdetailid);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//刷新
|
|
||||||
refresh() {
|
|
||||||
const loading = this.$refs["loading"];
|
|
||||||
if (!this.instance) this.instance = this.$loadingT(loading);
|
|
||||||
else return;
|
|
||||||
this.getInventory();
|
|
||||||
},
|
|
||||||
// 删除
|
|
||||||
del(row) {
|
|
||||||
this.$confirm(`确定删除吗?`, "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning",
|
|
||||||
}).then(() => {
|
|
||||||
deleteEquip(row.othequipmentid).then((res) => {
|
|
||||||
if (res.code == 1) {
|
|
||||||
this.$message({
|
|
||||||
message: "删除成功",
|
|
||||||
type: "success",
|
|
||||||
});
|
|
||||||
this.getInventory();
|
|
||||||
} else {
|
|
||||||
this.$message.error(res.message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
created() {
|
|
||||||
this.getInventory();
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
422
src/views/emergency/house/details.vue
Normal file
422
src/views/emergency/house/details.vue
Normal file
|
|
@ -0,0 +1,422 @@
|
||||||
|
<template>
|
||||||
|
<div class="percentage-content">
|
||||||
|
<div class="content">
|
||||||
|
<div>
|
||||||
|
<TitleC titleName="仓库信息">
|
||||||
|
<template v-slot:option>
|
||||||
|
<div class="h-layout option">
|
||||||
|
<div class="h-layout h-titlec" @click="getDetail">
|
||||||
|
<svg-icon name="refurbish" class="icon" />
|
||||||
|
<span class="span">刷新</span>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="h-layout h-titlec"
|
||||||
|
@click="resetPwd"
|
||||||
|
v-if="formEnable"
|
||||||
|
>
|
||||||
|
<svg-icon name="save-yellow" class="icon" />
|
||||||
|
<span class="span">编辑</span>
|
||||||
|
</div>
|
||||||
|
<div v-else class="h-layout h-titlec" @click="handleSumit(1)">
|
||||||
|
<svg-icon name="save-yellow" class="icon" />
|
||||||
|
<span class="span">保存</span>
|
||||||
|
</div>
|
||||||
|
<div class="h-layout h-titlec" @click="clone">
|
||||||
|
<svg-icon name="close" class="icon" />
|
||||||
|
<span class="span">关闭</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</TitleC>
|
||||||
|
<div class="detailForm-content">
|
||||||
|
<el-form
|
||||||
|
ref="formRef"
|
||||||
|
label-position="right"
|
||||||
|
label-width="150px"
|
||||||
|
:rules="ruleForm"
|
||||||
|
:model="detailForm"
|
||||||
|
>
|
||||||
|
<el-form-item label="仓库名称:" prop="houseName">
|
||||||
|
<el-input
|
||||||
|
:readonly="formEnable"
|
||||||
|
placeholder="请输入仓库名称"
|
||||||
|
v-model="detailForm.houseName"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="管理员:" prop="name">
|
||||||
|
<el-input
|
||||||
|
:readonly="formEnable"
|
||||||
|
placeholder="请输入管理员"
|
||||||
|
v-model="detailForm.name"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="联系方式:" prop="telephone">
|
||||||
|
<el-input
|
||||||
|
:readonly="formEnable"
|
||||||
|
placeholder="请输入联系电话"
|
||||||
|
v-model="detailForm.telephone"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属地区:" prop="orgCode">
|
||||||
|
<el-cascader
|
||||||
|
v-model="detailForm.orgCode"
|
||||||
|
placeholder="请选择所属地区"
|
||||||
|
@change="handleAreaChange"
|
||||||
|
:options="orgList"
|
||||||
|
:props="{
|
||||||
|
checkStrictly: true,
|
||||||
|
label: 'orgname',
|
||||||
|
value: 'orgcode',
|
||||||
|
}"
|
||||||
|
clearable
|
||||||
|
></el-cascader>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="经度:" prop="lon">
|
||||||
|
<el-input
|
||||||
|
:readonly="formEnable"
|
||||||
|
placeholder="请输入经度"
|
||||||
|
v-model="detailForm.lon"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="纬度:" prop="lat">
|
||||||
|
<el-input
|
||||||
|
:readonly="formEnable"
|
||||||
|
placeholder="请输入维度"
|
||||||
|
v-model="detailForm.lat"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="所属单位:"
|
||||||
|
prop="possession"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
:readonly="formEnable"
|
||||||
|
placeholder="请输入所属单位"
|
||||||
|
v-model="detailForm.possession"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="地址:" prop="address" style="width: 100%">
|
||||||
|
<el-input
|
||||||
|
:readonly="formEnable"
|
||||||
|
placeholder="请输入详细地址"
|
||||||
|
v-model="detailForm.address"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<TitleC titleName="仓库物资">
|
||||||
|
<template v-slot:option>
|
||||||
|
<div class="h-layout option">
|
||||||
|
<div class="h-layout h-titlec" @click="getList">
|
||||||
|
<svg-icon name="refurbish" class="icon" />
|
||||||
|
<span class="span">刷新</span>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="h-layout h-titlec"
|
||||||
|
@click="(dialogVisible = true), (form = {}), (readonly = false)"
|
||||||
|
>
|
||||||
|
<svg-icon name="add" class="icon" />
|
||||||
|
<span class="span">新建</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</TitleC>
|
||||||
|
<el-table
|
||||||
|
ref="loading"
|
||||||
|
v-loading="tableDataloading"
|
||||||
|
:data="tableData"
|
||||||
|
header-row-class-name="el-one-header"
|
||||||
|
border
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
type="index"
|
||||||
|
align="center"
|
||||||
|
label="序列"
|
||||||
|
width="60"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="equname"
|
||||||
|
:resizable="true"
|
||||||
|
align="center"
|
||||||
|
label="装备名称"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="equnum"
|
||||||
|
:resizable="true"
|
||||||
|
align="center"
|
||||||
|
label="数量"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="equtype"
|
||||||
|
:resizable="true"
|
||||||
|
align="center"
|
||||||
|
label="装备类型"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="storageplace"
|
||||||
|
:resizable="true"
|
||||||
|
align="center"
|
||||||
|
label="存放场所"
|
||||||
|
></el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
:resizable="true"
|
||||||
|
align="center"
|
||||||
|
width="260"
|
||||||
|
label="操作"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<span
|
||||||
|
class="operate"
|
||||||
|
@click="
|
||||||
|
(dialogVisible = true), (form = scope.row), (readonly = false)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<svg-icon name="edit" class="icon"></svg-icon>
|
||||||
|
<span class="edit">编辑</span>
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="operate"
|
||||||
|
@click="
|
||||||
|
(dialogVisible = true), (form = scope.row), (readonly = true)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<svg-icon name="detail" class="icon"></svg-icon>
|
||||||
|
<span class="detail">详情</span>
|
||||||
|
</span>
|
||||||
|
<span class="operate" @click="delEquip(scope.row.othequipmentid)">
|
||||||
|
<svg-icon name="delete" class="icon"></svg-icon>
|
||||||
|
<span class="func">删除</span>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<el-pagination
|
||||||
|
class="pagination"
|
||||||
|
@size-change="getList"
|
||||||
|
@current-change="getList"
|
||||||
|
v-model:current-page.sync="currentPage"
|
||||||
|
:page-sizes="[10, 15, 20, 30]"
|
||||||
|
v-model:page-size.sync="pageSize"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="total"
|
||||||
|
background
|
||||||
|
>
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 物资弹窗 -->
|
||||||
|
<AddEquDialog
|
||||||
|
:visible="dialogVisible"
|
||||||
|
:form="form"
|
||||||
|
:readonly="readonly"
|
||||||
|
:id="houseId"
|
||||||
|
@close="onclone"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script lang='ts' setup>
|
||||||
|
import { onMounted, reactive, ref } from "vue";
|
||||||
|
import { ElMessage, FormInstance, FormRules, ElMessageBox } from "element-plus";
|
||||||
|
import AddEquDialog from "./dialog/add-equip-dialog.vue";
|
||||||
|
import { areaTree } from "@/api/account";
|
||||||
|
import {
|
||||||
|
getHouseDetail,
|
||||||
|
getOthequipmentPage,
|
||||||
|
saveOtheWareHouse,
|
||||||
|
delOthequipment,
|
||||||
|
} from "@/api/Othteam";
|
||||||
|
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
import useUserStore from "@/store/modules/user";
|
||||||
|
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const user = ref(JSON.parse(userStore.userInfo));
|
||||||
|
const userId = ref(user.value.userId);
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
const detailForm = ref<any>({});
|
||||||
|
|
||||||
|
const formRef = ref<FormInstance>();
|
||||||
|
const ruleForm = reactive<FormRules>({
|
||||||
|
houseName: [{ required: true, message: "请输入仓库名称", trigger: "blur" }],
|
||||||
|
telephone: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入仓库管理员联系方式",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
orgCode: [
|
||||||
|
{ required: true, message: "请选择仓库所属地区", trigger: "change" },
|
||||||
|
],
|
||||||
|
possession: [
|
||||||
|
{ required: true, message: "请输入仓库所属单位", trigger: "blur" },
|
||||||
|
],
|
||||||
|
address: [{ required: true, message: "请输入仓库", trigger: "blur" }],
|
||||||
|
name: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入仓库管理员",
|
||||||
|
trigger: "change",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
const formEnable = ref(true);
|
||||||
|
const readonly = ref(false);
|
||||||
|
const tableDataloading = ref(false);
|
||||||
|
const tableData = ref([]);
|
||||||
|
|
||||||
|
const houseId = ref();
|
||||||
|
const form = ref({});
|
||||||
|
const currentPage = ref(1);
|
||||||
|
const pageSize = ref(10);
|
||||||
|
const total = ref(0);
|
||||||
|
const dialogVisible = ref(false);
|
||||||
|
|
||||||
|
//编辑
|
||||||
|
const resetPwd = () => {
|
||||||
|
formEnable.value = false;
|
||||||
|
};
|
||||||
|
//保存
|
||||||
|
const handleSumit = () => {
|
||||||
|
formRef.value?.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
detailForm.value.userId = userId.value;
|
||||||
|
saveOtheWareHouse(detailForm.value).then((res: any) => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
ElMessage.success({
|
||||||
|
message: "保存成功",
|
||||||
|
});
|
||||||
|
formEnable.value = false;
|
||||||
|
} else
|
||||||
|
ElMessage.error({
|
||||||
|
message: res.message,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//关闭
|
||||||
|
const clone = () => {
|
||||||
|
router.go(-1);
|
||||||
|
};
|
||||||
|
//获取详情
|
||||||
|
const getDetail = () => {
|
||||||
|
getHouseDetail(route.query.id).then((res: any) => {
|
||||||
|
detailForm.value = res.data;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
//获取地区
|
||||||
|
const orgList = ref([]);
|
||||||
|
const getAreaTree = () => {
|
||||||
|
areaTree(userId.value).then((res: any) => {
|
||||||
|
orgList.value = res.data;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleAreaChange = (val) => {
|
||||||
|
detailForm.value.orgCode =
|
||||||
|
detailForm.value.orgCode[detailForm.value.orgCode.length - 1];
|
||||||
|
};
|
||||||
|
|
||||||
|
//物资分页
|
||||||
|
const getList = () => {
|
||||||
|
tableDataloading.value = true;
|
||||||
|
let params = {
|
||||||
|
limit: pageSize.value,
|
||||||
|
page: currentPage.value,
|
||||||
|
houseId: houseId.value,
|
||||||
|
};
|
||||||
|
getOthequipmentPage(params).then((res: any) => {
|
||||||
|
tableData.value = res.data.list;
|
||||||
|
total.value = res.data.total;
|
||||||
|
tableDataloading.value = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
*删除
|
||||||
|
*/
|
||||||
|
const delEquip = (id) => {
|
||||||
|
ElMessageBox.confirm("是否确认删除?", "提示", {
|
||||||
|
confirmButtonText: "是",
|
||||||
|
cancelButtonText: "否",
|
||||||
|
type: "warning",
|
||||||
|
}).then(() => {
|
||||||
|
delOthequipment(id, userId.value).then((res: any) => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
ElMessage.success({
|
||||||
|
message: "删除成功",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
ElMessage.error({
|
||||||
|
message: res.message,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
//刷新
|
||||||
|
const refurbish = () => {
|
||||||
|
getDetail();
|
||||||
|
};
|
||||||
|
|
||||||
|
//关闭弹窗
|
||||||
|
const onclone = () => {
|
||||||
|
dialogVisible.value = false;
|
||||||
|
form.value = {};
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
//编辑成员
|
||||||
|
const editMember = (val) => {
|
||||||
|
dialogVisible.value = true;
|
||||||
|
form.value = val;
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
houseId.value = route.query.id || "";
|
||||||
|
refurbish();
|
||||||
|
|
||||||
|
getAreaTree();
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.content {
|
||||||
|
width: 100%;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0.26042vw;
|
||||||
|
box-shadow: 0 0 0.41667vw 0 rgba(8, 33, 85, 0.1);
|
||||||
|
height: 100%;
|
||||||
|
padding: 0.83333vw;
|
||||||
|
overflow-y: scroll;
|
||||||
|
overflow-x: hidden !important;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-o-box-sizing: border-box;
|
||||||
|
-ms-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.detailForm-content {
|
||||||
|
margin-right: 30px;
|
||||||
|
}
|
||||||
|
:deep(.el-form) {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
:deep(.el-form-item) {
|
||||||
|
width: 45%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -3,7 +3,13 @@
|
||||||
<BaseDialog
|
<BaseDialog
|
||||||
:dialogVisible="props.visible"
|
:dialogVisible="props.visible"
|
||||||
@close="onclone"
|
@close="onclone"
|
||||||
:titleName="props.form.opInstructionId ? '编辑应急物资' : '新增应急物资'"
|
:titleName="
|
||||||
|
props.readonly
|
||||||
|
? '物资详情'
|
||||||
|
: props.form.othequipmentid
|
||||||
|
? '编辑应急物资'
|
||||||
|
: '新增应急物资'
|
||||||
|
"
|
||||||
width="50%"
|
width="50%"
|
||||||
@onSubmit="handleSubmit"
|
@onSubmit="handleSubmit"
|
||||||
:footerclosed="true"
|
:footerclosed="true"
|
||||||
|
|
@ -16,13 +22,13 @@
|
||||||
label-position="right"
|
label-position="right"
|
||||||
label-width="150px"
|
label-width="150px"
|
||||||
:rules="ruleForm"
|
:rules="ruleForm"
|
||||||
:model="addPostFactorForm"
|
:model="addForm"
|
||||||
>
|
>
|
||||||
<el-form-item label="仓库名称:" prop="houseId">
|
<el-form-item label="仓库名称:" prop="houseName">
|
||||||
<el-input
|
<el-input
|
||||||
:readonly="props.readonly"
|
:readonly="props.readonly"
|
||||||
placeholder="请输入仓库名称"
|
placeholder="请输入仓库名称"
|
||||||
v-model="addPostFactorForm.houseId"
|
v-model="addForm.houseName"
|
||||||
>
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -30,7 +36,7 @@
|
||||||
<el-input
|
<el-input
|
||||||
:readonly="props.readonly"
|
:readonly="props.readonly"
|
||||||
placeholder="请输入装备名称"
|
placeholder="请输入装备名称"
|
||||||
v-model="addPostFactorForm.equname"
|
v-model="addForm.equname"
|
||||||
>
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -40,14 +46,14 @@
|
||||||
:min="0"
|
:min="0"
|
||||||
:step="1"
|
:step="1"
|
||||||
step-strictly
|
step-strictly
|
||||||
v-model="addPostFactorForm.equnum"
|
v-model="addForm.equnum"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="存放场所:" prop="storageplace">
|
<el-form-item label="存放场所:" prop="storageplace">
|
||||||
<el-input
|
<el-input
|
||||||
:readonly="props.readonly"
|
:readonly="props.readonly"
|
||||||
placeholder="请输入存放场所"
|
placeholder="请输入存放场所"
|
||||||
v-model="addPostFactorForm.storageplace"
|
v-model="addForm.storageplace"
|
||||||
>
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -55,7 +61,7 @@
|
||||||
<el-input
|
<el-input
|
||||||
:readonly="props.readonly"
|
:readonly="props.readonly"
|
||||||
placeholder="请输入联系电话"
|
placeholder="请输入联系电话"
|
||||||
v-model="addPostFactorForm.equphone"
|
v-model="addForm.equphone"
|
||||||
>
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -63,7 +69,7 @@
|
||||||
<el-input
|
<el-input
|
||||||
:readonly="props.readonly"
|
:readonly="props.readonly"
|
||||||
placeholder="请输入所属单位"
|
placeholder="请输入所属单位"
|
||||||
v-model="addPostFactorForm.possession"
|
v-model="addForm.possession"
|
||||||
>
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -71,7 +77,7 @@
|
||||||
<el-input
|
<el-input
|
||||||
:readonly="props.readonly"
|
:readonly="props.readonly"
|
||||||
placeholder="请输入行业领域"
|
placeholder="请输入行业领域"
|
||||||
v-model="addPostFactorForm.industry"
|
v-model="addForm.industry"
|
||||||
>
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -79,7 +85,7 @@
|
||||||
<el-select
|
<el-select
|
||||||
:disabled="props.readonly"
|
:disabled="props.readonly"
|
||||||
placeholder="请选择类型"
|
placeholder="请选择类型"
|
||||||
v-model="addPostFactorForm.equtype"
|
v-model="addForm.equtype"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in equtypes"
|
v-for="(item, index) in equtypes"
|
||||||
|
|
@ -93,7 +99,7 @@
|
||||||
<el-input
|
<el-input
|
||||||
:readonly="props.readonly"
|
:readonly="props.readonly"
|
||||||
placeholder="请输入主要功能"
|
placeholder="请输入主要功能"
|
||||||
v-model="addPostFactorForm.equfunction"
|
v-model="addForm.equfunction"
|
||||||
>
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -111,9 +117,15 @@
|
||||||
:disabled="props.readonly"
|
:disabled="props.readonly"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
|
<<<<<<< HEAD:src/views/emergency/equip/inventory/AddWarehouse.vue
|
||||||
v-if="addPostFactorForm.equipPhoto"
|
v-if="addPostFactorForm.equipPhoto"
|
||||||
:src="addPostFactorForm.equipPhoto"
|
:src="addPostFactorForm.equipPhoto"
|
||||||
style="width: 100%; height: 100%;"
|
style="width: 100%; height: 100%;"
|
||||||
|
=======
|
||||||
|
v-if="addForm.equipPhoto"
|
||||||
|
:src="baseImgUrl + addForm.equipPhoto"
|
||||||
|
style="width: 100%; height: 100%"
|
||||||
|
>>>>>>> e36af856493c21fdd846c5881a8f69d73962aad5:src/views/emergency/house/dialog/add-equip-dialog.vue
|
||||||
/>
|
/>
|
||||||
<el-icon v-else class="avatar-uploader-icon">
|
<el-icon v-else class="avatar-uploader-icon">
|
||||||
<Plus />
|
<Plus />
|
||||||
|
|
@ -132,6 +144,8 @@ import { getYears, getUUID, FileType } from "@/utils/common";
|
||||||
import { saveOthequipment, getOtheWareHouseList } from "@/api/Othteam";
|
import { saveOthequipment, getOtheWareHouseList } from "@/api/Othteam";
|
||||||
import { uploadFile, getFile, delFile } from "@/api/file";
|
import { uploadFile, getFile, delFile } from "@/api/file";
|
||||||
|
|
||||||
|
const baseImgUrl = ref(import.meta.env.VITE_UPLOAD_URL);
|
||||||
|
|
||||||
const formRef = ref<FormInstance>();
|
const formRef = ref<FormInstance>();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const user = ref(JSON.parse(userStore.userInfo));
|
const user = ref(JSON.parse(userStore.userInfo));
|
||||||
|
|
@ -220,22 +234,28 @@ const props = defineProps({
|
||||||
id: String,
|
id: String,
|
||||||
});
|
});
|
||||||
const listperformid = ref(props.id);
|
const listperformid = ref(props.id);
|
||||||
const addPostFactorForm = ref(<any>{});
|
const addForm = ref(<any>{});
|
||||||
const emits = defineEmits(["close", "onSubmit"]);
|
const emits = defineEmits(["close", "onSubmit"]);
|
||||||
//保存并退出
|
//保存并退出
|
||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
formRef.value?.validate((valid) => {
|
formRef.value?.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
addPostFactorForm.value.othequipmentid =
|
addForm.value.othequipmentid = addForm.value.othequipmentid || uuid.value;
|
||||||
addPostFactorForm.value.othequipmentid || uuid.value;
|
addForm.value.userId = userId.value;
|
||||||
addPostFactorForm.value.userId = userId.value;
|
addForm.value.houseId = props.id;
|
||||||
saveOthequipment(addPostFactorForm.value).then((res: any) => {
|
|
||||||
|
saveOthequipment(addForm.value).then((res: any) => {
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
ElMessage.success({
|
ElMessage.success({
|
||||||
message: "保存成功",
|
message: "保存成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
});
|
});
|
||||||
onclone();
|
onclone();
|
||||||
|
} else {
|
||||||
|
ElMessage.error({
|
||||||
|
message: res.message,
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -253,7 +273,7 @@ const handleUpload = (res) => {
|
||||||
let file = res.file;
|
let file = res.file;
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("file", file);
|
formData.append("file", file);
|
||||||
let uuids = addPostFactorForm.value.othequipmentid || uuid.value;
|
let uuids = addForm.value.othequipmentid || uuid.value;
|
||||||
uploadFile(userId.value, uuids, FileType.equipment, formData).then(
|
uploadFile(userId.value, uuids, FileType.equipment, formData).then(
|
||||||
(res: any) => {
|
(res: any) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
|
|
@ -268,38 +288,30 @@ const handleUpload = (res) => {
|
||||||
};
|
};
|
||||||
//图片查询
|
//图片查询
|
||||||
const getFiles = () => {
|
const getFiles = () => {
|
||||||
getFile(
|
getFile(addForm.value.othequipmentid || uuid.value, FileType.equipment).then(
|
||||||
addPostFactorForm.value.othequipmentid || uuid.value,
|
(res: any) => {
|
||||||
FileType.equipment
|
|
||||||
).then((res: any) => {
|
|
||||||
if (res.data.length > 0) {
|
if (res.data.length > 0) {
|
||||||
const path = res.data[res.data.length - 1];
|
const path = res.data[res.data.length - 1];
|
||||||
addPostFactorForm.value.equipPhoto =
|
addForm.value.equipPhoto =
|
||||||
import.meta.env.VITE_UPLOAD_IMG_URL + path.filepath;
|
import.meta.env.VITE_UPLOAD_URL + path.filepath;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
//关闭弹窗
|
//关闭弹窗
|
||||||
const onclone = () => {
|
const onclone = () => {
|
||||||
emits("close");
|
emits("close");
|
||||||
};
|
};
|
||||||
//获取仓库
|
|
||||||
const houseNameList = ref([]);
|
onMounted(() => {});
|
||||||
const OtheWareHouseList = () => {
|
|
||||||
getOtheWareHouseList({}).then((res: any) => {
|
|
||||||
houseNameList.value = res.data;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
onMounted(() => {
|
|
||||||
OtheWareHouseList();
|
|
||||||
});
|
|
||||||
watch(
|
watch(
|
||||||
() => props.form,
|
() => props.form,
|
||||||
(val) => {
|
(val) => {
|
||||||
uuid.value = getUUID();
|
uuid.value = getUUID();
|
||||||
if (val) {
|
if (val) {
|
||||||
if (!props.visible) return;
|
if (!props.visible) return;
|
||||||
addPostFactorForm.value = val;
|
addForm.value = val;
|
||||||
getFiles();
|
getFiles();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3,12 +3,12 @@
|
||||||
<BaseDialog
|
<BaseDialog
|
||||||
:dialogVisible="props.visible"
|
:dialogVisible="props.visible"
|
||||||
@close="onclone"
|
@close="onclone"
|
||||||
:titleName="props.form.opInstructionId ? '编辑应急仓库' : '新增应急仓库'"
|
:titleName="props.form.houseId ? '编辑应急仓库' : '新增应急仓库'"
|
||||||
width="50%"
|
width="50%"
|
||||||
@onSubmit="handleSubmit"
|
@onSubmit="handleSubmit"
|
||||||
:footerclosed="true"
|
:footerclosed="true"
|
||||||
:diafooter="true"
|
:diafooter="true"
|
||||||
:footerkeepnaem='props.readonly?false:true'
|
:footerkeepnaem="props.readonly ? false : true"
|
||||||
>
|
>
|
||||||
<div class="detailForm-content">
|
<div class="detailForm-content">
|
||||||
<el-form
|
<el-form
|
||||||
|
|
@ -25,23 +25,12 @@
|
||||||
v-model="addPostFactorForm.houseName"
|
v-model="addPostFactorForm.houseName"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="管理员:" prop="nameId">
|
<el-form-item label="管理员:" prop="name">
|
||||||
<el-select
|
<el-input
|
||||||
v-model="addPostFactorForm.nameId"
|
:readonly="props.readonly"
|
||||||
placeholder="请选择管理员"
|
placeholder="请输入管理员"
|
||||||
filterable
|
v-model="addPostFactorForm.name"
|
||||||
remote
|
></el-input>
|
||||||
:remote-method="remoteMethod"
|
|
||||||
@change="adminOption"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in adminOptions"
|
|
||||||
:key="item.userId"
|
|
||||||
:value="item.userId"
|
|
||||||
:label="item.chinaname + '(' + item.performclassname + ')'"
|
|
||||||
>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="联系方式:" prop="telephone">
|
<el-form-item label="联系方式:" prop="telephone">
|
||||||
<el-input
|
<el-input
|
||||||
|
|
@ -71,30 +60,20 @@
|
||||||
v-model="addPostFactorForm.lon"
|
v-model="addPostFactorForm.lon"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="维度:" prop="lat">
|
<el-form-item label="纬度:" prop="lat">
|
||||||
<el-input
|
<el-input
|
||||||
:readonly="props.readonly"
|
:readonly="props.readonly"
|
||||||
placeholder="请输入维度"
|
placeholder="请输入维度"
|
||||||
v-model="addPostFactorForm.lat"
|
v-model="addPostFactorForm.lat"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属单位:" prop="possession">
|
<el-form-item label="所属单位:" prop="possession" style="width: 100%">
|
||||||
<el-input
|
<el-input
|
||||||
:readonly="props.readonly"
|
:readonly="props.readonly"
|
||||||
placeholder="请输入所属单位"
|
placeholder="请输入所属单位"
|
||||||
v-model="addPostFactorForm.possession"
|
v-model="addPostFactorForm.possession"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item
|
|
||||||
label="装备总数:"
|
|
||||||
v-if="props.form && Object.keys(props.form).length > 0"
|
|
||||||
>
|
|
||||||
<el-input
|
|
||||||
disabled
|
|
||||||
:readonly="props.readonly"
|
|
||||||
v-model="addPostFactorForm.houseTotal"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item> -->
|
|
||||||
|
|
||||||
<el-form-item label="地址:" prop="address" style="width: 100%">
|
<el-form-item label="地址:" prop="address" style="width: 100%">
|
||||||
<el-input
|
<el-input
|
||||||
|
|
@ -103,17 +82,6 @@
|
||||||
v-model="addPostFactorForm.address"
|
v-model="addPostFactorForm.address"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item
|
|
||||||
label="二维码:"
|
|
||||||
v-if="props.form && Object.keys(props.form).length > 0"
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
width="200px"
|
|
||||||
height="200px"
|
|
||||||
:src="addPostFactorForm.qrCode"
|
|
||||||
alt=""
|
|
||||||
/>
|
|
||||||
</el-form-item> -->
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</BaseDialog>
|
</BaseDialog>
|
||||||
|
|
@ -123,7 +91,11 @@ import { reactive, ref, onMounted, watch } from "vue";
|
||||||
import useUserStore from "@/store/modules/user";
|
import useUserStore from "@/store/modules/user";
|
||||||
import { ElMessage, FormInstance, FormRules } from "element-plus";
|
import { ElMessage, FormInstance, FormRules } from "element-plus";
|
||||||
import { getYears, getUUID, FileType } from "@/utils/common";
|
import { getYears, getUUID, FileType } from "@/utils/common";
|
||||||
import { delOthpersonHouse, getOtheWareHouseList,getHouseSysUser } from "@/api/Othteam";
|
import {
|
||||||
|
saveOtheWareHouse,
|
||||||
|
getOtheWareHouseList,
|
||||||
|
getHouseSysUser,
|
||||||
|
} from "@/api/Othteam";
|
||||||
import { areaTree } from "@/api/account";
|
import { areaTree } from "@/api/account";
|
||||||
const formRef = ref<FormInstance>();
|
const formRef = ref<FormInstance>();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
|
|
@ -149,12 +121,12 @@ const ruleForm = reactive<FormRules>({
|
||||||
name: [
|
name: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请选择仓库管理员",
|
message: "请输入仓库管理员",
|
||||||
trigger: "change",
|
trigger: "change",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
const adminOptions = ref([])
|
const adminOptions = ref([]);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
visible: {
|
visible: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|
@ -174,18 +146,21 @@ const emits = defineEmits(["close", "onSubmit"]);
|
||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
formRef.value?.validate((valid) => {
|
formRef.value?.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// addPostFactorForm.value.chinaname = adminId.value;
|
|
||||||
addPostFactorForm.value.houseId =
|
addPostFactorForm.value.houseId =
|
||||||
addPostFactorForm.value.houseId || uuid.value;
|
addPostFactorForm.value.houseId || uuid.value;
|
||||||
addPostFactorForm.value.userId = userId.value;
|
addPostFactorForm.value.userId = userId.value;
|
||||||
delOthpersonHouse(addPostFactorForm.value).then((res: any) => {
|
saveOtheWareHouse(addPostFactorForm.value).then((res: any) => {
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
ElMessage.success({
|
ElMessage.success({
|
||||||
message: "保存成功",
|
message: "保存成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
});
|
});
|
||||||
onclone();
|
onclone();
|
||||||
}
|
} else
|
||||||
|
ElMessage.error({
|
||||||
|
message: res.message,
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -195,8 +170,8 @@ const handleSubmit = () => {
|
||||||
const getGovUserList = () => {
|
const getGovUserList = () => {
|
||||||
getHouseSysUser(userId.value).then((res: any) => {
|
getHouseSysUser(userId.value).then((res: any) => {
|
||||||
adminOptions.value = res.data;
|
adminOptions.value = res.data;
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
//获取地区
|
//获取地区
|
||||||
const orgList = ref([]);
|
const orgList = ref([]);
|
||||||
const getareaTree = () => {
|
const getareaTree = () => {
|
||||||
|
|
@ -205,22 +180,23 @@ const getareaTree = () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const handleAreaChange = (val) => {
|
const handleAreaChange = (val) => {
|
||||||
addPostFactorForm.value.orgCode = addPostFactorForm.value.orgCode[addPostFactorForm.value.orgCode.length - 1];
|
addPostFactorForm.value.orgCode =
|
||||||
|
addPostFactorForm.value.orgCode[addPostFactorForm.value.orgCode.length - 1];
|
||||||
addPostFactorForm.value.streetCode = val[1] || "";
|
addPostFactorForm.value.streetCode = val[1] || "";
|
||||||
addPostFactorForm.value.communityCode = val[2] || "";
|
addPostFactorForm.value.communityCode = val[2] || "";
|
||||||
}
|
};
|
||||||
|
|
||||||
//选择管理员数据处理
|
//选择管理员数据处理
|
||||||
const condition =ref('')
|
const condition = ref("");
|
||||||
const remoteMethod = (val) => {
|
const remoteMethod = (val) => {
|
||||||
condition.value = val;
|
condition.value = val;
|
||||||
getGovUserList();
|
getGovUserList();
|
||||||
}
|
};
|
||||||
//选择管理员数据处理
|
//选择管理员数据处理
|
||||||
const adminId =ref('')
|
const adminId = ref("");
|
||||||
const adminOption = (val) => {
|
const adminOption = (val) => {
|
||||||
adminId.value = val;
|
adminId.value = val;
|
||||||
}
|
};
|
||||||
//关闭弹窗
|
//关闭弹窗
|
||||||
const onclone = () => {
|
const onclone = () => {
|
||||||
emits("close");
|
emits("close");
|
||||||
228
src/views/emergency/house/index.vue
Normal file
228
src/views/emergency/house/index.vue
Normal file
|
|
@ -0,0 +1,228 @@
|
||||||
|
<template>
|
||||||
|
<div class="percentage-content">
|
||||||
|
<div class="content">
|
||||||
|
<div style="margin-bottom: 16px" class="h-layout space-between h-center">
|
||||||
|
<div>
|
||||||
|
<div class="h-layout">
|
||||||
|
<div
|
||||||
|
class="tool-item"
|
||||||
|
@click="(dialogVisible = true), (form = {}), (readonly = false)"
|
||||||
|
>
|
||||||
|
<svg-icon name="add" class="icon" />
|
||||||
|
<span>新增</span>
|
||||||
|
</div>
|
||||||
|
<div class="tool-item" @click="getList">
|
||||||
|
<svg-icon name="refurbish" class="icon" />
|
||||||
|
<span>刷新</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 30%">
|
||||||
|
<div>
|
||||||
|
<el-input
|
||||||
|
v-model="search"
|
||||||
|
@keydown.enter.native="getList"
|
||||||
|
placeholder="输入仓库名称"
|
||||||
|
class="search-input"
|
||||||
|
>
|
||||||
|
<template #append>
|
||||||
|
<span @click="getList" class="search-bottom">
|
||||||
|
<svg-icon name="search" class="icon_class" />
|
||||||
|
<span>搜索</span>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
ref="loading"
|
||||||
|
v-loading="tableDataloading"
|
||||||
|
:data="tableData"
|
||||||
|
header-row-class-name="el-one-header"
|
||||||
|
border
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
align="center"
|
||||||
|
width="55"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
type="index"
|
||||||
|
align="center"
|
||||||
|
label="序列"
|
||||||
|
width="60"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="houseName"
|
||||||
|
:resizable="true"
|
||||||
|
align="center"
|
||||||
|
label="仓库名称"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="nameText"
|
||||||
|
:resizable="true"
|
||||||
|
align="center"
|
||||||
|
label="管理员"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.nameText || "-" }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="telephone"
|
||||||
|
:resizable="true"
|
||||||
|
align="center"
|
||||||
|
label="联系方式"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="address"
|
||||||
|
:resizable="true"
|
||||||
|
align="center"
|
||||||
|
label="地址"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column align="center" label="操作">
|
||||||
|
<template #default="scope">
|
||||||
|
<span
|
||||||
|
class="operate"
|
||||||
|
@click="
|
||||||
|
(dialogVisible = true), (form = scope.row), (readonly = false)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<svg-icon name="edit" class="icon"></svg-icon>
|
||||||
|
<span class="edit">编辑</span>
|
||||||
|
</span>
|
||||||
|
<span class="operate" @click="toDetail(scope.row.houseId)">
|
||||||
|
<svg-icon name="detail" class="icon"></svg-icon>
|
||||||
|
<span class="detail">详情</span>
|
||||||
|
</span>
|
||||||
|
<span class="operate" @click="del(scope.row.houseId)">
|
||||||
|
<svg-icon name="delete" class="icon"></svg-icon>
|
||||||
|
<span class="func">删除</span>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<el-pagination
|
||||||
|
class="pagination"
|
||||||
|
@size-change="getList"
|
||||||
|
@current-change="getList"
|
||||||
|
v-model:current-page.sync="currentPage"
|
||||||
|
:page-sizes="[10, 15, 20, 30]"
|
||||||
|
v-model:page-size.sync="pageSize"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="total"
|
||||||
|
background
|
||||||
|
>
|
||||||
|
</el-pagination>
|
||||||
|
<!-- 新增 -->
|
||||||
|
<AddDetails
|
||||||
|
:visible="dialogVisible"
|
||||||
|
:form="form"
|
||||||
|
:readonly="readonly"
|
||||||
|
@close="onclone"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script lang='ts' setup>
|
||||||
|
import { onMounted, reactive, ref } from "vue";
|
||||||
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
|
import { getOtheWareHousePage, delOtheWareHouse } from "@/api/Othteam";
|
||||||
|
import AddDetails from "./dialog/add-house-dialog.vue";
|
||||||
|
|
||||||
|
import useUserStore from "@/store/modules/user";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const user = ref(JSON.parse(userStore.userInfo));
|
||||||
|
const userId = ref(user.value.userId);
|
||||||
|
const search = ref([]);
|
||||||
|
const tableData = ref([]);
|
||||||
|
const currentPage = ref(1);
|
||||||
|
const pageSize = ref(10);
|
||||||
|
const total = ref(0);
|
||||||
|
|
||||||
|
const dialogVisible = ref(false);
|
||||||
|
const form = ref({});
|
||||||
|
const readonly = ref(false);
|
||||||
|
|
||||||
|
//获取列表
|
||||||
|
const tableDataloading = ref(false);
|
||||||
|
const getList = () => {
|
||||||
|
tableDataloading.value = true;
|
||||||
|
let params = {
|
||||||
|
houseName: search.value,
|
||||||
|
limit: pageSize.value,
|
||||||
|
page: currentPage.value,
|
||||||
|
};
|
||||||
|
getOtheWareHousePage(params).then((res: any) => {
|
||||||
|
tableData.value = res.data.list;
|
||||||
|
total.value = res.data.total;
|
||||||
|
tableDataloading.value = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//删除列表
|
||||||
|
const del = (id) => {
|
||||||
|
ElMessageBox.confirm("是否确认删除?", "提示", {
|
||||||
|
confirmButtonText: "是",
|
||||||
|
cancelButtonText: "否",
|
||||||
|
type: "warning",
|
||||||
|
}).then(() => {
|
||||||
|
let params = {
|
||||||
|
houseId: id,
|
||||||
|
userId: userId.value,
|
||||||
|
};
|
||||||
|
delOtheWareHouse(params).then((res: any) => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
ElMessage.success({
|
||||||
|
message: "删除成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
ElMessage.error({
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//关闭新增弹窗
|
||||||
|
const onclone = () => {
|
||||||
|
dialogVisible.value = false;
|
||||||
|
form.value = {};
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
//调整详情
|
||||||
|
const toDetail = (id) => {
|
||||||
|
router.push({
|
||||||
|
name: "house-detail",
|
||||||
|
query: { id: id },
|
||||||
|
});
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.content {
|
||||||
|
width: 100%;
|
||||||
|
// flex: auto;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0.26042vw;
|
||||||
|
box-shadow: 0 0 0.41667vw 0 rgba(8, 33, 85, 0.1);
|
||||||
|
height: 100%;
|
||||||
|
padding: 0.83333vw;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden !important;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-o-box-sizing: border-box;
|
||||||
|
-ms-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -1,162 +0,0 @@
|
||||||
|
|
||||||
<template>
|
|
||||||
<BaseDialog
|
|
||||||
:dialogVisible="props.visible"
|
|
||||||
@close="onclone"
|
|
||||||
:titleName="props.form.opInstructionId ? '编辑应急装备' : '新增应急装备'"
|
|
||||||
width="50%"
|
|
||||||
@onSubmit="handleSubmit"
|
|
||||||
:footerclosed="true"
|
|
||||||
:diafooter="true"
|
|
||||||
:footerkeepnaem='props.readonly?false:true'
|
|
||||||
>
|
|
||||||
<div class="detailForm-content">
|
|
||||||
<el-form
|
|
||||||
ref="formRef"
|
|
||||||
label-position="right"
|
|
||||||
label-width="150px"
|
|
||||||
:rules="ruleForm"
|
|
||||||
:model="addPostFactorForm"
|
|
||||||
>
|
|
||||||
<el-form-item label="物资名称:" prop="othresourcename">
|
|
||||||
<el-input
|
|
||||||
:readonly="isRead"
|
|
||||||
placeholder="请输入物资名称"
|
|
||||||
v-model="taskForm.othresourcename"
|
|
||||||
>
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="物资类型:" prop="othresourcetype">
|
|
||||||
<el-input
|
|
||||||
:readonly="isRead"
|
|
||||||
placeholder="请输入物资类型"
|
|
||||||
v-model="taskForm.othresourcetype"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="规格型号:" prop="othmodel">
|
|
||||||
<el-input
|
|
||||||
:readonly="isRead"
|
|
||||||
placeholder="请输入规格型号"
|
|
||||||
v-model="taskForm.othmodel"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="规格数量:" prop="othnuum">
|
|
||||||
<el-input-number
|
|
||||||
:disabled="isRead"
|
|
||||||
v-model="taskForm.othnuum"
|
|
||||||
:min="0"
|
|
||||||
></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="负责人:" prop="othperson">
|
|
||||||
<el-input
|
|
||||||
:readonly="isRead"
|
|
||||||
placeholder="请输入负责人"
|
|
||||||
v-model="taskForm.othperson"
|
|
||||||
>
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
</BaseDialog>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts" >
|
|
||||||
import { reactive, ref, onMounted, watch } from "vue";
|
|
||||||
import useUserStore from "@/store/modules/user";
|
|
||||||
import { ElMessage, FormInstance, FormRules } from "element-plus";
|
|
||||||
import { getYears, getUUID } from "@/utils/common";
|
|
||||||
import { areaTree } from "@/api/account";
|
|
||||||
import { saveOthteam } from "@/api/Othteam";
|
|
||||||
|
|
||||||
const formRef = ref<FormInstance>();
|
|
||||||
const userStore = useUserStore();
|
|
||||||
const user = ref(JSON.parse(userStore.userInfo));
|
|
||||||
const userId = ref(user.value.userId);
|
|
||||||
const planId = ref("");
|
|
||||||
const indexClassify = ref([]);
|
|
||||||
const fileList = ref<any>([]);
|
|
||||||
const levelList = ref([
|
|
||||||
{ value: "区级" },
|
|
||||||
{ value: "镇级" },
|
|
||||||
{ value: "园区" },
|
|
||||||
{ value: "企业" },
|
|
||||||
]);
|
|
||||||
const ruleForm = reactive<FormRules>({
|
|
||||||
teamname: [{ required: true, message: "请输入队伍名称", trigger: "change" }],
|
|
||||||
orgcode: [{ required: true, message: "请选择所属区域", trigger: "blur" }],
|
|
||||||
personnum: [{ required: true, message: "请输入人数", trigger: "change" }],
|
|
||||||
});
|
|
||||||
const props = defineProps({
|
|
||||||
visible: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
form: Object,
|
|
||||||
readonly: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
id: String,
|
|
||||||
});
|
|
||||||
const listperformid = ref(props.id);
|
|
||||||
const addPostFactorForm = ref(<any>{});
|
|
||||||
const emits = defineEmits(["close", "onSubmit"]);
|
|
||||||
//保存并退出
|
|
||||||
const handleSubmit = () => {
|
|
||||||
formRef.value?.validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
addPostFactorForm.value.orgcode = addPostFactorForm.value.orgcode[addPostFactorForm.value.orgcode.length - 1];
|
|
||||||
addPostFactorForm.value.othteamid = getUUID();
|
|
||||||
addPostFactorForm.value.userId = userId.value;
|
|
||||||
saveOthteam(addPostFactorForm.value).then((res: any) => {
|
|
||||||
if (res.code == 1) {
|
|
||||||
ElMessage.success({
|
|
||||||
message: "保存成功",
|
|
||||||
type: "success",
|
|
||||||
});
|
|
||||||
onclone();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
//关闭弹窗
|
|
||||||
const onclone = () => {
|
|
||||||
emits("close");
|
|
||||||
};
|
|
||||||
//获取地区
|
|
||||||
const orgList = ref([]);
|
|
||||||
const getareaTree = () => {
|
|
||||||
areaTree(userId.value).then((res: any) => {
|
|
||||||
orgList.value = res.data;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
onMounted(() => {
|
|
||||||
getareaTree();
|
|
||||||
});
|
|
||||||
watch(
|
|
||||||
() => props.form,
|
|
||||||
(val) => {
|
|
||||||
console.log(333, props);
|
|
||||||
if (val) {
|
|
||||||
if (!props.visible) return;
|
|
||||||
addPostFactorForm.value = val;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.detailForm-content {
|
|
||||||
margin-right: 30px;
|
|
||||||
}
|
|
||||||
:deep(.el-form) {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
// justify-content: space-around;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
:deep(.el-form-item) {
|
|
||||||
width: 47%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div style="margin-bottom: 16px" class="h-layout space-between h-center">
|
<div style="margin-bottom: 16px" class="h-layout space-between h-center">
|
||||||
<div>
|
<div>
|
||||||
<div class="h-layout">
|
<div class="h-layout h-center">
|
||||||
<div
|
<div
|
||||||
class="tool-item"
|
class="tool-item"
|
||||||
@click="(dialogVisible = true), (form = {}), (readonly = false)"
|
@click="(dialogVisible = true), (form = {}), (readonly = false)"
|
||||||
|
|
@ -11,40 +11,20 @@
|
||||||
<svg-icon name="add" class="icon" />
|
<svg-icon name="add" class="icon" />
|
||||||
<span>新增</span>
|
<span>新增</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="tool-item" @click="getCompanyList">
|
<div class="tool-item" @click="getList">
|
||||||
<svg-icon name="refurbish" class="icon" />
|
<svg-icon name="refurbish" class="icon" />
|
||||||
<span>刷新</span>
|
<span>刷新</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="tool-item" @click="getCompanyList">
|
<div class="tool-item" @click="getList">
|
||||||
<svg-icon name="export" class="icon" />
|
<svg-icon name="export" class="icon" />
|
||||||
<span>导出</span>
|
<span>导出</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="width: 30%">
|
|
||||||
<div>
|
|
||||||
<el-input
|
|
||||||
v-model="search"
|
|
||||||
@keydown.enter="getCompanyList"
|
|
||||||
placeholder="输入预案名称"
|
|
||||||
class="search-input"
|
|
||||||
>
|
|
||||||
<template #append>
|
|
||||||
<span @click="getCompanyList" class="search-bottom">
|
|
||||||
<svg-icon name="search" class="icon_class" />
|
|
||||||
<span>搜索</span>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-input>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="display: flex; margin-bottom: 10px">
|
|
||||||
<div class="label-select filter-tab">
|
<div class="label-select filter-tab">
|
||||||
<label>预案类型</label>
|
<label>预案类型</label>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="type"
|
v-model="type"
|
||||||
@change="getCompanyList"
|
@change="getList"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
>
|
>
|
||||||
|
|
@ -58,6 +38,25 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 30%">
|
||||||
|
<div>
|
||||||
|
<el-input
|
||||||
|
v-model="search"
|
||||||
|
@keydown.enter="getList"
|
||||||
|
placeholder="输入预案名称"
|
||||||
|
class="search-input"
|
||||||
|
>
|
||||||
|
<template #append>
|
||||||
|
<span @click="getList" class="search-bottom">
|
||||||
|
<svg-icon name="search" class="icon_class" />
|
||||||
|
<span>搜索</span>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
ref="loading"
|
ref="loading"
|
||||||
v-loading="tableDataloading"
|
v-loading="tableDataloading"
|
||||||
|
|
@ -115,8 +114,8 @@
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<el-pagination
|
<el-pagination
|
||||||
class="pagination"
|
class="pagination"
|
||||||
@size-change="getCompanyList"
|
@size-change="getList"
|
||||||
@current-change="getCompanyList"
|
@current-change="getList"
|
||||||
v-model:current-page="currentPage"
|
v-model:current-page="currentPage"
|
||||||
:page-sizes="[10, 15, 20, 30]"
|
:page-sizes="[10, 15, 20, 30]"
|
||||||
v-model:page-size="pageSize"
|
v-model:page-size="pageSize"
|
||||||
|
|
@ -159,7 +158,7 @@ const readonly = ref(false);
|
||||||
const handleSelectionChange = () => {};
|
const handleSelectionChange = () => {};
|
||||||
//获取列表
|
//获取列表
|
||||||
const tableDataloading = ref(false);
|
const tableDataloading = ref(false);
|
||||||
const getCompanyList = () => {
|
const getList = () => {
|
||||||
tableDataloading.value = true;
|
tableDataloading.value = true;
|
||||||
let params = {
|
let params = {
|
||||||
planname: search.value,
|
planname: search.value,
|
||||||
|
|
@ -183,10 +182,10 @@ const OthtypeList = () => {
|
||||||
const onclone = () => {
|
const onclone = () => {
|
||||||
dialogVisible.value = false;
|
dialogVisible.value = false;
|
||||||
form.value = {};
|
form.value = {};
|
||||||
getCompanyList();
|
getList();
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getCompanyList();
|
getList();
|
||||||
OthtypeList();
|
OthtypeList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<BaseDialog
|
<BaseDialog
|
||||||
:dialogVisible="props.visible"
|
:dialogVisible="props.visible"
|
||||||
@close="onclone"
|
@close="onclone"
|
||||||
:titleName="props.form.opInstructionId ? '编辑应急队伍' : '新增应急队伍'"
|
:titleName="props.form.othpersonid ? '编辑应急成员' : '新增应急成员'"
|
||||||
width="50%"
|
width="50%"
|
||||||
@onSubmit="handleSubmit"
|
@onSubmit="handleSubmit"
|
||||||
:footerclosed="true"
|
:footerclosed="true"
|
||||||
|
|
@ -78,15 +78,16 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
id: String,
|
id: String,
|
||||||
});
|
});
|
||||||
const othteamid = ref(props.id);
|
const othteamid = ref();
|
||||||
const addPostFactorForm = ref(<any>{});
|
const addPostFactorForm = ref(<any>{});
|
||||||
const emits = defineEmits(["close", "onSubmit"]);
|
const emits = defineEmits(["close", "onSubmit"]);
|
||||||
//保存并退出
|
//保存并退出
|
||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
formRef.value?.validate((valid) => {
|
formRef.value?.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let str = addPostFactorForm.value.othpersonid?'编辑成功':'新增成功'
|
let str = addPostFactorForm.value.othpersonid ? "编辑成功" : "新增成功";
|
||||||
if(addPostFactorForm.value.othpersonid)addPostFactorForm.value.othpersonid = addPostFactorForm.value.othpersonid || getUUID();
|
addPostFactorForm.value.othpersonid =
|
||||||
|
addPostFactorForm.value.othpersonid || getUUID();
|
||||||
addPostFactorForm.value.othteamid = othteamid.value;
|
addPostFactorForm.value.othteamid = othteamid.value;
|
||||||
addPostFactorForm.value.userId = userId.value;
|
addPostFactorForm.value.userId = userId.value;
|
||||||
saveOthperson(addPostFactorForm.value).then((res: any) => {
|
saveOthperson(addPostFactorForm.value).then((res: any) => {
|
||||||
|
|
@ -113,6 +114,7 @@ watch(
|
||||||
if (val) {
|
if (val) {
|
||||||
if (!props.visible) return;
|
if (!props.visible) return;
|
||||||
addPostFactorForm.value = val;
|
addPostFactorForm.value = val;
|
||||||
|
othteamid.value = props.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
@ -8,30 +8,22 @@
|
||||||
<svg-icon name="add" class="icon" />
|
<svg-icon name="add" class="icon" />
|
||||||
<span>新增</span>
|
<span>新增</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="tool-item" @click="getCompanyList">
|
<div class="tool-item" @click="getList">
|
||||||
<svg-icon name="refurbish" class="icon" />
|
<svg-icon name="refurbish" class="icon" />
|
||||||
<span>刷新</span>
|
<span>刷新</span>
|
||||||
</div>
|
</div>
|
||||||
<div
|
|
||||||
v-if="tableCheckBoxs.length > 0"
|
|
||||||
class="tool-item"
|
|
||||||
@click="deleteCheckItems"
|
|
||||||
>
|
|
||||||
<svg-icon name="delete" class="icon" />
|
|
||||||
<span>删除</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 30%">
|
<div style="width: 30%">
|
||||||
<div>
|
<div>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="search"
|
v-model="search"
|
||||||
@keydown.enter.native="getCompanyList"
|
@keydown.enter.native="getList"
|
||||||
placeholder="请输入队伍名称"
|
placeholder="请输入队伍名称"
|
||||||
class="search-input"
|
class="search-input"
|
||||||
>
|
>
|
||||||
<template #append>
|
<template #append>
|
||||||
<span @click="getCompanyList" class="search-bottom">
|
<span @click="getList" class="search-bottom">
|
||||||
<svg-icon name="search" class="icon_class" />
|
<svg-icon name="search" class="icon_class" />
|
||||||
<span>搜索</span>
|
<span>搜索</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -45,10 +37,8 @@
|
||||||
v-loading="tableDataloading"
|
v-loading="tableDataloading"
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
header-row-class-name="el-one-header"
|
header-row-class-name="el-one-header"
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
border
|
border
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" align="center" width="55" />
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="index"
|
type="index"
|
||||||
label="序列"
|
label="序列"
|
||||||
|
|
@ -93,7 +83,7 @@
|
||||||
详情
|
详情
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<span class="operate" @click="del()">
|
<span class="operate" @click="del(scope.row.othteamid)">
|
||||||
<svg-icon name="delete" class="icon"></svg-icon>
|
<svg-icon name="delete" class="icon"></svg-icon>
|
||||||
<span class="func">删除</span>
|
<span class="func">删除</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -103,8 +93,8 @@
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<el-pagination
|
<el-pagination
|
||||||
class="pagination"
|
class="pagination"
|
||||||
@size-change="getCompanyList"
|
@size-change="getList"
|
||||||
@current-change="getCompanyList"
|
@current-change="getList"
|
||||||
v-model:current-page.sync="currentPage"
|
v-model:current-page.sync="currentPage"
|
||||||
:page-sizes="[10, 15, 20, 30]"
|
:page-sizes="[10, 15, 20, 30]"
|
||||||
v-model:page-size.sync="pageSize"
|
v-model:page-size.sync="pageSize"
|
||||||
|
|
@ -123,7 +113,7 @@ import { onMounted, reactive, ref } from "vue";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { getOthteamPage, delOthteam } from "@/api/Othteam";
|
import { getOthteamPage, delOthteam } from "@/api/Othteam";
|
||||||
import Adddetails from "./details.vue";
|
import Adddetails from "./add-team-dialog.vue";
|
||||||
import useUserStore from "@/store/modules/user";
|
import useUserStore from "@/store/modules/user";
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const user = ref(JSON.parse(userStore.userInfo));
|
const user = ref(JSON.parse(userStore.userInfo));
|
||||||
|
|
@ -137,28 +127,10 @@ const form = ref({});
|
||||||
const currentPage = ref(1);
|
const currentPage = ref(1);
|
||||||
const pageSize = ref(10);
|
const pageSize = ref(10);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const tableCheckBoxs = ref([]);
|
const tableData = ref([]);
|
||||||
const tableData = ref([
|
|
||||||
{
|
|
||||||
teamname: "队伍名称",
|
|
||||||
orgcode: "道孚县",
|
|
||||||
personnum: "20",
|
|
||||||
principal: "张三",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*选中
|
|
||||||
*/
|
|
||||||
const handleSelectionChange = (val: any) => {
|
|
||||||
tableCheckBoxs.value = [];
|
|
||||||
for (let index = 0; index < val.length; index++) {
|
|
||||||
const element = val[index];
|
|
||||||
tableCheckBoxs.value.push(element.othteamid);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
//获取应急队伍列表
|
//获取应急队伍列表
|
||||||
const getCompanyList = () => {
|
const getList = () => {
|
||||||
tableDataloading.value = true;
|
tableDataloading.value = true;
|
||||||
let params = {
|
let params = {
|
||||||
limit: pageSize.value,
|
limit: pageSize.value,
|
||||||
|
|
@ -173,14 +145,14 @@ const getCompanyList = () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
//删除
|
//删除
|
||||||
const del = () => {
|
const del = (id) => {
|
||||||
ElMessageBox.confirm("是否确认删除?", "提示", {
|
ElMessageBox.confirm("是否确认删除?", "提示", {
|
||||||
confirmButtonText: "是",
|
confirmButtonText: "是",
|
||||||
cancelButtonText: "否",
|
cancelButtonText: "否",
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
let params = {
|
let params = {
|
||||||
othteamid: tableCheckBoxs.value.join(","),
|
othteamid: id,
|
||||||
userId: userId.value,
|
userId: userId.value,
|
||||||
};
|
};
|
||||||
delOthteam(params).then((res: any) => {
|
delOthteam(params).then((res: any) => {
|
||||||
|
|
@ -195,24 +167,26 @@ const del = () => {
|
||||||
type: "error",
|
type: "error",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
getCompanyList();
|
getList();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
//详情
|
//详情
|
||||||
const todetail = (id) => {
|
const todetail = (id) => {
|
||||||
router.push({
|
router.push({
|
||||||
name: "form_details",
|
name: "team-detail",
|
||||||
query: { id: id },
|
query: { id: id },
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//关闭职清单详情弹窗
|
//关闭详情弹窗
|
||||||
const onclone = () => {
|
const onclone = () => {
|
||||||
dialogVisible.value = false;
|
dialogVisible.value = false;
|
||||||
form.value = {};
|
form.value = {};
|
||||||
};
|
};
|
||||||
onMounted(() => {});
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.content {
|
.content {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="percentage-content">
|
<div class="percentage-content">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div>
|
<div>
|
||||||
<TitleC titleName="检查记录">
|
<TitleC titleName="队伍信息">
|
||||||
<template v-slot:option>
|
<template v-slot:option>
|
||||||
<div class="h-layout option">
|
<div class="h-layout option">
|
||||||
<div class="h-layout h-titlec" @click="Chkbilldetail">
|
<div class="h-layout h-titlec" @click="Chkbilldetail">
|
||||||
|
|
@ -272,7 +272,7 @@
|
||||||
<addMemberDialog
|
<addMemberDialog
|
||||||
:visible="dialogVisible"
|
:visible="dialogVisible"
|
||||||
:form="form"
|
:form="form"
|
||||||
:id="route.query.id"
|
:id="teamId"
|
||||||
@close="onclone"
|
@close="onclone"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -282,7 +282,7 @@
|
||||||
<script lang='ts' setup>
|
<script lang='ts' setup>
|
||||||
import { onMounted, reactive, ref } from "vue";
|
import { onMounted, reactive, ref } from "vue";
|
||||||
import { ElMessage, FormInstance, FormRules, ElMessageBox } from "element-plus";
|
import { ElMessage, FormInstance, FormRules, ElMessageBox } from "element-plus";
|
||||||
import addMemberDialog from "./addMemberDialog.vue";
|
import addMemberDialog from "./add-member-dialog.vue";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getOthteam,
|
getOthteam,
|
||||||
|
|
@ -314,7 +314,9 @@ const levelList = ref([
|
||||||
{ value: "企业" },
|
{ value: "企业" },
|
||||||
]);
|
]);
|
||||||
const tableDataloading = ref(false);
|
const tableDataloading = ref(false);
|
||||||
const tableData = ref([{ othname: "张三", othsex: "男" }]);
|
const tableData = ref([]);
|
||||||
|
|
||||||
|
const teamId = ref();
|
||||||
const form = ref({});
|
const form = ref({});
|
||||||
const currentPage = ref(1);
|
const currentPage = ref(1);
|
||||||
const pageSize = ref(10);
|
const pageSize = ref(10);
|
||||||
|
|
@ -367,17 +369,17 @@ const getareaTree = () => {
|
||||||
};
|
};
|
||||||
//应急成员分页
|
//应急成员分页
|
||||||
const OthpersonPage = () => {
|
const OthpersonPage = () => {
|
||||||
// tableDataloading.value = true;
|
tableDataloading.value = true;
|
||||||
let params = {
|
let params = {
|
||||||
limit: pageSize.value,
|
limit: pageSize.value,
|
||||||
page: currentPage.value,
|
page: currentPage.value,
|
||||||
othteamid: route.query.id,
|
othteamid: route.query.id,
|
||||||
};
|
};
|
||||||
// getOthpersonPage(params).then((res: any) => {
|
getOthpersonPage(params).then((res: any) => {
|
||||||
// tableData.value = res.data.list;
|
tableData.value = res.data.list;
|
||||||
// total.value = res.data.total;
|
total.value = res.data.total;
|
||||||
// tableDataloading.value = false;
|
tableDataloading.value = false;
|
||||||
// });
|
});
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
*选中
|
*选中
|
||||||
|
|
@ -433,6 +435,8 @@ const editMember = (val) => {
|
||||||
form.value = val;
|
form.value = val;
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
teamId.value = route.query.id || "";
|
||||||
|
|
||||||
refurbish();
|
refurbish();
|
||||||
getareaTree();
|
getareaTree();
|
||||||
OthpersonPage();
|
OthpersonPage();
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<BaseDialog
|
<BaseDialog
|
||||||
:dialogVisible="props.visible"
|
:dialogVisible="props.visible"
|
||||||
@close="onclone"
|
@close="onclone"
|
||||||
:titleName="titleName + '应急值守'"
|
:titleName="titleName + '避难场所'"
|
||||||
width="50%"
|
width="50%"
|
||||||
@onSubmit="handleSubmit"
|
@onSubmit="handleSubmit"
|
||||||
:footerclosed="true"
|
:footerclosed="true"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<!-- 应急值守 -->
|
<!-- 应急避难场所 -->
|
||||||
<template>
|
<template>
|
||||||
<div class="percentage-content">
|
<div class="percentage-content">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<svg-icon name="add" class="icon" />
|
<svg-icon name="add" class="icon" />
|
||||||
<span>新增</span>
|
<span>新增</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="tool-item" @click="getCompanyList">
|
<div class="tool-item" @click="getList">
|
||||||
<svg-icon name="refurbish" class="icon" />
|
<svg-icon name="refurbish" class="icon" />
|
||||||
<span>刷新</span>
|
<span>刷新</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -26,12 +26,12 @@
|
||||||
<div>
|
<div>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="search"
|
v-model="search"
|
||||||
@keydown.enter.native="getCompanyList"
|
@keydown.enter.native="getList"
|
||||||
placeholder="请输入关键字"
|
placeholder="请输入关键字"
|
||||||
class="search-input"
|
class="search-input"
|
||||||
>
|
>
|
||||||
<template #append>
|
<template #append>
|
||||||
<span @click="getCompanyList" class="search-bottom">
|
<span @click="getList" class="search-bottom">
|
||||||
<svg-icon name="search" class="icon_class" />
|
<svg-icon name="search" class="icon_class" />
|
||||||
<span>搜索</span>
|
<span>搜索</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -114,8 +114,8 @@
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<el-pagination
|
<el-pagination
|
||||||
class="pagination"
|
class="pagination"
|
||||||
@size-change="getCompanyList"
|
@size-change="getList"
|
||||||
@current-change="getCompanyList"
|
@current-change="getList"
|
||||||
v-model:current-page.sync="currentPage"
|
v-model:current-page.sync="currentPage"
|
||||||
:page-sizes="[10, 15, 20, 30]"
|
:page-sizes="[10, 15, 20, 30]"
|
||||||
v-model:page-size.sync="pageSize"
|
v-model:page-size.sync="pageSize"
|
||||||
|
|
@ -133,7 +133,7 @@
|
||||||
import { onMounted, reactive, ref } from "vue";
|
import { onMounted, reactive, ref } from "vue";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import { getOthequipmentPage, delOthequipment } from "@/api/Othteam";
|
import { getOthequipmentPage, delOthequipment } from "@/api/Othteam";
|
||||||
import AddEdit from "./dialog/add-edit.vue";
|
import AddEdit from "./dialog/add-edit-dialog.vue";
|
||||||
|
|
||||||
import useUserStore from "@/store/modules/user";
|
import useUserStore from "@/store/modules/user";
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
|
|
@ -141,14 +141,7 @@ const user = ref(JSON.parse(userStore.userInfo));
|
||||||
const userId = ref(user.value.userId);
|
const userId = ref(user.value.userId);
|
||||||
|
|
||||||
const search = ref([]);
|
const search = ref([]);
|
||||||
const tableData = ref([
|
const tableData = ref([]);
|
||||||
{
|
|
||||||
name: "鲜水镇",
|
|
||||||
area: "3000㎡",
|
|
||||||
number: "20000",
|
|
||||||
address: "xxxxxx地址",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
const currentPage = ref(1);
|
const currentPage = ref(1);
|
||||||
const pageSize = ref(10);
|
const pageSize = ref(10);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
|
|
@ -160,7 +153,7 @@ const readonly = ref(false);
|
||||||
const handleSelectionChange = () => {};
|
const handleSelectionChange = () => {};
|
||||||
//获取列表
|
//获取列表
|
||||||
const tableDataloading = ref(false);
|
const tableDataloading = ref(false);
|
||||||
const getCompanyList = () => {
|
const getList = () => {
|
||||||
tableDataloading.value = true;
|
tableDataloading.value = true;
|
||||||
let params = {
|
let params = {
|
||||||
equname: search.value,
|
equname: search.value,
|
||||||
|
|
@ -194,7 +187,7 @@ const deletelist = (id) => {
|
||||||
type: "error",
|
type: "error",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
getCompanyList();
|
getList();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -203,7 +196,9 @@ const onclone = () => {
|
||||||
dialogVisible.value = false;
|
dialogVisible.value = false;
|
||||||
form.value = {};
|
form.value = {};
|
||||||
};
|
};
|
||||||
onMounted(() => {});
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
|
|
@ -7,79 +7,97 @@
|
||||||
</route>
|
</route>
|
||||||
|
|
||||||
<script setup name="PersonalEditPassword">
|
<script setup name="PersonalEditPassword">
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from "@/store/modules/user";
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute();
|
||||||
const router = useRouter()
|
const router = useRouter();
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore();
|
||||||
|
|
||||||
const validatePassword = (rule, value, callback) => {
|
const validatePassword = (rule, value, callback) => {
|
||||||
if (value !== form.value.newpassword) {
|
if (value !== form.value.newpassword) {
|
||||||
callback(new Error('请确认新密码'))
|
callback(new Error("请确认新密码"));
|
||||||
} else {
|
} else {
|
||||||
callback()
|
callback();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const formRef = ref()
|
const formRef = ref();
|
||||||
const form = ref({
|
const form = ref({
|
||||||
password: '',
|
password: "",
|
||||||
newpassword: '',
|
newpassword: "",
|
||||||
checkpassword: ''
|
checkpassword: "",
|
||||||
})
|
});
|
||||||
|
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
password: [
|
password: [{ required: true, message: "请输入原密码", trigger: "blur" }],
|
||||||
{ required: true, message: '请输入原密码', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
newpassword: [
|
newpassword: [
|
||||||
{ required: true, message: '请输入新密码', trigger: 'blur' },
|
{ required: true, message: "请输入新密码", trigger: "blur" },
|
||||||
{ min: 6, max: 18, trigger: 'blur', message: '密码长度为6到18位' }
|
{ min: 6, max: 18, trigger: "blur", message: "密码长度为6到18位" },
|
||||||
],
|
],
|
||||||
checkpassword: [
|
checkpassword: [
|
||||||
{ required: true, message: '请输入新密码', trigger: 'blur' },
|
{ required: true, message: "请输入新密码", trigger: "blur" },
|
||||||
{ validator: validatePassword }
|
{ validator: validatePassword },
|
||||||
]
|
],
|
||||||
})
|
});
|
||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
formRef.value.validate(valid => {
|
formRef.value.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
userStore.editPassword(form.value).then(() => {
|
userStore
|
||||||
|
.editPassword(form.value)
|
||||||
|
.then(() => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: "success",
|
||||||
message: '模拟修改成功,请重新登录'
|
message: "模拟修改成功,请重新登录",
|
||||||
})
|
});
|
||||||
userStore.logout().then(() => {
|
userStore.logout().then(() => {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'login',
|
name: "login",
|
||||||
query: {
|
query: {
|
||||||
redirect: route.fullPath
|
redirect: route.fullPath,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
|
||||||
}).catch(() => {})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div style="width: 100%">
|
||||||
<page-header title="修改密码" content="定期修改密码可以提高帐号安全性噢~" />
|
<page-header title="修改密码" content="定期修改密码可以提高帐号安全性噢~" />
|
||||||
<page-main>
|
<page-main>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :md="24" :lg="12">
|
<el-col :md="24" :lg="12">
|
||||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
|
<el-form
|
||||||
|
ref="formRef"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="120px"
|
||||||
|
>
|
||||||
<el-form-item label="原密码" prop="password">
|
<el-form-item label="原密码" prop="password">
|
||||||
<el-input v-model="form.password" type="password" placeholder="请输入原密码" />
|
<el-input
|
||||||
|
v-model="form.password"
|
||||||
|
type="password"
|
||||||
|
placeholder="请输入原密码"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="新密码" prop="newpassword">
|
<el-form-item label="新密码" prop="newpassword">
|
||||||
<el-input v-model="form.newpassword" type="password" placeholder="请输入原密码" />
|
<el-input
|
||||||
|
v-model="form.newpassword"
|
||||||
|
type="password"
|
||||||
|
placeholder="请输入原密码"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="确认新密码" prop="checkpassword">
|
<el-form-item label="确认新密码" prop="checkpassword">
|
||||||
<el-input v-model="form.checkpassword" type="password" placeholder="请输入原密码" />
|
<el-input
|
||||||
|
v-model="form.checkpassword"
|
||||||
|
type="password"
|
||||||
|
placeholder="请输入原密码"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user