master
lion 5 months ago
parent d99e3639d6
commit 3870d1f53d

@ -0,0 +1,50 @@
import request from '@/utils/request'
function customParamsSerializer(params) {
let result = ''
for (const key in params) {
if (params.hasOwnProperty(key)) {
if (Array.isArray(params[key])) {
params[key].forEach((item, index) => {
result += `${key}[${index}][key]=${item.key}&${key}[${index}][op]=${item.op}&${key}[${index}][value]=${item.value}&`
})
} else {
result += `${key}=${params[key]}&`
}
}
}
return result.slice(0, -1)
}
export function index(params, isLoading = false) {
return request({
method: 'get',
url: '/api/admin/team-articles/index',
params,
paramsSerializer: customParamsSerializer,
isLoading
})
}
export function show(params, isLoading = true) {
return request({
method: 'get',
url: '/api/admin/team-articles/show',
params,
isLoading
})
}
export function save(data) {
return request({
method: 'post',
url: '/api/admin/team-articles/save',
data
})
}
export function destroy(params) {
return request({
method: 'get',
url: '/api/admin/team-articles/destroy',
params
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 771 KiB

After

Width:  |  Height:  |  Size: 766 KiB

@ -98,6 +98,17 @@ router.beforeEach(async(to, from, next) => {
console.log('/login', e)
next('/login')
}
}else if(to.query.auth_token && to.query.oaType==='wuzi'){
try {
await store.dispatch('user/loginskip', {
token: to.query.auth_token,
tp: 'inner'
})
next(to.fullPath?to.fullPath.slice(1): '/')
} catch (e) {
console.log("e",e)
next('/login')
}
} else {
// other pages that do not have permission to access are redirected to the login page.
next(`/login?redirect=${to.path}`)

@ -40,6 +40,11 @@ export const constantRoutes = [{
path: '/404',
component: () => import('@/views/404'),
hidden: true
},
{
path: '/leader',
component: () => import('@/views/jsc/leader'),
hidden: true
},
{
path: '/stocks',

@ -109,102 +109,108 @@ export default {
fixed: 'left',
width: 80
},
{
label: '种类编码',
width: 120,
prop: 'wuzibianma',
align: 'center'
},
{
label: '物资名称',
width: 180,
prop: 'zichanmingcheng',
align: 'left'
},
{
label: '物资类型',
width: 180,
prop: 'wuzileixing',
align: 'center'
},
{
label: '物资型号',
width: 180,
prop: 'guigexinghao',
align: 'left'
},
{
label: '分类',
width: 180,
prop: 'fenlei',
align: 'center'
},
// {
// label: "",
// width: 180,
// prop: 'zhuangtai',
// align: 'center'
// },
{
label: '计量单位',
width: 180,
prop: 'jiliangdanwei',
align: 'center'
},
{
label: '所在仓库',
width: 180,
prop: 'storages_id_materialstorages_id_relation.cangkumingcheng',
align: 'center'
},
// {
// label: "",
// width: 180,
// prop: 'suozaihuojia',
// align: 'center'
// },
{
label: '入库时间',
width: 180,
prop: 'rukushijian',
align: 'center'
},
// {
// label: "",
// width: 180,
// prop: 'zichanyuanzhi',
// align: 'center'
// },
{
label: '使用年限',
width: 180,
prop: 'shiyongnianxian',
align: 'center'
},
// {
// label: "使",
// width: 180,
// prop: 'shiyongbumen',
// align: 'center'
// },
{
label: '是否为固定资产',
width: 180,
prop: 'shifouweigudingzichan',
align: 'center'
},
{
label: '库存',
width: 180,
prop: 'inventorys_total',
align: 'center'
},
{
label: '备注',
width: 240,
prop: 'beizhu',
align: 'left'
}
{
label: '物资代码',
width: 120,
prop: 'wuzidaima',
align: 'left'
},
{
label: '现物资名称',
width: 120,
prop: 'xianwuzimingcheng',
align: 'center'
},
{
label: '原物资名称',
width: 120,
prop: 'yuanwuzimingcheng',
align: 'left'
},
{
label: '物资型号',
width: 120,
prop: 'guigexinghao',
align: 'center'
},
{
label: '数量',
width: 80,
prop: 'shuliang',
align: 'center'
},
{
label: '单位',
width: 80,
prop: 'danwei',
align: 'center'
},
{
label: '价值(元)',
width: 80,
prop: 'jiazhiyuan',
align: 'center'
},
{
label: '生产日期',
width: 120,
prop: 'shengchanriqi',
align: 'center'
},
{
label: '入库日期',
width: 120,
prop: 'rukuriqi',
align: 'center'
},
{
label: '储备年限',
width: 80,
prop: 'chubeinianxian',
align: 'center'
},
{
label: '状态',
width: 80,
prop: 'zhuangtai',
align: 'center'
},
{
label: '资金来源',
width: 120,
prop: 'zijinlaiyuan',
align: 'center'
},
{
label: '储备方式',
width: 120,
prop: 'chubeifangshi',
align: 'center'
},
{
label: '储备地点',
width: 180,
prop: 'chubeididian',
align: 'left'
},
{
label: '备注',
width: 180,
prop: 'beizhu',
align: 'left'
},
{
label: '储备层级',
width: 120,
prop: 'chubeicengji',
align: 'left'
},
{
label: '是否展示',
width: 120,
prop: 'shifouzhanshi',
align: 'left'
}
]
}
},
@ -327,9 +333,9 @@ export default {
const res = await index({
page: 1,
page_size: 9999,
table_name: 'material_infos',
table_name: 'flood_materials',
filter: [{
'key': 'storages_id',
'key': 'guanliancangku',
'op': 'eq',
'value': id
}]

@ -2,7 +2,7 @@
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" text="库存管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<slot>
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<div class="selector-item">

@ -2,7 +2,7 @@
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" text="出库明细" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<slot>
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<div class="selector-item">

@ -2,7 +2,7 @@
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" text="入库明细" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<slot>
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<div class="selector-item">

@ -1,6 +1,6 @@
<template>
<div class="warehouse-table">
<div class="warehouse-table-title">年度物资动态</div>
<!-- <div class="warehouse-table-title">年度物资动态</div> -->
<!-- Element-UI 表格 -->
<el-table :data="currentPageData" style="width: 100%" height="200" :row-class-name="getRowClass"
:cell-style="{background: 'transparent', border: 'none'}" :header-cell-class-name="'headerRow'">

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -11,25 +11,38 @@
</div>
</div>
<div class="jscC-center">
<div class="jscC-center-left" >
<div class="jscC-center-top">
<div class="jscC-center-left-title">年度物资动态</div>
<WarehouseTable></WarehouseTable>
</div>
<!-- <Pie3DChart :data="upList"></Pie3DChart> -->
<div class="jscC-center-left-title">重要防汛物资</div>
<div class="jscC-center-left-content">
<div v-for="item in upList">
<img :src="item.img" alt="">
<span>{{item.name}}</span>
<span>{{item.value}}{{item.unit?item.unit:''}}</span>
</div>
<div class="jscC-center-left">
<div class="jscC-center-top">
<div class="jscC-center-left-title">年度物资动态</div>
<WarehouseTable></WarehouseTable>
</div>
<!-- <Pie3DChart :data="upList"></Pie3DChart> -->
<div class="jscC-center-left-title">
<span>重要防汛物资</span>
<div>
<span :class="['custom-btn', { active: activeType === '市级' }]" @click="onTypeClick('市级')"></span>
<span :class="['custom-btn', { active: activeType === '全市' }]" @click="onTypeClick('全市')"></span>
</div>
</div>
<div class="jscC-center-left-content">
<div v-if="activeType === '市级'" v-for="item in upList">
<img :src="item.img" alt="">
<span>{{item.name}}</span>
<span>{{item.value}}{{item.unit?item.unit:''}}</span>
</div>
<div v-if="activeType === '全市'" v-for="item in upListByFloodMaterials">
<img :src="item.img" alt="">
<span>{{item.name}}</span>
<span>{{item.value}}{{item.unit?item.unit:''}}</span>
</div>
<!-- <Pie3DChart :data="upList"></Pie3DChart> -->
<!-- <span
v-for="item in Object.keys(chartDataMap)"
<!-- <span
v-for="item in Object.keys(chartDataMap)"
:key="item"
:class="['custom-btn', { active: activeType === item }]"
@click="handleTypeClick(item)"
:class="['custom-btn', { active: activeType === item }]"
@click="handleTypeClick(item)"
>
{{ item }}
</span> -->
@ -58,268 +71,325 @@
</template>
<script>
import Bar3DChart from '../jsc/components/barChart.vue'
import fenleiChart from '../jsc/components/fenleiChart.vue'
import Pie3DChart from '../jsc/components/pieChart.vue'
import echartsMap from './components/mapChart.vue'
import WarehouseTable from './components/WarehouseTable.vue'
import {
fenleiCharts,
homeCharts,
} from '@/api/charts.js'
export default {
components: {
Bar3DChart,
Pie3DChart,
echartsMap,
fenleiChart,
WarehouseTable
},
data() {
return {
screenWidth: 0,
screenHeight: 0,
bgStyle: {
width: 0,
height: 0
},
contentStyle: {
width: 0,
height: 0
},
upList:[],
topObj: [{
label: '仓库数量',
value: 0,
id: 'cangku_count',
unit:'间'
}, {
label: '物资种类',
value: 0,
id: 'wuzizhonglei_count',
unit:'类'
},
// {
// label: '',
// value: 0,
// id: 'chuku_month_count'
// }, {
// label: '',
// value: 0,
// id: 'ruku_month_count'
// },
{
label: '本年度市级调度',
value: 0,
id: 'yingjidiaodu_count',
unit:'次'
}, {
label: '队伍数量',
value: 0,
id: 'shebei_count',
unit:'个'
}, {
label: '队伍出动人次',
value: 0,
id: 'shebei_count',
unit:'人次'
}
// {
// label: '',
// value: 0,
// id: 'shebei_count'
// }, {
// label: '',
// value: 0,
// id: 'pan_count'
// }, {
// label: '',
// value: 0,
// id: 'weihu_count'
// },
],
bottomObj: [{
label: '库存管理',
path: '/views/inventorys'
}, {
label: '入库管理',
path: '/stocks/index_purchase'
}, {
label: '出库管理',
path: '/outbounds/index_receive'
}, {
label: '统计报表',
path: '/reports/stocks'
}, {
label: '应急防御',
path: '/books/index'
}, {
label: '盘点管理',
path: '/inventorys/stocktaking'
}, {
label: '运维管理',
path: '/maintenance/maintenance_records'
}, {
label: '工单管理',
path: '/flood/plan'
}],
//
activeType: '防御材料',
apiData: [],
chartDataMap: {},
typeList: [],
autoTimer: null, //
resumeTimer: null, //
xData: [],
yData: [],
todoList: [{
id: 'gongdan',
value: '调令'
}, {
id: 'pandian',
value: '盘点'
}, {
id: 'weihu',
value: '维护'
}],
imgList:{
'袋类':require("@/assets/dailei.jpg"),
'排水类':require('@/assets/beng.jpg'),
'土工布类':require('@/assets/tugongbu.jpg'),
'动力及照明类':require('@/assets/zhaoming.jpg'),
'移动泵车':require('@/assets/bengche.jpg'),
'桩类':require('@/assets/zhuanglei.jpg'),
'砂石类':require('@/assets/shashi.jpg'),
},
}
},
computed: {
chartData() {
return this.chartDataMap[this.activeType]
}
},
watch: {
},
mounted() {
this.getChartData()
this.$store.dispatch('app/closeSideBar', {
withoutAnimation: false
})
this.setRem()
this.calculateScreenSize()
window.addEventListener('resize', this.calculateScreenSize)
},
beforeRouteLeave(to, from, next) {
this.$store.dispatch('app/toggleSideBar')
next()
},
beforeDestroy() {
window.removeEventListener('resize', this.calculateScreenSize)
clearInterval(this.autoTimer)
clearTimeout(this.resumeTimer)
},
methods: {
//
async getChartData() {
const res = await fenleiCharts()
const home = await homeCharts()
//
this.topObj.map(item => {
item.value = home.top[item.id]
})
this.xData = []
import Bar3DChart from '../jsc/components/barChart.vue'
import fenleiChart from '../jsc/components/fenleiChart.vue'
import Pie3DChart from '../jsc/components/pieChart.vue'
import echartsMap from './components/mapChart.vue'
import WarehouseTable from './components/WarehouseTable.vue'
this.yData = []
this.todoList.map(item => {
this.xData.push(item.value)
this.yData.push(home.rate[item.id])
})
console.log(this.xData, this.yData)
res.upList.map(item=>{
item.img = this.imgList[item.name]
})
this.upList = this.mergeAndRename(res.upList)
console.log("this.upList",this.upList)
},
mergeAndRename(arr) {
const resultMap = new Map();
let pumpTotal = 0; //
let mobilePumpTotal = 0; //
let pumpUnit = ""; //
let pumpImg = this.imgList['排水类']
//
arr.forEach(item => {
const { name, total, unit, img } = item;
const value = total;
if (name === "排水类") {
pumpTotal += value;
// unitunit
if (!pumpUnit) pumpUnit = unit;
} else if (name === "移动泵车") {
mobilePumpTotal += value;
//
if (resultMap.has(name)) {
resultMap.get(name).value += value;
} else {
resultMap.set(name, { name, value, unit,img });
}
} else {
//
if (resultMap.has(name)) {
resultMap.get(name).value += value;
} else {
resultMap.set(name, { name, value, unit,img });
}
}
});
//
if (pumpTotal > 0) {
const finalPumpValue = pumpTotal - mobilePumpTotal;
resultMap.set("泵", { name: "泵", value: finalPumpValue, unit: pumpUnit,img:pumpImg });
}
return Array.from(resultMap.values());
},
import {
fenleiCharts,
homeCharts,
setRem() {
// 使100px
const baseSize = 100
const baseVal = baseSize / 1920
const vW = window.innerWidth //
const rem = vW * baseVal // ,font-size
window.$size = rem / 100
document.documentElement.style.fontSize = rem + 'px'
} from '@/api/charts.js'
export default {
components: {
Bar3DChart,
Pie3DChart,
echartsMap,
fenleiChart,
WarehouseTable
},
calculateScreenSize() {
this.screenWidth = window.innerWidth
this.screenHeight = window.innerHeight
this.bgStyle = {
width: this.screenWidth - 56 + 'px',
height: this.screenHeight + 'px',
position: 'relative',
left: '-20px'
// top:'-60px'
data() {
return {
screenWidth: 0,
screenHeight: 0,
bgStyle: {
width: 0,
height: 0
},
contentStyle: {
width: 0,
height: 0
},
upList: [],
upListByFloodMaterials: [],
topObj: [{
label: '仓库数量',
value: 0,
id: 'cangku_count',
unit: '间'
}, {
label: '物资种类',
value: 0,
id: 'wuzizhonglei_count',
unit: '类'
},
// {
// label: '',
// value: 0,
// id: 'chuku_month_count'
// }, {
// label: '',
// value: 0,
// id: 'ruku_month_count'
// },
{
label: '本年度市级调度',
value: 0,
id: 'yingjidiaodu_count',
unit: '次'
}, {
label: '队伍数量',
value: 0,
id: 'team_count',
unit: '个'
}, {
label: '队伍出动人次',
value: 0,
id: 'team_article_total',
unit: '人次'
}
// {
// label: '',
// value: 0,
// id: 'shebei_count'
// }, {
// label: '',
// value: 0,
// id: 'pan_count'
// }, {
// label: '',
// value: 0,
// id: 'weihu_count'
// },
],
bottomObj: [{
label: '库存管理',
path: '/views/inventorys'
}, {
label: '入库管理',
path: '/stocks/index_purchase'
}, {
label: '出库管理',
path: '/outbounds/index_receive'
}, {
label: '统计报表',
path: '/reports/stocks'
}, {
label: '应急防御',
path: '/books/index'
}, {
label: '盘点管理',
path: '/inventorys/stocktaking'
}, {
label: '运维管理',
path: '/maintenance/maintenance_records'
}, {
label: '工单管理',
path: '/flood/plan'
}],
//
activeType: '市级',
autoSwitchTimer: null,
resumeTimer: null,
userInteracted: false,
apiData: [],
chartDataMap: {},
typeList: [],
autoTimer: null, //
resumeTimer: null, //
xData: [],
yData: [],
todoList: [{
id: 'gongdan',
value: '调令'
}, {
id: 'pandian',
value: '盘点'
}, {
id: 'weihu',
value: '维护'
}],
imgList: {
'袋类': require("@/assets/dailei.jpg"),
'排水类': require('@/assets/beng.jpg'),
'土工布类': require('@/assets/tugongbu.jpg'),
'动力及照明类': require('@/assets/zhaoming.jpg'),
'移动泵车': require('@/assets/bengche.jpg'),
'桩类': require('@/assets/zhuanglei.jpg'),
'砂石类': require('@/assets/shashi.jpg'),
},
}
this.contentStyle = {
width: this.screenWidth - 70 + 'px',
height: this.screenHeight - 20 + 'px'
},
computed: {
chartData() {
return this.chartDataMap[this.activeType]
}
},
toUrl(path) {
this.$router.push(path)
watch: {
},
mounted() {
this.getChartData()
this.$store.dispatch('app/closeSideBar', {
withoutAnimation: false
})
this.setRem()
this.calculateScreenSize()
window.addEventListener('resize', this.calculateScreenSize)
},
beforeRouteLeave(to, from, next) {
this.$store.dispatch('app/toggleSideBar')
next()
},
beforeDestroy() {
window.removeEventListener('resize', this.calculateScreenSize)
this.clearAutoSwitch();
if (this.resumeTimer) clearTimeout(this.resumeTimer);
},
methods: {
//
startAutoSwitch() {
this.clearAutoSwitch();
this.autoSwitchTimer = setInterval(() => {
this.activeType = this.activeType === '市级' ? '全市' : '市级';
}, 5000);
},
//
clearAutoSwitch() {
if (this.autoSwitchTimer) {
clearInterval(this.autoSwitchTimer);
this.autoSwitchTimer = null;
}
},
//
onTypeClick(type) {
if (this.activeType !== type) {
this.activeType = type;
}
this.clearAutoSwitch();
this.userInteracted = true;
// 10
if (this.resumeTimer) clearTimeout(this.resumeTimer);
this.resumeTimer = setTimeout(() => {
this.userInteracted = false;
this.startAutoSwitch();
}, 10000);
},
//
async getChartData() {
const res = await fenleiCharts()
const home = await homeCharts()
//
this.topObj.map(item => {
item.value = home.top[item.id]
})
this.xData = []
this.yData = []
this.todoList.map(item => {
this.xData.push(item.value)
this.yData.push(home.rate[item.id])
})
console.log(this.xData, this.yData)
res.upList.map(item => {
item.img = this.imgList[item.name]
})
this.upList = this.mergeAndRename(res.upList)
res.upListByFloodMaterials.map(item => {
item.img = this.imgList[item.name]
})
this.upListByFloodMaterials = this.mergeAndRename(res.upListByFloodMaterials)
this.startAutoSwitch();
},
mergeAndRename(arr) {
const resultMap = new Map();
let pumpTotal = 0; //
let mobilePumpTotal = 0; //
let pumpUnit = ""; //
let pumpImg = this.imgList['排水类']
//
arr.forEach(item => {
const {
name,
total,
unit,
img
} = item;
const value = total;
if (name === "排水类") {
pumpTotal += value;
// unitunit
if (!pumpUnit) pumpUnit = unit;
} else if (name === "移动泵车") {
mobilePumpTotal += value;
//
if (resultMap.has(name)) {
resultMap.get(name).value += value;
} else {
resultMap.set(name, {
name,
value,
unit,
img
});
}
} else {
//
if (resultMap.has(name)) {
resultMap.get(name).value += value;
} else {
resultMap.set(name, {
name,
value,
unit,
img
});
}
}
});
//
if (pumpTotal > 0) {
const finalPumpValue = pumpTotal - mobilePumpTotal;
resultMap.set("泵", {
name: "泵",
value: finalPumpValue,
unit: pumpUnit,
img: pumpImg
});
}
return Array.from(resultMap.values());
},
setRem() {
// 使100px
const baseSize = 100
const baseVal = baseSize / 1920
const vW = window.innerWidth //
const rem = vW * baseVal // ,font-size
window.$size = rem / 100
document.documentElement.style.fontSize = rem + 'px'
},
calculateScreenSize() {
this.screenWidth = window.innerWidth
this.screenHeight = window.innerHeight
this.bgStyle = {
width: this.screenWidth - 56 + 'px',
height: this.screenHeight + 'px',
position: 'relative',
left: '-20px'
// top:'-60px'
}
this.contentStyle = {
width: this.screenWidth - 70 + 'px',
height: this.screenHeight - 20 + 'px'
}
},
toUrl(path) {
this.$router.push(path)
}
}
}
}
}
</script>
<style lang="scss" scoped>
@ -383,6 +453,7 @@ export default {
// flex-wrap: wrap;
&-left {
// height: 400px;
&-title {
color: #6dcde6;
@ -390,35 +461,47 @@ export default {
font-weight: bold;
margin-bottom: 10px;
font-size: 16px;
display: flex;
align-items: center;
justify-content: center;
&>div {
margin-left: 15px;
}
}
&-content{
width: 450px;
display:flex;
flex-wrap: wrap;
&>div{
flex-basis: 50%;
text-align: left;
margin:10px 0;
color:#fff;
font-size: 16px;
display: flex;
align-items: center;
&>img{
width:30px;
height:30px;
margin-right:10px;
}
}
&-content {
width: 450px;
display: flex;
flex-wrap: wrap;
&>div {
flex-basis: 50%;
text-align: left;
margin: 10px 0;
color: #fff;
font-size: 16px;
display: flex;
align-items: center;
&>img {
width: 30px;
height: 30px;
margin-right: 10px;
}
}
}
.custom-btn {
background: #0b1b3a;
color: #19eaff;
border: none;
border-radius: 12px;
padding: 10px 15px;
padding: 5px 15px;
font-size: 14px;
cursor: pointer;
transition: background 0.2s, color 0.2s;
margin-right: 15px;
}
.custom-btn.active {

@ -0,0 +1,492 @@
<template>
<div class="jsc" :style="bgStyle">
<div class="jscC">
<div class="jscC-top">
<div v-for="item in topObj">
<div class="label">{{ item.label }}</div>
<div class="value">
{{ item.value }} <span style="font-size: 0.2rem;">{{item.unit?item.unit:''}}</span>
<!-- <CountUp :end="item.value" :duration="6" ref="count" /> -->
</div>
</div>
</div>
<div class="jscC-center">
<div class="jscC-center-left">
<div class="jscC-center-top">
<div class="jscC-center-left-title">年度物资动态</div>
<WarehouseTable></WarehouseTable>
</div>
<!-- <Pie3DChart :data="upList"></Pie3DChart> -->
<div class="jscC-center-left-title">
<span>重要防汛物资</span>
<div>
<span :class="['custom-btn', { active: activeType === '市级' }]" @click="onTypeClick('市级')"></span>
<span :class="['custom-btn', { active: activeType === '全市' }]" @click="onTypeClick('全市')"></span>
</div>
</div>
<div class="jscC-center-left-content">
<div v-if="activeType === '市级'" v-for="item in upList">
<img :src="item.img" alt="">
<span>{{item.name}}</span>
<span>{{item.value}}{{item.unit?item.unit:''}}</span>
</div>
<div v-if="activeType === '全市'" v-for="item in upListByFloodMaterials">
<img :src="item.img" alt="">
<span>{{item.name}}</span>
<span>{{item.value}}{{item.unit?item.unit:''}}</span>
</div>
</div>
</div>
<div class="jscC-center-center">
<echartsMap :mapStyle="'width:900px;height:650px;position: relative;'" ref="echartsMap" />
</div>
</div>
</div>
</div>
</template>
<script>
import Bar3DChart from '../jsc/components/barChart.vue'
import echartsMap from './components/mapChart.vue'
import WarehouseTable from './components/WarehouseTable.vue'
import {
fenleiCharts,
homeCharts,
} from '@/api/charts.js'
export default {
components: {
Bar3DChart,
echartsMap,
WarehouseTable
},
data() {
return {
screenWidth: 0,
screenHeight: 0,
bgStyle: {
width: 0,
height: 0
},
contentStyle: {
width: 0,
height: 0
},
upList: [],
upListByFloodMaterials: [],
topObj: [{
label: '仓库数量',
value: 0,
id: 'cangku_count',
unit: '间'
}, {
label: '物资种类',
value: 0,
id: 'wuzizhonglei_count',
unit: '类'
},
// {
// label: '',
// value: 0,
// id: 'chuku_month_count'
// }, {
// label: '',
// value: 0,
// id: 'ruku_month_count'
// },
{
label: '本年度市级调度',
value: 0,
id: 'yingjidiaodu_count',
unit: '次'
}, {
label: '队伍数量',
value: 0,
id: 'team_count',
unit: '个'
}, {
label: '队伍出动人次',
value: 0,
id: 'team_article_total',
unit: '人次'
}
// {
// label: '',
// value: 0,
// id: 'shebei_count'
// }, {
// label: '',
// value: 0,
// id: 'pan_count'
// }, {
// label: '',
// value: 0,
// id: 'weihu_count'
// },
],
//
activeType: '市级',
autoSwitchTimer: null,
resumeTimer: null,
userInteracted: false,
apiData: [],
chartDataMap: {},
typeList: [],
autoTimer: null, //
resumeTimer: null, //
xData: [],
yData: [],
todoList: [{
id: 'gongdan',
value: '调令'
}, {
id: 'pandian',
value: '盘点'
}, {
id: 'weihu',
value: '维护'
}],
imgList: {
'袋类': require("@/assets/dailei.jpg"),
'排水类': require('@/assets/beng.jpg'),
'土工布类': require('@/assets/tugongbu.jpg'),
'动力及照明类': require('@/assets/zhaoming.jpg'),
'移动泵车': require('@/assets/bengche.jpg'),
'桩类': require('@/assets/zhuanglei.jpg'),
'砂石类': require('@/assets/shashi.jpg'),
},
}
},
computed: {
chartData() {
return this.chartDataMap[this.activeType]
}
},
watch: {
},
mounted() {
this.getChartData()
this.$store.dispatch('app/closeSideBar', {
withoutAnimation: false
})
this.setRem()
this.calculateScreenSize()
window.addEventListener('resize', this.calculateScreenSize)
},
beforeRouteLeave(to, from, next) {
this.$store.dispatch('app/toggleSideBar')
next()
},
beforeDestroy() {
window.removeEventListener('resize', this.calculateScreenSize)
this.clearAutoSwitch();
if (this.resumeTimer) clearTimeout(this.resumeTimer);
},
methods: {
//
startAutoSwitch() {
this.clearAutoSwitch();
this.autoSwitchTimer = setInterval(() => {
this.activeType = this.activeType === '市级' ? '全市' : '市级';
}, 5000);
},
//
clearAutoSwitch() {
if (this.autoSwitchTimer) {
clearInterval(this.autoSwitchTimer);
this.autoSwitchTimer = null;
}
},
//
onTypeClick(type) {
if (this.activeType !== type) {
this.activeType = type;
}
this.clearAutoSwitch();
this.userInteracted = true;
// 10
if (this.resumeTimer) clearTimeout(this.resumeTimer);
this.resumeTimer = setTimeout(() => {
this.userInteracted = false;
this.startAutoSwitch();
}, 10000);
},
//
async getChartData() {
const res = await fenleiCharts()
const home = await homeCharts()
//
this.topObj.map(item => {
item.value = home.top[item.id]
})
this.xData = []
this.yData = []
this.todoList.map(item => {
this.xData.push(item.value)
this.yData.push(home.rate[item.id])
})
console.log(this.xData, this.yData)
res.upList.map(item => {
item.img = this.imgList[item.name]
})
this.upList = this.mergeAndRename(res.upList)
res.upListByFloodMaterials.map(item => {
item.img = this.imgList[item.name]
})
this.upListByFloodMaterials = this.mergeAndRename(res.upListByFloodMaterials)
this.startAutoSwitch();
},
mergeAndRename(arr) {
const resultMap = new Map();
let pumpTotal = 0; //
let mobilePumpTotal = 0; //
let pumpUnit = ""; //
let pumpImg = this.imgList['排水类']
//
arr.forEach(item => {
const {
name,
total,
unit,
img
} = item;
const value = total;
if (name === "排水类") {
pumpTotal += value;
// unitunit
if (!pumpUnit) pumpUnit = unit;
} else if (name === "移动泵车") {
mobilePumpTotal += value;
//
if (resultMap.has(name)) {
resultMap.get(name).value += value;
} else {
resultMap.set(name, {
name,
value,
unit,
img
});
}
} else {
//
if (resultMap.has(name)) {
resultMap.get(name).value += value;
} else {
resultMap.set(name, {
name,
value,
unit,
img
});
}
}
});
//
if (pumpTotal > 0) {
const finalPumpValue = pumpTotal - mobilePumpTotal;
resultMap.set("泵", {
name: "泵",
value: finalPumpValue,
unit: pumpUnit,
img: pumpImg
});
}
return Array.from(resultMap.values());
},
setRem() {
// 使100px
const baseSize = 100
const baseVal = baseSize / 1920
const vW = window.innerWidth //
const rem = vW * baseVal // ,font-size
window.$size = rem / 100
document.documentElement.style.fontSize = rem + 'px'
},
calculateScreenSize() {
this.screenWidth = window.innerWidth
this.screenHeight = window.innerHeight
this.bgStyle = {
width: this.screenWidth + 'px',
height: this.screenHeight + 'px',
position: 'relative',
left: '0px'
// top:'-60px'
}
this.contentStyle = {
width: this.screenWidth + 'px',
height: this.screenHeight + 'px'
}
},
toUrl(path) {
this.$router.push(path)
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .app-main {
padding: 0 !important
}
.jsc {
height: 100%;
// background: url(../../assets/jsc/bg.png) no-repeat center top;
background: #05296f;
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 10px;
padding-top: 0;
.jscC {
width: 100%;
height: 100%;
background: url(../../assets/jsc/contentBg.png) no-repeat center top;
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
padding-top: .7rem;
&-top {
width: 17.67rem;
height: 1.52rem;
padding: 0 .4rem;
// height: 100%;
background: url(../../assets/jsc/topbg.png) no-repeat center top;
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: space-between;
.label {
font-size: .2rem;
text-align: center;
color: #fff;
}
.value {
font-size: .38rem;
text-align: center;
color: #7ff7fe;
font-weight: bolder;
}
}
&-center {
width: 17.67rem;
// height: 1.52rem;
padding: 0 .2rem;
display: flex;
align-items: center;
justify-content: space-between;
// flex-wrap: wrap;
&-left {
// height: 400px;
&-title {
color: #6dcde6;
text-align: center;
font-weight: bold;
margin-bottom: 10px;
font-size: 16px;
display: flex;
align-items: center;
justify-content: center;
&>div {
margin-left: 15px;
}
}
&-content {
width: 450px;
display: flex;
flex-wrap: wrap;
&>div {
flex-basis: 50%;
text-align: left;
margin: 10px 0;
color: #fff;
font-size: 16px;
display: flex;
align-items: center;
&>img {
width: 30px;
height: 30px;
margin-right: 10px;
}
}
}
.custom-btn {
background: #0b1b3a;
color: #19eaff;
border: none;
border-radius: 12px;
padding: 5px 15px;
font-size: 14px;
cursor: pointer;
transition: background 0.2s, color 0.2s;
margin-right: 15px;
}
.custom-btn.active {
background: linear-gradient(90deg, #3ad0ff 0%, #4be3c1 100%);
color: #fff;
box-shadow: 0 2px 12px 0 rgba(58, 208, 255, 0.2);
}
}
&-center {
width: 10.3rem;
}
&-right {}
}
&-bottom {
font-size: .22rem;
color: #fff;
width: 17.67rem;
padding: .2rem;
display: flex;
align-items: center;
justify-content: space-between;
&>div {
width: 1.57rem;
height: 1.57rem;
background: url(../../assets/jsc/icon.png) no-repeat center top;
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
}
}
}
</style>

@ -195,6 +195,7 @@
</div>
</div>
</template>
<template v-slot:footerContent>
<el-button v-if="activeStep > 0" @click="prevStep"></el-button>
<el-button
@ -391,6 +392,9 @@ import {
import {
desChuku
} from '@/api/system/log.js'
import {
getOatoken
} from '@/api/contract.js'
import inventorysSelect from '@/views/component/inventorysSelect.vue'
import {
Message
@ -530,14 +534,15 @@ export default {
prop: 'huikushijian',
width: 120
}
],
],
wuziguanli_oatoken:''
}
},
watch: {
isShow(newVal) {
if (newVal) {
this.titleName = this.type === 'add' ? `新增${this.chukuType}出库` : (this.type === 'editor'
? `编辑${this.chukuType}出库` : '出库')
this.titleName = this.type === 'add' ? `新增${this.chukuType}` : (this.type === 'editor'
? `编辑${this.chukuType}` : '出库')
this.form.chukuleixing = this.chukuType
if (this.type === 'editor' || this.type === 'outbounds') {
this.getDetail()
@ -559,6 +564,9 @@ export default {
this.headers.token = getToken()
this.getCangku()
this.getWorkOrder()
getOatoken().then(res => {
this.wuziguanli_oatoken = res.oatoken
})
},
methods: {
//
@ -899,6 +907,28 @@ export default {
}
}
return false
},
async toOaFollow(res, type) {
let typeid = ''
const typeObj = JSON.parse(process.env.VUE_APP_OA_URL_TYPE)
console.log("typeObj",typeObj,type)
for (var k in typeObj) {
if (k == type) {
typeid = parseInt(typeObj[k])
}
}
let default_json = {
outbounds_id:res.id,
chukuriqi:res.chukushijian,
jieyongbumen:res.jieyongbumen,
jingbanren:res.jilurenyuan,
beizhu:res.beizhu,
wuzixinxidan:res.zuozhengwenjian.join(',')
// jieyongcangku:''
}
const url =
`${process.env.VUE_APP_OA_URL}/admin/flow/create/${typeid}?wuziguanli_oatoken=${this.wuziguanli_oatoken}&&outbounds_id=${res.id}&default_json=${JSON.stringify(default_json)}`
const seeBuy = window.open(url, '_blank')
},
submit() {
console.log('this.mingxiList', this.mingxiList)
@ -929,6 +959,9 @@ export default {
table_name: this.tableName,
...this.form
}).then(res => {
if(this.$route.query.oaType==='wuzi' || this.type==='add'){
this.toOaFollow(res,this.chukuType)
}
Message({
type: 'success',
message: '新增成功'

@ -6,7 +6,7 @@
<Button type="primary" @click="editorChuku('','add','调令出库')"></Button>
</div>
<div ref="lxHeader">
<lx-header icon="md-apps" :text="`出库管理`" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<slot>
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<el-input v-model="select.keyword" style="width: 200px;margin-right: 10px;" placeholder="经办人搜索" />
@ -260,6 +260,9 @@ export default {
// table: tableName
// })
// }
if(this.$route.query.oaType==='wuzi'){
this.editorChuku('','add',this.$route.query.chukuType)
}
this.getUserName()
this.getindex()
getOatoken().then(res => {

@ -499,8 +499,15 @@
this.$emit('refresh')
this.isShow = false
}else{
if(this.$route.query.oaType==='wuzi'){
this.toOaFollow()
this.resetForm()
this.$emit('refresh')
this.isShow = false
}else{
this.activeStep++
}
this.activeStep++
}
})
},

@ -8,7 +8,7 @@
<Button type="primary" @click="editorRuku('','add','归还入库')"></Button>
</div>
<div ref="lxHeader">
<lx-header icon="md-apps" text="入库管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<slot>
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<Input v-model="select.keyword" style="width: 200px;margin-right: 10px;" placeholder="经办人搜索" />
@ -261,12 +261,16 @@
]
}
},
mounted() {
mounted() {
if(this.$route.query.oaType==='wuzi'){
this.editorRuku('','add',this.$route.query.rukuType)
}
this.getUserName()
this.getindex()
getOatoken().then(res => {
this.wuziguanli_oatoken = res.oatoken
})
})
},
methods: {
async getUserName() {
@ -303,7 +307,6 @@
'op': 'like',
'value': this.select.zhuangtai ? this.select.zhuangtai : (this.select.zhuangtai === 0 ? 0 : '')
}
]
})
this.list = res.data

@ -2,7 +2,7 @@
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" text="防汛物资管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<slot>
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<Input v-model="select.keyword" style="width: 200px;margin-right: 10px;" placeholder="关键词搜索" />
@ -14,9 +14,9 @@
<Select v-model="select.guanliancangku" style="width:200px;margin-right: 10px;" placeholder="所在仓库" clearable>
<Option v-for="item in cangkuList" :key="item.value" :value="item.id">{{ item.cangkumingcheng }}</Option>
</Select>
<Select v-model="select.area" style="width: 200px;margin-right: 10px;" placeholder="所在区域" clearable @on-change="clearArea">
<!-- <Select v-model="select.area" style="width: 200px;margin-right: 10px;" placeholder="所在区域" clearable @on-change="clearArea">
<Option v-for="item in areaList" :key="item.id" :value="item.id">{{ item.value }}</Option>
</Select>
</Select> -->
<Button type="primary" @click="getindex('page')"></Button>
<Button
type="primary"
@ -257,6 +257,14 @@ export default {
field: item.prop,
name: item.label
})
})
this.importForm.unshift({
filed:'二级分类',
name:'二级分类'
})
this.importForm.unshift({
filed:'一级分类',
name:'一级分类'
})
console.log('importForm', this.importForm)
},
@ -277,7 +285,7 @@ export default {
const res = await index({
page_size: 999,
page: 1,
table_name: 'flood_storages'
table_name: 'materialstorages'
})
this.cangkuList = res.data
},

@ -0,0 +1,173 @@
<template>
<div>
<xy-dialog ref="dialog" :width="70" :is-show.sync="isShow" type="form" :title="type==='add'?'新增队伍动态':'编辑队伍动态'"
:form="form" :rules="rules" @submit="submit">
<template v-slot:start_date>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>开始日期
</div>
<div class="xy-table-item-content">
<el-date-picker format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="form.start_date" style="width:300px" type="date" placeholder="选择日期">
</el-date-picker>
</div>
</div>
</template>
<template v-slot:end_date>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;" />结束日期
</div>
<div class="xy-table-item-content">
<el-date-picker format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="form.end_date" style="width:300px" type="date" placeholder="选择日期">
</el-date-picker>
</div>
</div>
</template>
<template v-slot:team_ids>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;" />出动队伍
</div>
<div class="xy-table-item-content">
<el-select v-model="form.team_ids" multiple style="width:300px" placeholder="请选择">
<el-option v-for="item in teamList" :key="item.id" :label="item.mingcheng" :value="item.id" />
</el-select>
</div>
</div>
</template>
<template v-slot:total>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;" />出动人数
</div>
<div class="xy-table-item-content">
<el-input v-model="form.total" type="number" style="width:300px" />
</div>
</div>
</template>
<template v-slot:destination>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;" />目的地
</div>
<div class="xy-table-item-content">
<el-input v-model="form.destination" style="width:300px" />
</div>
</div>
</template>
</xy-dialog>
</div>
</template>
<script>
import {
save,
show,
} from '@/api/teamUpdate.js'
import {
index
} from '@/api/system/baseForm.js'
import {
Message
} from 'element-ui'
export default {
data() {
return {
isShow: false,
type: 'add',
id: '',
form: {
start_date: '',
end_date: '',
team_ids: '',
total: '',
destination: '',
},
teamList: [],
rules: {
start_date: [{
required: true,
message: '请选择开始日期'
}],
total: [{
required: true,
message: '请输入出动人数'
}]
}
}
},
watch: {
isShow(newVal) {
if (newVal) {
if (this.type === 'editor') {
this.getDetail()
}
} else {
this.id = ''
this.type = ''
this.$refs['dialog'].reset()
}
},
},
created() {
this.getTeams()
},
methods: {
async getTeams() {
const res = await index({
table_name: 'teams',
page: 1,
page_size: 999
})
this.teamList = res.data
},
async getDetail() {
const res = await show({
id: this.id
})
this.$integrateData(this.form, res)
},
submit() {
if (this.type === 'add') {
save({
...this.form
}).then(res => {
Message({
type: 'success',
message: '新增成功'
})
this.$emit('refresh')
this.isShow = false
})
return
}
if (this.type === 'editor') {
save({
id: this.id,
...this.form
}).then(res => {
Message({
type: 'success',
message: '编辑成功'
})
this.$emit('refresh')
this.isShow = false
})
}
}
}
}
</script>
<style scoped lang="scss">
::v-deep .xy-table-item-label {
min-width: 160px !important
}
</style>

@ -1,7 +1,7 @@
<template>
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" text="基础信息" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<slot>
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<Input v-model="select.keyword" style="width: 200px;margin-right: 10px;" placeholder="名称搜索" />

@ -0,0 +1,155 @@
<template>
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<slot>
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<Input v-model="select.keyword" style="width: 200px;margin-right: 10px;" placeholder="名称搜索" />
<Button type="primary" @click="getList"></Button>
<Button
type="primary"
style="margin-left: 10px;"
@click="$refs['addTeamUpdate'].type='add',
$refs['addTeamUpdate'].isShow=true"
>添加</Button>
<!-- <Button icon="ios-add" type="primary" style="margin-left: 10px;"
@click="$refs['imports'].show()">导入</Button> -->
</div>
</slot>
</lx-header>
</div>
<xy-table
:list="list"
:total="total"
:table-item="table"
@pageSizeChange="pageSizeChange"
@pageIndexChange="pageChange"
>
<template v-slot:btns>
<el-table-column fixed="right" label="操作" width="260" header-align="center">
<template slot-scope="scope">
<div>
<Button
type="primary"
size="small"
@click="$refs['addTeamUpdate'].type='editor',
$refs['addTeamUpdate'].id=scope.row.id,
$refs['addTeamUpdate'].isShow=true"
>编辑</Button>
<Poptip transfer confirm title="确认要删除吗?" @on-ok="delRow(scope.row.id)">
<Button type="error" style="margin-left: 10px;" size="small" ghost>删除</Button>
</Poptip>
</div>
</template>
</el-table-column>
</template>
</xy-table>
<addTeamUpdate ref="addTeamUpdate" @refresh="getList" />
</div>
</template>
<script>
import {
index,
destroy
} from '@/api/teamUpdate.js'
import addTeamUpdate from './components/addTeamUpdate.vue'
export default {
components: {
addTeamUpdate,
},
data() {
return {
select: {
page: 1,
page_size: 10,
keyword: '',
},
total: 0,
list: [],
table: [{
label: '序号',
type: 'index',
fixed: 'left',
width: 80
}, {
label: '开始日期',
prop: 'start_date',
width: 120,
align: 'center',
}, {
label: '结束日期',
prop: 'end_date',
align: 'center',
width: 120
}, {
label: '出动队伍',
prop: 'team_ids',
align: 'left',
customFn:(row)=>{
if(row.team && row.team.length>0){
return row.team.map(item=>{
return(<div>{item.mingcheng}</div>)
})
}
}
}, {
label: '出动人次',
prop: 'total',
width: 120,
align: 'center',
}, {
label: '目的地',
prop: 'destination',
width: 240,
align: 'left',
}]
}
},
created() {
this.getList()
},
methods: {
async getList() {
const res = await index({
...this.select,
// filter: [{
// key: 'mingcheng',
// op: 'like',
// value: this.select.keyword
// }]
})
this.list = res.data
this.total = res.total
},
pageChange(e) {
this.select.page = e
this.getList()
},
pageSizeChange(e) {
this.select.page_size = e
this.getList()
},
delRow(id) {
if (id) {
destroy({
id: id,
table_name: this.select.table_name
}).then(res => {
this.$message({
type: 'success',
message: '删除成功'
})
this.getList()
})
}
}
}
}
</script>
<style>
</style>
Loading…
Cancel
Save