Commit d3c6430a authored by yaqizhang's avatar yaqizhang

初始

parent 65178c93
######################################################################
# Build Tools
.gradle
/build/
!gradle/wrapper/gradle-wrapper.jar
target/
!.mvn/wrapper/maven-wrapper.jar
######################################################################
# IDE
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
/target/
*.class
*.jar
*.log
/logs/*
/target/*
.settings*
### NetBeans ###
nbproject/private/
build/*
nbbuild/
dist/
nbdist/
.nb-gradle/
######################################################################
# Others
*.log
*.xml.versionsBackup
*.swp
!*/build/*.java
!*/build/*.html
!*/build/*.xml
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
NODE_ENV = "development"
BASE_URL = "./"
VUE_APP_PUBLIC_PATH = "./"
VUE_APP_API = "/"
\ No newline at end of file
NODE_ENV = "production"
BASE_URL = "./"
VUE_APP_PUBLIC_PATH = "./"
VUE_APP_API = "http://39.106.168.86:8902/ioc/"
\ No newline at end of file
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
This diff is collapsed.
{
"name": "iocsystem",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"crm": "vue-cli-service build --mode crm"
},
"dependencies": {
"@types/axios": "^0.14.0",
"axios": "^0.19.0",
"core-js": "^3.4.4",
"element-ui": "^2.13.0",
"print-js": "^1.6.0",
"vue": "^2.6.10",
"vue-amap": "^0.5.10",
"vue-class-component": "^7.0.2",
"vue-print-nb": "^1.7.4",
"vue-property-decorator": "^8.3.0",
"vue-router": "^3.1.3",
"vuex": "^3.1.2",
"vuex-class": "^0.3.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0",
"@vue/cli-plugin-typescript": "^4.4.1",
"@vue/cli-service": "^4.1.0",
"node-sass": "^4.14.1",
"sass-loader": "^8.0.2",
"typescript": "~3.5.3",
"vue-template-compiler": "^2.6.10"
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}
body{padding: 0;margin: 0;background: #f9f9f9;overflow-x: hidden;width: 100%;height: 100%;font-size:14px;}
body.childPage{padding: 20px;}
[v-cloak]{display: none !important;}
.fl{float: left;}
.fr{float: right;}
.cent{text-align: center;}
.colorM{color: #1abc9c;}
.colorR{color: #F8333A;}
.colorB{color: #409EFF;}
.colorSL{color: #008000;}
.colorP{color: #6833F8;}
.el-table th{background: #f9fafc;}
.el-table th,.el-table td{text-align: center;}
/* iframe{height: calc(100vh - 59px);} */
html{width: 100%;height: 100%;}
.hide{display: none;}
.marg10{margin-left: 10px;}
.margT10{margin-top: 10px;}
.iconfont{font-size: 20px;}
main > div{background: #ffffff;height:calc(100vh - 120px);padding: 0 10px;}
main > div .el-table{height:calc(100% - 120px);}
main > div .el-table .el-table__body-wrapper{height: calc(100% - 48px); overflow-y: auto;}
.userlist {
padding: 0 10px;
}
.topBar {
padding-top: 22px;
}
.el-pagination {
text-align: center;
padding-top: 20px;
}
.has-gutter tr th {
background: #f9fafc;
}
.el-dialog__body{max-height: 60vh;overflow: auto;}
.el-table__body .el-table__row td{
text-align: center;
}
.el-table__header .has-gutter th{
text-align: center;
}
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>logo.ico">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1602732_l5e0sunz3t9.css"><!--单色 icon-->
<link rel="stylesheet" href="//at.alicdn.com/t/font_2599243_4m2j3isfmht.css">
<script src="//at.alicdn.com/t/font_1767165_i3wsv6ptjfc.js"></script><!--彩色 svg icon-->
<link rel="stylesheet" href="css/common.css"><!--自定义样式-->
<!-- <script type="text/javascript"
src="https://webapi.amap.com/maps?v=1.4.15&key=c9e461c3b9bb660739ab7d11bf766bac"></script> -->
<title>应急联动综合管理服务平台</title>
</head>
<body>
<noscript>
<strong>We're sorry but iocsystem doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app">
</div>
<!-- built files will be auto injected -->
</body>
<script src="iceEditor-min.js"></script>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
<template>
<div id="app">
<router-view />
</div>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import {State, Mutation, Getter, Action} from 'vuex-class'
@Component({
components: {
},
})
export default class App extends Vue {
@Action('setUser') setUser:any;
created() {
}
}
</script>
<style lang="scss">
#app {
width: 100%;
height: 100%;
}
</style>
<template>
<el-cascader :options="options" :props="props" @change="handleChange" v-model="citytxt"></el-cascader>
</template>
<style lang="scss" scoped>
.el-cascader {
width: 100%;
}
</style>
<script lang="ts">
import { Component, Vue, Provide, Prop, Watch } from "vue-property-decorator";
import { State, Getter, Mutation, Action } from "vuex-class";
// let city = require('@/assets/citycode.json');
@Component({
components: {},
})
export default class Home extends Vue {
@Getter("signs") getsigns: any;
@Prop({
//父组件传来的值
type: Array,
default() {
return [];
},
})
public valueqv: any;
@Prop(Boolean) param!: Boolean;
@Provide() citytxt: any = [];
@Provide() options: Object = [];
@Provide() props: any = {
value: "id",
label: "label",
children: "children",
};
// @Watch("param") formChange(v: any) {
// this.citytxt = this.valueqv;
// }
handleChange(v: any) {
this.$emit("changeFun", v);
}
//获取省市县
getCityData() {
(this as any).$axios.get(`/district/getDistrictData`).then((res: any) => {
this.options = res;
if (localStorage.getItem("cityJson") == "undefined") {
localStorage.setItem("cityJson", JSON.stringify(res));
}
});
}
created() {
this.citytxt = this.valueqv;
let cityData = localStorage.getItem("cityJson");
console.log( cityData )
if (cityData) {
this.options = JSON.parse(cityData);
} else {
this.getCityData();
}
}
}
</script>
<template>
<div class="mapwrap">
<el-dialog
title="轨迹"
:visible.sync="dialogTrackVisible"
:show-close="false"
:close-on-click-modal="false"
id="mapcnt"
>
<el-row>
<div id="mapContainer">
<el-amap
ref="map"
vid="amapDemo"
:center="mapCenter"
:zoom="zoom"
class="amap-demo"
>
<el-amap-marker
v-for="(item,index) in marker"
:vid="index"
:key="index"
:position="item.position"
></el-amap-marker>
</el-amap>
<el-amap-bezier-curve v-for="(line,index) in trackArr" :key="index" :events="line.events" :path="line.path" :stroke-color="line.strokeColor" :stroke-style="line.strokeStyle" :stroke-opacity="line.strokeOpacity"></el-amap-bezier-curve>
</div>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button @click="$emit('dialogCancel')">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<style lang="scss">
#mapcnt .el-dialog {
width: 90% !important;
}
.el-cascader {
width: 100%;
}
.lt .el-input {
width: 180px;
margin-right: 15px;
display: inline-block;
}
#mapContainer {
width: 100%;
height: 400px;
position: relative;
margin-top: 10px;
overflow: hidden;
}
.el-vue-amap-container {
width: 100%;
height: 100%;
}
.search-box {
position: absolute !important;
top: 10px;
left: 10px;
}
#searchbar input {
padding: 5px;
border: 1px solid royalblue;
border-radius: 5px;
min-width: 150px;
}
</style>
<script lang="ts">
import { Component, Vue, Provide, Prop ,Watch} from "vue-property-decorator";
@Component({
components: {}
})
export default class MapDialog extends Vue {
@Prop(Boolean) dialogTrackVisible!: Boolean;
@Prop(String) soldierId : String = '';
@Provide() zoom: Number = 12;
@Provide() searchOption: Object = {
city: "石家庄",
citylimit: true
};
@Provide() mapCenter: any = [114.2, 38.25];//
@Provide() marker: any = [];
@Provide() mapvisible: Boolean = true;
// @Provide() events: Object = {};
@Provide() trackArr:any = [
{
path: [
[116.39, 39.91, 116.37, 39.91],
[116.380298, 39.907771, 116.38, 39.90],
[116.385298, 39.907771, 116.40, 39.90]
],
strokeDasharray: [10, 10],
strokeColor: "#FF33FF", //线颜色
strokeOpacity: 1, //线透明度
strokeWeight: 3, //线宽
strokeStyle: "solid", //线样式
events: {
click: () => {
alert('click');
}
}
}
];
@Provide() lineOptions:any = {
events:{},
path:[],
strokeColor:'#ff0000',
strokeOpacity:'1',
strokeStyle:'dashed',
showDir:true
}
@Provide() pathArr:any;
@Watch('soldierId') change(val:any){
this.getTrack(val)
}
addMarker(lng: any, lat: any) {
let obj = {
position: [lng, lat]
};
this.marker = [];
this.marker.push(obj);
}
onSearchResult(pois: any) {
let latSum = 0;
let lngSum = 0;
this.marker = [];
if (pois.length > 0) {
pois.forEach((poi: any) => {
let { lng, lat } = poi;
lngSum += lng;
latSum += lat;
this.marker.push({
position: [poi.lng, poi.lat]
});
});
let center = {
lng: lngSum / pois.length,
lat: latSum / pois.length
};
this.mapCenter = [center.lng, center.lat];
}
}
getTrack(soldierId:any){//获取轨迹点数据
let that = this,darr:any = [];
(that as any).$axios.get(`api/soldierInfo/getSoldierTrackBySoldierId/${soldierId}`).then((res:any) => {
if( res.length == 0){
(that as any).$message({
message: '没有轨迹!',
type: 'warning'
});
}else{
that.trackArr = res;
that.trackArr.forEach((ele:any) => {
darr.push([ele.longitude,ele.latitude])
});
that.pathArr = darr;
// that.drawTrack()
}
})
}
cancel() {}
created() {
}
}
</script>
\ No newline at end of file
<template>
<div class="mapwrap">
<el-dialog
title="拾取坐标"
:visible.sync="dialogTableVisible"
:show-close="false"
:close-on-click-modal="false"
id="mapcnt"
>
<el-row class="lt">
经纬度:
<el-input placeholder="经度" v-model="lnglat.lng" type="number"></el-input>
<el-input placeholder="纬度" v-model="lnglat.lat" type="number"></el-input>
<el-button type="primary" size="small" @click="confirmFun">确定</el-button>
<el-button size="small" @click="$emit('dialogcancelFun')">取消</el-button>
</el-row>
<el-row>
<div id="mapContainer">
<el-amap-search-box
class="search-box"
:search-option="searchOption"
:on-search-result="onSearchResult"
></el-amap-search-box>
<el-amap
ref="map"
vid="amapDemo"
:center="mapCenter"
:zoom="zoom"
:events="events"
class="amap-demo"
>
<el-amap-marker
v-for="(item,index) in marker"
:vid="index"
:key="index"
:position="item.position"
></el-amap-marker>
</el-amap>
<!-- <el-amap ref="map" vid="amap-vue" :center="mapCenter" :events="events" :zoom="zoom" class="amap-box" >
<el-amap-marker v-for="(item,index) in marker" :vid="index" :position="item.position"></el-amap-marker>
</el-amap>-->
</div>
</el-row>
</el-dialog>
</div>
</template>
<style lang="scss">
#mapcnt .el-dialog {
width: 90% !important;
}
.el-cascader {
width: 100%;
}
.lt .el-input {
width: 180px;
margin-right: 15px;
display: inline-block;
}
#mapContainer {
width: 100%;
height: 400px;
position: relative;
margin-top: 10px;
overflow: hidden;
}
.el-vue-amap-container {
width: 100%;
height: 100%;
}
.search-box {
position: absolute !important;
top: 10px;
left: 10px;
}
#searchbar input {
padding: 5px;
border: 1px solid royalblue;
border-radius: 5px;
min-width: 150px;
}
</style>
<script lang="ts">
import { Component, Vue, Provide, Prop } from "vue-property-decorator";
@Component({
components: {}
})
export default class Mapdialog extends Vue {
@Prop(Number) slat!: Number;
@Prop(Number) slng!: Number;
@Prop(Boolean) dialogTableVisible!: Boolean;
@Provide() zoom: Number = 12;
@Provide() lnglat: any = {
lng: 0,
lat: 0
};
@Provide() searchOption: Object = {
city: "新乐市",
citylimit: true
};
@Provide() mapCenter: any = [114.72995, 38.37417];
@Provide() marker: any = [];
@Provide() mapvisible: Boolean = true;
@Provide() events: Object = {
click: (e: any) => {
this.addMarker(e.lnglat.lng, e.lnglat.lat);
this.mapCenter = [e.lnglat.lng, e.lnglat.lat];
this.lnglat.lng = e.lnglat.lng;
this.lnglat.lat = e.lnglat.lat;
}
};
addMarker(lng: any, lat: any) {
let obj = {
position: [lng, lat]
};
this.marker = [];
this.marker.push(obj);
}
onSearchResult(pois: any) {
let latSum = 0;
let lngSum = 0;
this.marker = [];
if (pois.length > 0) {
pois.forEach((poi: any) => {
let { lng, lat } = poi;
lngSum += lng;
latSum += lat;
this.marker.push({
position: [poi.lng, poi.lat]
});
});
let center = {
lng: lngSum / pois.length,
lat: latSum / pois.length
};
this.mapCenter = [center.lng, center.lat];
}
}
mapClick() {
alert("dfjgk");
}
confirmFun() {
this.$emit("dialogcancelFun");
this.$emit("confirm", { lng: this.lnglat.lng, lat: this.lnglat.lat });
}
cancel() {}
created() {
if (typeof this.slng == "number" && this.slng != 0) {
this.mapCenter = [this.slng, this.slat];
this.lnglat.lng = this.slng;
this.lnglat.lat = this.slat;
this.addMarker(this.slng, this.slat);
}
}
}
</script>
\ No newline at end of file
<template>
<div class="mapwrap">
<el-dialog
title="点击地图获取坐标"
:visible.sync="dialogTableVisible"
:show-close="false"
:close-on-click-modal="false"
id="mapcnt"
>
<el-row class="lt" style="margin-top:px">
<el-input placeholder="经度" style="width:40%;" v-model="lnglat.lng" type="number" disabled></el-input>
<el-input placeholder="纬度" style="width:40%;margin-left: 0px" v-model="lnglat.lat" type="number" disabled></el-input>
<el-button type="primary" size="small" @click="confirmFun">确定</el-button>
<el-button size="small" @click="$emit('dialogcancelFun')">取消</el-button>
</el-row>
<el-row>
<div id="mapContainer">
<!--<el-amap-search-box style="width: 250px;"-->
<!--class="search-box"-->
<!--:search-option="searchOption"-->
<!--:on-search-result="onSearchResult"-->
<!--&gt;</el-amap-search-box>-->
<el-amap
ref="map"
vid="amapDemo"
:center="mapCenter"
:zoom="zoom"
:events="events"
class="amap-demo"
>
<el-amap-marker
v-for="(item,index) in marker"
:vid="index"
:key="index"
:position="item.position"
></el-amap-marker>
</el-amap>
<!-- <el-amap ref="map" vid="amap-vue" :center="mapCenter" :events="events" :zoom="zoom" class="amap-box" >
<el-amap-marker v-for="(item,index) in marker" :vid="index" :position="item.position"></el-amap-marker>
</el-amap>-->
</div>
</el-row>
</el-dialog>
</div>
</template>
<style lang="scss">
#mapcnt .el-dialog {
width: 90% !important;
}
.el-cascader {
width: 100%;
}
.lt .el-input {
width: 180px;
margin-right: 15px;
display: inline-block;
}
#mapContainer {
width: 100%;
height: 400px;
position: relative;
margin-top: 10px;
overflow: hidden;
}
.el-vue-amap-container {
width: 100%;
height: 100%;
}
.search-box {
position: absolute !important;
top: 10px;
left: 10px;
}
#searchbar input {
padding: 5px;
border: 1px solid royalblue;
border-radius: 5px;
min-width: 150px;
}
</style>
<script lang="ts">
import { Component, Vue, Provide, Prop } from "vue-property-decorator";
@Component({
components: {}
})
export default class Mapdialog extends Vue {
@Prop(Number) slat!: Number;
@Prop(Number) slng!: Number;
@Prop(Boolean) dialogTableVisible!: Boolean;
@Provide() zoom: Number = 12;
@Provide() lnglat: any = {
lng: 0,
lat: 0
};
@Provide() searchOption: Object = {
city: "新乐市",
citylimit: true
};
@Provide() mapCenter: any = [114.72995, 38.37417];
@Provide() marker: any = [];
@Provide() mapvisible: Boolean = true;
@Provide() events: Object = {
click: (e: any) => {
this.addMarker(e.lnglat.lng, e.lnglat.lat);
this.mapCenter = [e.lnglat.lng, e.lnglat.lat];
this.lnglat.lng = e.lnglat.lng;
this.lnglat.lat = e.lnglat.lat;
}
};
addMarker(lng: any, lat: any) {
let obj = {
position: [lng, lat]
};
this.marker = [];
this.marker.push(obj);
}
onSearchResult(pois: any) {
let latSum = 0;
let lngSum = 0;
this.marker = [];
if (pois.length > 0) {
pois.forEach((poi: any) => {
let { lng, lat } = poi;
lngSum += lng;
latSum += lat;
this.marker.push({
position: [poi.lng, poi.lat]
});
});
let center = {
lng: lngSum / pois.length,
lat: latSum / pois.length
};
this.mapCenter = [center.lng, center.lat];
}
}
mapClick() {
alert("dfjgk");
}
confirmFun() {
this.$emit("dialogcancelFun");
this.$emit("confirm", { lng: this.lnglat.lng, lat: this.lnglat.lat });
}
cancel() {}
created() {
if (typeof this.slng == "number" && this.slng != 0) {
this.mapCenter = [this.slng, this.slat];
this.lnglat.lng = this.slng;
this.lnglat.lat = this.slat;
this.addMarker(this.slng, this.slat);
}
}
}
</script>
\ No newline at end of file
<template>
<div class="wrapper editwrap">
<el-dialog
:visible.sync="qxdialogVisible"
:title="'权限分配_' + roleName"
:show-close="false"
:close-on-click-modal="false"
>
<el-row :gutter="10">
<el-col :span="12">
<h4>菜单权限</h4>
<el-tree
:data="menuData"
show-checkbox
default-expand-all
ref="menuTree"
node-key="resourceId"
:props="Props"
:default-checked-keys="menuCheckedArr"
@check-change="menucheckchange"
></el-tree>
</el-col>
<el-col :span="12">
<h4>API权限</h4>
<el-tree
:data="apiData"
show-checkbox
default-expand-all
ref="apiTree"
:props="PropsB"
node-key="resourceId"
:default-checked-keys="apiCheckedArr"
@check-change="apicheckchange"
></el-tree>
</el-col>
</el-row>
<el-alert v-show="alertshow" title="请选择权限" show-icon type="warning" :closable="false"></el-alert>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="confirmFun()">确定</el-button>
<el-button @click="$emit('QXdialogFun')" size="small">取消</el-button>
</span>
</el-dialog>
</div>
</template>
<script lang="ts">
import { Component, Vue, Provide, Prop, Watch } from "vue-property-decorator";
@Component({
components: {}
})
export default class quan extends Vue {
@Prop(Boolean) qxdialogVisible!: Boolean;
@Prop(String) roleID!: String;
@Prop(String) roleName!: String;
//tree
@Provide() menuData: any = [];
@Provide() Props: Object = {
label: "menuName",
children: "childList"
};
@Provide() PropsB: Object = {
label: "resourceName",
children: "childList"
};
@Provide() apiData: any = [];
@Provide() menuCheckedArr: any = []; //默认选中节点
@Provide() apiCheckedArr: any = []; //默认选中节点
@Provide() menuTreeArr: any = []; //tree1选中节点
@Provide() apiTreeArr: any = []; //tree2选中节点
@Provide() allArr: any = [];//所有选中节点
@Provide() alertshow: Boolean = false;
@Watch("allArr") change(newVal: any) {
if (newVal.length == 0) this.alertshow = true;
else this.alertshow = false;
}
/*getMData(type: String) {
let that = this;
(this as any).$axios
.get(`/resource/getResourcesList/${type}`)
.then((res: any) => {
if (type == "MENU") {
that.menuData = res;
} else if (type == "REST-API") {
that.apiData = res;
}
});
}*/
getTreeData(type: String) {
let that = this;
(this as any).$axios
.get(`/role/getRoleResourcesByRoleId/${that.roleID}?resourceType=${type}`)
.then((res: any) => {
if (type == "MENU") {
that.menuData = res;
that.menuCheckedArr = that.getCheckedArr(res);
that.$nextTick(() => {
that.menuTreeArr = (that as any).$refs.menuTree.getCheckedNodes();
});
} else if (type == "REST-API") {
that.apiData = res;
that.apiCheckedArr = that.getCheckedArr(res);
that.$nextTick(() => {
that.apiTreeArr = (that as any).$refs.apiTree.getCheckedNodes();
});
}
});
}
getCheckedArr(list: any) {
let arr: any = [];
list.forEach((ele: any) => {
if (ele.selected == "true") {
arr.push(ele.resourceId);
}
if (ele.childList.length > 0) {
ele.childList.forEach((sele: any) => {
if (sele.selected == "true") {
arr.push(sele.resourceId);
}
});
}
});
return arr;
}
confirmFun() {
let that = this,
param: any = [];
that.menucheckchange()
that.apicheckchange()
if (!that.alertshow) {
that.allArr.forEach((ele: any) => {
param.push({
resourceId: ele.resourceId,
roleId: that.roleID,
rid: ele.rid
});
});
that.$emit("confirm", param);
}
}
menucheckchange() {
let that = this;
that.menuTreeArr = (that as any).$refs.menuTree.getCheckedNodes();
that.allArr = [...that.menuTreeArr, ...that.apiTreeArr];
}
apicheckchange() {
let that = this;
that.apiTreeArr = (that as any).$refs.apiTree.getCheckedNodes();
that.allArr = [...that.menuTreeArr, ...that.apiTreeArr];
}
created() {
// this.getMData("REST-API");
// this.getMData("MENU");
let that = this;
that.getTreeData("REST-API");
that.getTreeData("MENU");
}
}
</script>
\ No newline at end of file
import Vue from 'vue'
import App from './App.vue'
import store from './store'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import axios from './utils/http'
import VueAMap from 'vue-amap';
import METHOD from './utils/methods'
import Layout from './views/Layout/index.vue';
Vue.use(ElementUI)
Vue.use(VueAMap)
VueAMap.initAMapApiLoader({
key: 'c9e461c3b9bb660739ab7d11bf766bac',
plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor'],
// 默认高德 sdk 版本为 1.4.4
v: '1.4.4'
});
Vue.config.productionTip = false;
Vue.prototype.$axios = axios;
Vue.prototype.$toPush = function toPush(url: string, selected: any) {
if (url == '/none') {
this.$message.warning('功能开发中,敬请期待.....')
return;
} else if (selected == 'false') {
this.$message.warning('无权限访问该功能~')
return;
}
this.$router.push(url)
}
// Vue.prototype.$updateRouter = function () {
// let getModuleArr = store.getters.moudleArr;
// let moudleArr = localStorage.getItem('moudleArr'), componentUrl = METHOD.componentUrl;
// if (getModuleArr.length == 0 && moudleArr) {
// let moudle = JSON.parse(moudleArr);
// moudle.forEach((ele: any) => {
// ele.component = Layout;
// if (ele.children.length > 0) {
// ele.children.forEach((sele: any) => {
// sele.component = () => import(`@/views/Main/${(componentUrl as any)[sele.name]}.vue`)
// })
// }
// });
// (METHOD as any).titleArray = [...moudle];
// router.addRoutes(moudle);
// store.dispatch('setMoudleArr', moudle);
// } else {
// (METHOD as any).titleArray = [...getModuleArr];
// }
// }
var vm = new Vue({
store,
router,
render: h => h(App)
}).$mount('#app');
// (vm as any).$updateRouter()
\ No newline at end of file
This diff is collapsed.
import Vue, { VNode } from 'vue'
declare global {
namespace JSX {
// tslint:disable no-empty-interface
interface Element extends VNode {}
// tslint:disable no-empty-interface
interface ElementClass extends Vue {}
interface IntrinsicElements {
[elem: string]: any
}
}
}
declare module '*.vue' {
import Vue from 'vue'
export default Vue
}
declare module 'vue-amap';
\ No newline at end of file
import { ActionTree } from 'vuex';
const actions: ActionTree<any,any> = {
async setUser({state, commit} , user: any){
commit('SET_USER',user)
},
async setRouter({state, commit} , routers: any){
commit('SET_ROUTERS',routers)
},
async setSigns({state, commit} , signs: any){
commit('SET_SIGNS',signs)
},
async setMoudleArr({state, commit} , moudleArr: any){
commit('SET_MOUDLEARR', moudleArr)
}
}
export default actions
import { GetterTree} from 'vuex';
const getters: GetterTree<any, any> = {
user( state: any) : any {
return state.user;
},
routers( state: any) : any {
return state.routers;
},
signs(state: any) : any {
return state.signs
},
moudleArr(state: any) : any {
return state.moudleArr
},
}
export default getters;
import Vue from 'vue';
import Vuex from 'vuex';
import state from './state'
import getters from './getters'
import mutations from './mutaions'
import actions from './actions'
Vue.use(Vuex)
export default new Vuex.Store({
state,
getters,
mutations,
actions
})
import { MutationTree} from 'vuex';
const mutations: MutationTree<any> = {
SET_USER(state: any, user :any) :void {
state.user = user;
},
SET_ROUTERS(state: any, routers :any) :void {
state.routers = routers;
},
SET_SIGNS(state: any, signs :any) :void {
state.signs = signs;
},
SET_MOUDLEARR(state: any, moudleArr:any) :void {
state.moudleArr = moudleArr;
}
}
export default mutations;
import {asyncRouterMap} from '../router'
/*
本地存储不需要响应的值 1.用户数据 2.token
*/
const state: any = {
// user:null,
// routers: asyncRouterMap,
signs: [],//图例json,
moudleArr: []//模块array
}
export default state;
/*$theme-color:#3366e5;*/
$theme-color:rgb(76, 129, 162);
$theme-color-success:#18b15d;
$theme-color-danger:#e63434;
#app{
.el-button--primary{
background-color:$theme-color;
border-color: $theme-color;
}
.el-menu-item.is-active{
color: $theme-color;
}
.el-button--primary.is-plain{
border-color: $theme-color;
background: #d4e9ff;
color: $theme-color;
}
.el-button--primary.is-plain{
&:hover{
background: $theme-color;
color: white;
}
border-color: $theme-color;
background: #d4e9ff;
color: $theme-color;
}
.el-pagination.is-background .el-pager li:not(.disabled).active{
background-color:$theme-color;
}
.el-button--danger{
background-color: $theme-color-danger;
border-color: $theme-color-danger;
color: white;
}
.el-button--success{
background-color: $theme-color-success;
border-color: $theme-color-success;
color: white;
}
$curColr: $theme-color;
.el-step__head:hover {
cursor: pointer;
color: $curColr;
border-color: $curColr;
}
.el-step.active {
.el-step__head{
color:$curColr;
border-color: $curColr;
}
.el-step__title.is-wait,.el-step__description.is-wait{
color: $curColr;
}
}
}
$colors01: #066efc;
$colors02: #05cccc;
$colors03: #fb6502;
$colors04: #199a01;
$colors05: #076ffd;
$colors06: #fb6502;
$colors07: #016ac1;
$colors08: #04cccd;
$colors09: #076ffd;
$colors010: #05cccc;
$colors: $colors01 $colors02 $colors03 $colors04 $colors05 $colors06 $colors07
$colors08 $colors09 $colors010;
$theme-color-warning:#E6A23C;
$theme-color-danger:#F56C6C;
$theme-color-success:#67C23A;
.fl{float: left;}
.jinColor{color:red;}
.sd.qiCr{color: rgb(48, 180, 107);}
.sd.qiCr:hover{
border-color: rgb(48, 180, 107);;
}
.huiColr{color: gray;}
.pomentWrap{
.el-row--flex.is-justify-space-around{height: calc(100vh - 110px);}
.el-table{height: calc(100% - 120px);}
}
.icon {
width: 1em; height: 1em;
vertical-align:text-top !important;
fill: currentColor;
overflow: hidden;
}
.el-menu-item-group__title{display: none;}
.TaletName{
color: $theme-color;
margin: 0;
text-align: center;
margin-bottom: .5rem;
font-size: 1rem;
}
.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{
background-color: #ddeafa;
}
.dbtn{
display: inline-block;
padding: 2px 5px;
color: $theme-color;
cursor: pointer;
border-radius: 3px;
border-style: solid;
border-width: 0;
}
.dbtn:hover{
border-width: 1px;
}
.su{
color: $theme-color-success;
border-color: $theme-color-success ;
}
.wr{
color: $theme-color-warning;
border-color: $theme-color-warning;
}
.dg{
color: $theme-color-danger;
border-color: $theme-color-danger;
}
.sd{
color: #909399;
border-color: #909399;
}
.mi{
color: #d34108;
border-color: #d34108 ;
}
/* 上传样式 */
.uploader {
.el-upload {
width: 100px;
height: 100px;
background: #edf1f6;
border: 1px dashed #416e9b;
cursor: pointer;
overflow: hidden;
text-align: center;
line-height: 100px;
i {
font-size: 1.5rem;
color: #416e9b;
}
}
}
\ No newline at end of file
import axios, { AxiosResponse, AxiosRequestConfig } from 'axios';
import { Message } from 'element-ui';
import router from '@/router'
import METHOD from '../utils/methods'
/*
*http工具
*请求拦截器 负责将客户端标识token值存储并置放在头部提交给服务器
*响应拦截器 负责全局处理业务请求的网络或者业务错误
*/
//创建axios实例
const service = axios.create({
// baseURL:"http://47.104.61.232:8902/ioc/",
// baseURL:"http://192.168.1.104:8902/ioc/",
baseURL:"http://" + METHOD.GlobalUrl + "/ioc/",
timeout:30000, //超时时间
headers:{
// 'Content-Type':'application/x-www-form-urlencoded'
}
})
//请求拦截
service.interceptors.request.use(
(config: AxiosRequestConfig) => {
let token = sessionStorage.getItem('token');
if (token) {//如果已经登录 请求时加上token
config.headers.Authorization = token;
}
else{
if(config.url != '/account/login/'&&config.url != '/eventInfo/addOrEditEventInfo'){
Message.error('未登录,即将返回登录页面!')
router.push('/')
}
}
return config;
}, (err: any) => {
Promise.reject(err);
}
)
//响应拦截
service.interceptors.response.use(
(response: AxiosResponse) => {
let url = response.config.url;
if( response.headers.authorization ) sessionStorage.setItem('token',response.headers.authorization);
if(response.data.code == 0){
if( url.indexOf('del') > -1 ){
return response.data
}
return response.data.data;
}else{
Message.error(response.data.msg)
return
}
},
(err: any) => {
let errMsg = "";
if (err && err.response.status) {
switch (err.response.status) {
case 401:
errMsg = "登录状态失效,请重新登录"; break;
sessionStorage.removeItem('userData');
router.push('/login')
case 404:
errMsg = "找不到请求接口!"; break;
case 500:
errMsg = "服务端出错!"; break;
case 404:
errMsg = "找不到请求接口!"; break;
default:
errMsg = "请求出错!"
}
} else {
errMsg = err
}
Message.error(errMsg)
return Promise.reject(errMsg)
}
)
export default service;
This source diff could not be displayed because it is too large. You can view the blob instead.
import { Message } from 'element-ui';
export const METHOD = {
ADD_URL: '/mapResourcesInfo/addOrEditMapResourcesInfoById',
DELETE_URL: '/mapResourcesInfo/deleteMapResourcesInfoById/',//resourcesId
LIST_URL: '/mapResourcesInfo/findMapResourcesInfoList/',//pLegendId
GlobalUrl: '47.104.61.232:8902',
sysTITLE:'',
titleArray: [],
componentUrl:{
EventsMg: "Duty",
EventsInfo: "Duty",
MembersMg: "Duty",
BookPlan: "Duty",
BookPlanDown: "Duty",
PlansMg: "Duty",
ProcessEvents: "Duty",
DrillMg: "Duty",
DealwithNecessary:"Duty",
RoleMg: "User",
UserMg: "User",
BranchMg: "User",
MenuMg: "User",
APIMg: "User",
KnowledgeInfo: "User",
SocilDeivcMg: "Ioc",
SignsMg: "Ioc",
PublicDivceMg: "Ioc",
CamerasMg: "Ioc",
CompanyMg: "Ioc",
GasMg: "Ioc",
FireMg: "Ioc",
NaturalMg: "Ioc",
DeviceMg: "Ioc",
EmergencySpecialistMg:"Ioc",
ShelterMg:"Ioc",
EmergencyTeamMg:"Ioc",
EmergencyMaterialsMg:"Ioc",
HealthCareMg:"Ioc",
CommunicationMg:"Ioc",
TransportationResourcesMg:"Ioc"
},
deleteFun(that: any, url: any, callback: any) {
(that as any)
.$confirm("确定删除此条记录吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
(that as any).$axios
.get(url)
.then((res: any) => {
console.log( res )
if( res ){
(that as any).$message({
type: "success",
message: "删除成功!"
});
callback()
}
});
});
},
getListData(_this: any, pLegendId: any, param: any, callback: any) {//Object.assign({}, that.PAGE, that.searchData)
(_this as any).$axios
.post(`${this.LIST_URL + pLegendId}`, param)
.then((res: any) => {
if( res ){
callback(res)
}
});
},
delteListData(_this: any, id: any, callback: any) {
this.deleteFun(
_this,
`${this.DELETE_URL + id}`,
callback
);
},
addListData(_this: any, params: any, callback: any) {
(_this as any).$axios
.post(`${this.ADD_URL}`, params)
.then((res: any) => {
if( res ){
callback(res)
}
});
},
deptList(_this: any, callback: any) {
(_this as any).$axios
.get(`/mapResourcesInfo/getUnitList`)
.then((res: any) => {
if( res ){
callback(res)
}
});
},
axiosPost(that: any, url: any,param:any, callback: any) {//post请求
(that as any).$axios.post(url, param).then((res:any) => {
callback(res)
})
},
axiosGet(that: any, url: any, callback: any) {//get请求
(that as any).$axios.get(url).then((res:any) => {
callback(res)
})
}
}
export default METHOD;
\ No newline at end of file
<template>
<div class="wrapper error">
<div class="cent mainc">
<img src="@/assets/timg2.jpg" alt width="400" /><br>
<el-button plain class="primary" @click="pushUrl()">返回主页</el-button>
</div>
</div>
</template>
<style lang="scss" scoped>
.mainc {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
text-align: center;
}
.mainc img,.mainc button{display:inline;}
.error {
background: #ffffff;
height: 100%;
width: 100%;
}
</style>
<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
@Component({
components: {}
})
export default class Error extends Vue {
pushUrl(){
window.open(window.location.origin + '/dutySystem/login','_self')
}
}
</script>
<template>
<div class="entry">
<div class="entry-title">应急联动综合管理服务平台</div>
<div class="entry-con">
<el-row :gutter="36">
<el-col :span="8">
<div
class="cubes item01"
@click="$toPush(titleArray[0].path, titleArray[0].meta.selected)"
>
<span>{{titleArray[0].meta.title}}</span>
</div>
</el-col>
<el-col :span="8">
<div
class="cubes item02"
@click="$toPush(titleArray[1].path, titleArray[1].meta.selected)"
>
<span>{{titleArray[1].meta.title}}</span>
</div>
</el-col>
<el-col :span="8">
<div
class="cubes item03"
@click="$toPush(titleArray[2].path, titleArray[2].meta.selected)"
>
<span>{{titleArray[2].meta.title}}</span>
</div>
</el-col>
</el-row>
<el-row :gutter="36">
<el-col :span="8">
<div
class="cubes item04"
@click="$toPush(titleArray[3].path, titleArray[3].meta.selected)"
>
<span>{{titleArray[3].meta.title}}</span>
</div>
</el-col>
<el-col :span="8">
<div
class="cubes item05"
@click="$toPush(titleArray[4].path, titleArray[4].meta.selected)"
>
<span>{{titleArray[4].meta.title}}</span>
</div>
</el-col>
<el-col :span="8">
<div
class="cubes item010"
@click="$toPush(titleArray[9].path, titleArray[9].meta.selected)"
>
<span>{{titleArray[9].meta.title}}</span>
</div>
</el-col>
</el-row>
<el-row :gutter="36">
<el-col :span="8">
<div
class="cubes item06"
@click="$toPush(titleArray[5].path, titleArray[5].meta.selected)"
>
<span>{{titleArray[5].meta.title}}</span>
</div>
</el-col>
<el-col :span="8">
<div
class="cubes item07"
@click="$toPush(titleArray[6].path, titleArray[6].meta.selected)"
>
<span>{{titleArray[6].meta.title}}</span>
</div>
</el-col>
<!--<el-col :span="6">
<div
class="cubes item08"
@click="$toPush(titleArray[7].path, titleArray[7].meta.selected)"
>
<span>{{titleArray[7].meta.title}}</span>
</div>
</el-col>-->
<el-col :span="8">
<div
class="cubes item09"
@click="$toPush(titleArray[8].path, titleArray[8].meta.selected)"
>
<span>{{titleArray[8].meta.title}}</span>
</div>
</el-col>
</el-row>
</div>
</div>
</template>
<style lang="scss" scoped>
@import "@/utils/default.scss";
.entry {
width: 100%;
height: 100vh;
overflow:hidden;
/*background: linear-gradient(
to bottom,
#191689,
#0e1241,
#091223,
#0e1241,
#191689
);*/
background-image: url("../assets/leftbackground.png");
}
.entry-con {
width: 1300px;
margin: 0 auto;
.el-row {
margin-bottom: 36px;
}
}
.entry-title {
font-size: 55px;
font-family: "黑体";
color: #ffffff;
width: 100%;
text-align: center;
padding-top: 20px;
line-height: 2;
}
.cubes {
width: 100%;
height: 200px;
overflow: hidden;
background-position: 95% 85%;
background-repeat: no-repeat;
position: relative;
cursor: pointer;
&:hover {
box-shadow: 1px 1px 7px 6px #c6ddf4;
span {
font-size: 40px;
}
}
span {
font-size: 30px;
font-family: "黑体";
color: #ffffff;
position: absolute;
top: 30px;
left: 30px;
}
}
@for $num from 1 through 10 {
$cl: nth($colors, $num);
.item0#{$num} {
background-image: url("../assets/sicon#{$num}.png"),
linear-gradient(130deg, $cl, lighten($cl, 30%));
}
}
</style>
<script lang="ts">
import { Component, Vue, Provide, Watch } from "vue-property-decorator";
import { State, Getter, Mutation, Action } from "vuex-class";
import Layout from "../views/Layout/index.vue";
import METHOD from "@/utils/methods";
@Component({
components: {}
})
export default class All extends Vue {
@Getter("moudleArr") getModuleArr: any;
@Provide() titleArray: any = [];
beforeCreate() {
// let token = localStorage.getitleem('token');
// if (token == undefined ||token == null || token == '') {
// this.$message.error('未登录,即将返回登录页!')
// window.open(window.location.origin + process.env.BASE_path + 'login','_self')
// return false
// }
}
created() {
if( this.getModuleArr.length > 0) this.titleArray = [...this.getModuleArr]
else this.titleArray = [...METHOD.titleArray];
}
}
</script>
<template>
<div class="home">
<div class="txt">
<h1>欢迎访问{{sysTITLE}}后台管理系统!</h1>
<p><em>Wellcom to the Emergency Onduty Management System.</em></p>
</div>
</div>
</template>
<style lang="scss" scoped>
.home{width: 100%;height: 100%;background-image:linear-gradient(45deg, #015eac, #181818);background-image:-webkit-linear-gradient(45deg, #015eac, #181818);}
.txt{position: relative;top: 30vh;text-align: center;color: honeydew;}
h1{font-size: 32px;padding: 10px;margin: 0;}
p{font-size: 1.6em;}
</style>
<script lang="ts">
import {Component,Vue, Provide} from 'vue-property-decorator'
import METHOD from '@/utils/methods';
@Component({
components:{}
})
export default class Home extends Vue {
@Provide() sysTITLE:string = '';
created() {
this.sysTITLE = METHOD.sysTITLE
}
}
</script>
<template>
<div class="wrapper" id="content">
<el-container>
<!-- 左侧菜单 -->
<el-aside width="200px">
<slot name="left"></slot>
</el-aside>
<el-container>
<!-- 面包屑 -->
<el-header height="40px">
<el-breadcrumb separator="/">
<el-breadcrumb-item>
<i class="fa fa-bars"></i>
{{sysTITLE}}
</el-breadcrumb-item>
<el-breadcrumb-item>{{currentRoute.meta.title}}</el-breadcrumb-item>
</el-breadcrumb>
</el-header>
<!-- 主要内容 -->
<el-main>
<slot name="maincon"></slot>
</el-main>
</el-container>
</el-container>
</div>
</template>
<style lang="scss">
#content,
.maincon {
width: 100%;
height: 100%;
overflow: hidden;
.el-aside {
background-color: rgb(47, 115, 155) !important;
}
.el-header {
background: #ffffff;
line-height: 40px;
}
.el-header > div {
height: 100%;
line-height: 40px;
}
.el-main {
background: #f3f3f3;
width: 100%;
height: 100%;
overflow: auto;
box-sizing: border-box;
padding: 10px;
}
.el-container {
height: 100%;
}
}
</style>
<script lang="ts">
import { Component, Vue, Provide, Watch } from "vue-property-decorator";
import { State, Getter, Mutation, Action } from "vuex-class";
import METHOD from "@/utils/methods";
@Component({
components: {},
})
export default class Content extends Vue {
@Getter("routers") getRouter: any;
@Action("setSigns") setSigns: any; //提交存储的图例json
@Watch("$route") handleRouteChange(router: any): any {
this.inintBreadcrum(router);
} //监听当前路由变化的时候返回数据
@Provide() breadcrumnItems: any; //定义数据
@Provide() sysTITLE: any = METHOD.sysTITLE;
@Provide() currentRoute: any;
inintBreadcrum(router: any) {
let arr = [];
this.currentRoute = router;
this.sysTITLE = router.matched[0].meta.title;
}
//获取图例列表
getSigns() {
let that = this;
(this as any).$axios
.post(`/legendInfo/getLegendInfoComboxData`)
.then((res: any) => {
this.setSigns(res); //存储到vuex
});
}
created() {
this.inintBreadcrum(this.$route);
}
}
</script>
\ No newline at end of file
<template>
<div class="wrapper" id="Header">
<div class="logo fl">
<img src="@/assets/logo.png" alt />
应急联动综合管理服务平台
</div>
<div class="haeder_r fr">
<el-dropdown @command="handleCommand">
<span class="el-dropdown-link un">
<span>{{userInfo.account}}</span>&nbsp;
<img :src="require('@/assets/avatar' + userInfo.avatar + '.png')" alt width="40" />
</span>
<el-dropdown-menu slot="dropdown">
<!-- <el-dropdown-item command="personal">个人中心</el-dropdown-item> -->
<el-dropdown-item command="toMain">返回主页</el-dropdown-item>
<el-dropdown-item command="logoff">注销登录</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
<!--<FloatBar />-->
</div>
</template>
<style lang="scss" scoped>
@import "@/utils/default.scss";
#Header {
width: 100%;
height: 60px;
line-height: 60px;
overflow: hidden;
//background: $theme-color;
background-image:url('../../assets/headbackground.png');
padding: 0 10px;
> div {
height: 100%;
overflow: hidden;
padding-right: 20px;
}
}
.logo {
font-size: 1.5em;
color: #ffffff;
font-weight: 700;
margin-left: 12px;
img {
height: 40px;
vertical-align: middle;
}
}
.haeder_r {
font-size: 1.2em;
color: #ffffff;
padding-right: 20px;
}
.haeder_r i {
font-size: 1.5em;
}
.el-dropdown {
color: #ffffff;
height: 60px;
}
.un {
img {
position: relative;
top: 10px;
}
> span {
color: #ffffff;
}
}
</style>
<script lang="ts">
import { Component, Vue, Provide, Watch } from "vue-property-decorator";
import { State, Getter, Mutation, Action } from "vuex-class";
import FloatBar from './floatBar.vue'
import METHOD from "@/utils/methods";
@Component({
components: { FloatBar }
})
export default class Header extends Vue {
@Getter("user") getUser: any; //获取vuex中存储的数据
@Provide() userData: Object = {};
@Provide() sysTITLE: string = '';
@Provide() userInfo = {
userInfo: "",
avatar: "1"
};
@Watch("$route") handleRouteChange(router:any): any {
this.sysTITLE = router.matched[0].meta.title
}
beforeCreate() {
}
created() {
let userInfo = sessionStorage.getItem("userInfo");
if (userInfo) {
this.userInfo = { ...JSON.parse(userInfo) };
}
this.sysTITLE = this.$route.matched[0].meta.title; //父级title
//sessionStorage存储的时候是String,刷新后Vuex存储的是Object;
// if(typeof this.getUser == 'string'){
// this.userData = JSON.parse(this.getUser)
// } else if(typeof this.getUser == 'object'){
// this.userData = this.getUser;
// }
}
handleCommand(command: String) {
switch (command) {
case "personal":
this.$router.push("/percenter");
break;
case "logoff":
sessionStorage.removeItem("userData");
sessionStorage.removeItem("token");
this.$router.push(process.env.BASE_URL + "login");
break;
case "toMain":
this.$router.push(process.env.BASE_URL + "alls");
break;
}
}
}
</script>
<template>
<div class="wrapper" id="navbar" style="background-color: #2F739B !important;">
<!-- <el-scrollbar class=""> -->
<!-- <el-scrollbar class="el-scrollbar"> -->
<el-menu :default-active="$route.path" :unique-opened="true" class="el-menu-vertical-demo" router style="background-color: #2F739B !important;">
<!-- router属性 是否使用 vue-router 的模式,启用该模式会在激活导航时以 index 作为 path 进行路由跳转 -->
<!--2021/5/21 更换导航栏位置开始-->
<!--<template v-for="(item,bindex) in currentRouterArr">
<div :key="bindex">
<el-menu-item :index="item.path" :data-id="item.path" v-show="item.meta.selected == 'true'">
<span slot="title">
<i :class="item.meta.icon"></i>
{{item.meta.title}}
</span>
</el-menu-item>
&lt;!&ndash; 多个子导航 &ndash;&gt;
<el-submenu :index="item.path" v-if="item.children && item.children.length > 0" >
<span slot="title">
<i :class="item.meta.icon"></i>
{{item.meta.title}}
</span>
<el-menu-item-group>
<el-menu-item
:index="sitem.path"
v-for="(sitem,sindex) in item.children"
:key="sindex"
>
<i :class="sitem.meta.icon"></i>
{{sitem.meta.title}}
</el-menu-item>
</el-menu-item-group>
</el-submenu>
</div>
</template>-->
<!--2021/5/21 更换导航栏位置结束-->
<template v-for="(item ,bindex) in getModuleArr">
<div :key="bindex">
<el-submenu :index="item.path" v-if="item.children && item.children.length > 0">
<span slot="title" style="color: white;font-size: 16px">
<i :class="item.meta.icon"></i>
{{item.meta.title}}
</span>
<el-menu-item-group>
<el-menu-item
:index="sitem.path"
v-for="(sitem,sindex) in item.children"
:key="sindex"
>
<i :class="sitem.meta.icon"></i>
{{sitem.meta.title}}
</el-menu-item>
</el-menu-item-group>
</el-submenu>
</div>
</template>
</el-menu>
</div>
</template>
<style>
.el-submenu__title:hover{
background: #08010033 !important;
}
/*.el-submenu__title span:hover{
color: red !important;
}*/
</style>
<style lang="scss" scoped>
#navbar {
width: 200px;
height: 95% !important;
overflow: hidden;
overflow-y: auto !important;
overflow-x: hidden !important;
}
.eventrecive{
background:url("../../assets/eventrecive.png")no-repeat center;
display:inline-block;
height: 15px;
width: 15px;
}
.needalarm{
background:url("../../assets/needalarm.png")no-repeat center;
display:inline-block;
height: 15px;
width: 15px;
}
.dealmaster{
background:url("../../assets/dealmaster.png")no-repeat center;
display:inline-block;
height: 15px;
width: 15px;
}
.numberplan{
background:url("../../assets/numberplan.png")no-repeat center;
display:inline-block;
height: 15px;
width: 15px;
}
.materialsupport{
background:url("../../assets/materialsupport.png")no-repeat center;
display:inline-block;
height: 15px;
width: 15px;
}
.basemessage{
background:url("../../assets/basemessage.png")no-repeat center;
display:inline-block;
height: 15px;
width: 15px;
}
.devicemanage{
background:url("../../assets/devicemanage.png")no-repeat center;
display:inline-block;
height: 15px;
width: 15px;
}
.urgentpractice{
background:url("../../assets/urgentpractice.png")no-repeat center;
display:inline-block;
height: 15px;
width: 15px;
}
.yingjichuzhifa{
background:url("../../assets/yingjichuzhifa.png")no-repeat center;
display:inline-block;
height: 15px;
width: 15px;
}
</style>
<script lang="ts">
import { State, Getter, Mutation, Action } from "vuex-class";
import { Component, Vue, Provide , Watch} from "vue-property-decorator";
import Layout from "@/views/Layout/index.vue";
import METHOD from "@/utils/methods";
@Component({
components: {}
})
export default class Navbar extends Vue {
@Getter("moudleArr") getModuleArr: any;
@Provide() currentRouterArr:any = [];
@Watch("$route") handleRouteChange(router:any): any {
this.renderNavBar()
}
renderNavBar(){
let that = this,
arr = that.getModuleArr.length > 0 ? that.getModuleArr : METHOD.titleArray,
resArr = arr.filter((ele: any) => ele.path == that.$route.matched[0].path )
if(resArr.length > 0) that.currentRouterArr = resArr[0].children;
}
created() {
let that = this;
that.renderNavBar();
// let toUrlObj = that.currentRouterArr.find( (ele:any) => ele.meta.selected == 'true');
// if( toUrlObj.path != that.$router.currentRoute.path )that.$router.push( toUrlObj.path );
}
}
</script>
\ No newline at end of file
<template>
<div class="wrapper floatBar">
<div class="floatBar-top">
<i class="el-icon-menu"></i>
</div>
<div class="floatBar-li">
<ul>
<li v-for="(item ,index) in titleArray" :key="index" @click="$toPush(item.path, item.meta.selected)" v-if="isShowInde != index" :class="`floatBar-li` + index">
<span class="img">
<img :src="require('@/assets/sicon' + (index + 1) + '.png')" width="20px" />
</span>&nbsp;
<font>{{item.meta.title}}</font>
</li>
</ul>
</div>
</div>
</template>
<style lang="scss">
@import "@/utils/default.scss";
@keyframes round {
from {
transform: rotate(0deg);
}
to {
transform: rotate(180deg);
}
}
.floatBar {
position: fixed;
right: 0px;
top: 60px;
z-index: 9;
padding: 0;
overflow: visible !important;
padding: 0 !important;
height: auto !important;
&:hover {
.floatBar-li {
display: block;
}
.floatBar-top i{
animation: round 0.3s;
}
}
.floatBar-top {
cursor: pointer;
height: 40px;
text-align: center;
width: 60px;
line-height: 40px;
i {
font-size: 2em;
color: #3366e5;
line-height: 40px;
}
}
.floatBar-li {
width: auto;
cursor: pointer;
position: relative;
display: none;
ul {
padding: 0;
width: 50px;
height: 360px;
margin: 0;
}
li {
list-style: none;
height: 40px;
line-height: 40px;
position: absolute;
right: 0;
background: rgba(0, 0, 0, 0.7);
padding: 0 10px;
width: 30px;
transition: width 0.3s;
-webkit-transition: width 0.3s;
&:hover {
width: 100px;
font{
display:inline-block;
}
}
}
@for $num from 1 through 9 {
$cl: nth($colors, $num);
li:nth-child(#{$num}) {
$hei: 40px;
$n: #{($num - 1) * $hei};
top: #{$n};
}
}
@for $num from 1 through 9 {
$cl: nth($colors, $num);
$index: $num - 1;
.floatBar-li#{ $index } .img {
background: lighten($cl, 40%);
}
}
.img {
display: inline-block;
width: 30px;
height: 30px;
background: olivedrab;
text-align: center;
vertical-align: middle;
border-radius: 3px;
}
font {
color: #eeeeee;
display: none;
}
}
}
</style>
<script lang="ts">
import { State, Getter, Mutation, Action } from "vuex-class";
import { Component, Vue, Provide,Watch } from "vue-property-decorator";
import Layout from "@/views/Layout/index.vue";
import METHOD from "@/utils/methods";
@Component({
components: {}
})
export default class Navbar extends Vue {
@Getter("moudleArr") getModuleArr: any;
@Provide() titleArray: any = [];//变化的
@Provide() isShowInde: any = null;;
@Watch("$route") RouteChange(currRouter:any): any {
let that = this,
inde = that.titleArray.findIndex( ( ele: any) => currRouter.path == ele.redirect );
that.isShowInde = inde
}
toPush(url: string) {
let toUrl = "";
window.open(window.location.origin + url, "_self");
}
created() {
let that = this;
if( that.getModuleArr.length > 0) that.titleArray = [...that.getModuleArr]
else that.titleArray = [...METHOD.titleArray];
let inde = that.titleArray.findIndex( (ele :any) => that.$router.currentRoute.path == ele.redirect );
that.isShowInde = inde
}
}
</script>
\ No newline at end of file
<template>
<div class="wrapper" id="layout">
<div class="div-float" v-show="showDiaBox"
style="width: 230px;
height: auto;
background-color: rgba(66, 64, 64, 0.8);
position: absolute;
z-index: 1000;
bottom: 0;right: 0;
margin-bottom: 50px;
margin-right: 10px;
color: #fff;
padding: 10px;">
<span style="font-size:18px;">事件接报</span>
<i class="el-icon-circle-close" @click="closeDiaBox(NameArr.id)" style="font-size: 24px;position: absolute;right: 0;top: 0;"></i>
<p style="margin-left: 15px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;width: 200px;">事件名称:<span style=" ">{{NameArr.eventName}}</span></p>
<p style="margin-left: 15px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;width: 200px;">事件来源:<span>{{NameArr.eventSource}}</span></p>
<div style="width: 100%;text-align: center;">
<el-button type="primary" plain @click="enterHome">查看</el-button></div>
</div>
<!-- 头部 -->
<Header />
<Content>
<Navbar slot="left"/>
<router-view slot="maincon"></router-view>
</Content>
</div>
</template>
<style lang="scss">
#layout {
width: 100%;
height: 100%;
overflow: hidden;
}
</style>
<script lang="ts">
import { Component, Vue, Provide, Prop, Watch } from "vue-property-decorator";
import Header from "./Header.vue";
import Content from "./Content.vue";
import Navbar from "./Navbar.vue";
import METHOD from '@/utils/methods';
import {asyncRouterMap} from '../../router';
@Component({
components: { Header,Content,Navbar }
})
export default class Layout extends Vue {
@Provide() NameArr: any = {
eventName: '',
eventSource: ''
};
// @Provide() NameArrAll: any = [];
data(){
return{
showDiaBox: false
}
};
closeDiaBox(id) {
this.showDiaBox = false;
//关闭事件给个1
sessionStorage.setItem(id,1);
}
//查看按钮
enterHome(res) {
// console.log("进入主页");
this.$router.push({
path: '/EventsMg',
});
};
getEventInfo() {
let that = this;
(that as any).$axios.get(`/eventInfo/getOfficialAccountEventInfo`).then((res: any) => {
console.log(res,"fdsafdsafds");
if(null != res && ' ' != res && undefined != res){
//获取接口数据 key为数据id {}
if(1 != sessionStorage.getItem(res.id)){
if(res.eventName){
sessionStorage.setItem(res.id,0)
console.log("fdsfdsfdfdsa");
//数据赋值
that.NameArr = res;
this.showDiaBox = true;
}
}
}
});
}
created() {
METHOD.sysTITLE = this.$route.matched[0].meta.title; //父级title
let that = this;
if(this.NameArr.eventName){
this.showDiaBox = true;
}
//公众号事件上报公告
setInterval(function(){
that.getEventInfo();
},3000);
}
}
</script>
<template>
<div id="login" @keypress.enter="handleSubmit()">
<!--<div class="backGroundVideo">
<video
poster
x5-playsinline
playsinline
webkit-playsinline
autoplay
muted
loop
class="J_bgvideo"
id="myVideo1"
>
<source src="@/assets/loginbg.mp4" type="video/mp4" />
</video>
</div>-->
<div class="loginWrap">
<div class="form">
<el-row>
<el-col :span="24" class="form-tit cent">
<img src="@/assets/logo.png" alt width="100px" />
<h1>应急联动综合管理服务平台</h1>
<p>
<!-- <em>Emergency Onduty Management System</em> -->
<br />
</p>
</el-col>
<div class="contianer">
<el-form class="form-con" :model="ruleForm" :rules="rules" ref="ruleForm">
<el-form-item prop="username">
<el-input
placeholder="请输入用户名"
name="username"
id="username"
v-model="ruleForm.username"
></el-input>
</el-form-item>
<el-form-item prop="password">
<el-input
placeholder="请输入密码"
type="password"
name="password"
id="password"
v-model="ruleForm.password"
></el-input>
</el-form-item>
<el-form-item>
<el-button
class="loginbtn"
@click.native.prevent="handleSubmit()"
:loading="isLoging"
style="color: white">登录</el-button>
<!-- 注释:native.prevent 取消默认事件 -->
</el-form-item>
<!-- <p>
<el-checkbox label="7天自动登陆" v-model="ruleForm.autoLogin"></el-checkbox>
<el-button type="text" class="fr" @click="$router.push('/password')">忘记密码?</el-button>
</p>-->
</el-form>
</div>
</el-row>
</div>
</div>
</div>
</template>
<style lang="scss">
#login {
width: 100%;
height: 100%;
overflow: hidden;
.backGroundVideo video {
position: absolute;
top: 50%;
left: 50%;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: 0;
transform: translate(-50%, -50%);
transition: opacity 1s;
}
.loginWrap {
display: flex;
align-items: center;
-webkit-lign-items: center;
-webkit-justify-content: center;
justify-content: center;
width: 100%;
height: 100%;
overflow: hidden;
background: url("../assets/loginbackground.png") center no-repeat;
.form {
//background: transparent;
background: white;
width: 350px;
height: auto;
padding: 40px 30px;
box-shadow: 0 0 10px #f8f8f8;
z-index: 2;
.el-row {
margin-bottom: 20px;
}
.form-tit {
margin-bottom: 20px;
}
h1 {
font-family: "黑体", serif;
//color: #f8f8f8;
color: #2F739B;
margin-bottom: 5px;
}
p {
color: #b2b2b2;
margin: 0;
}
.loginbtn {
background: transparent;
//color: #ffffff;
background: #2F739B;
font-size: 1.2em;
width: 100%;
box-shadow: 0 0 7px #399c83;
border: 1px solid #399c83 !important;
}
input[name="username"],
input[name="password"] {
height: 45px;
line-height: 45px;
background-position: 10px center;
background-repeat: no-repeat;
padding-left: 40px;
background-color: transparent !important;
//color: white;
}
input[name="username"] {
background-image: url("../assets/u22.png");
}
input[name="password"] {
background-image: url("../assets/u24.png");
}
input[name="email"] {
background-image: url("../assets/u23.png");
background-size: 24px;
}
}
}
}
</style>
<script lang="ts">
import { Component, Vue, Provide } from "vue-property-decorator";
import { Message, Form } from "element-ui";
import { State, Getter, Mutation, Action } from "vuex-class";
import Layout from "../views/Layout/index.vue";
import { mapActions } from "vuex";
import METHOD from "../utils/methods";
import { createrouter, asyncRouterMap } from '../router'
import routers from '../router'
@Component({
components: { Layout }
})
export default class Home extends Vue {
@Action("setMoudleArr") setMoudleArr: any;
@Provide() isLoging: Boolean = false;
@Provide() ruleForm: {
username: String;
password: String;
autoLogin: Boolean;
} = {
username: "",
password: "",
autoLogin: true
};
@Provide() rules = {
username: [{ required: true, message: "请输入用户名", trigger: "blur" }],
password: [{ required: true, message: "请输入密码", trigger: "blur" }]
};
addDouter(rolelist: any) {
let that = this;
var deArr: any = [];
let obj: any = {};
if (rolelist.length == 0) {
that.$message.error("该用户未分配角色!");
return;
}
rolelist.forEach((ele: any) => {
let isSelected = ele.children.some((el: any) => el.selected == "true");
var obj = {
path: ele.path,
component: Layout,
redirect: "",
meta: {
title: ele.title,
icon: ele.icon,
selected: isSelected ? "true" : ele.selected,
level: ele.level
},
children: []
};
obj.path = ele.path;
let childarr: any = ele.children;
if (childarr.length > 0) {
childarr.forEach((sele: any) => {
let vueurl =
(METHOD.componentUrl as any)[sele.path.replace("/", "")] +
sele.path;
let sobj: any = {
name: sele.name,
path: sele.path,
component: () => import(`@/views/Main/${vueurl}.vue`),
meta: {
title: sele.title,
icon: sele.icon,
selected: sele.selected,
level: sele.level
}
};
if (sele.code) sobj.meta.listId = sele.code;
if (sele.selected == "true") {
obj.children.push(sobj);
}
});
}
if (obj.children.length > 0) obj.redirect = ( obj.children[0] as any).path;
deArr.push(obj);
});
// this.$router不是响应式的,所以手动将路由元注入路由对象--这一步没有用处
// (that.$router as any).options.routes = [
// ...(that.$router as any).options.routes,
// ...deArr
// ];
(that.$router as any).matcher = ( createrouter( asyncRouterMap ) as any).matcher;//重置router
that.$router.addRoutes( deArr );
that.setMoudleArr( deArr )
sessionStorage.setItem("moudleArr", JSON.stringify( deArr ));
that.$router.push("/alls");
}
//异步添加路由--?
asyncAddroutes(addroutes: any) {
return new Promise((resolve, reject) => {
if (addroutes.length > 0) {
resolve(addroutes);
} else {
reject("错误");
}
});
}
handleSubmit(): void {
let that = this;
(this.$refs["ruleForm"] as any).validate((valid: any) => {
if (valid) {
let timestamp = new Date().getTime();
that.isLoging = true;
(that as any).$axios
.post("/account/login/", {
account: that.ruleForm.username,
password: that.ruleForm.password,
captcha: "",
type: "",
timestamp: timestamp
})
.then((res: any) => {
that.isLoging = false;
sessionStorage.setItem("token", res.token);
sessionStorage.setItem("userInfo", JSON.stringify(res.userInfo));
//登陆成功 返回权限菜单 跳转到综合页面
that.addDouter(res.userInfo.roleMenuList);
// that.$router.replace("/UserMg").then(onComplete => {
// console.log('onComplete')
// }).catch(onAbort => {
// console.log('路由被打断')
// });
})
.catch(() => {
this.isLoging = false;
});
} else {
return false;
}
});
}
created() {
this.setMoudleArr([]);
}
}
</script>
<template>
<div class="wrapper editwrap">
<el-dialog
:visible.sync="reVisible"
title="添加人选信息"
:show-close="false"
:close-on-click-modal="false"
append-to-body
>
<div>
<el-table :data="NumberArr" ref="NumberArr" style="width: 100%;margin-left: 10px;"
            @selection-change="handleSelectionChange">
    <el-table-column type="selection" width="50" v-model="multipleSelection"></el-table-column>
<el-table-column label="部门名称" prop="deptName" sortable></el-table-column>
<el-table-column label="姓名" prop="userName" sortable></el-table-column>
<el-table-column label="电话" prop="phone" sortable></el-table-column>
</el-table>
<span slot="footer" class="dialog-footer" style="float: right;margin-top: 13px;">
<el-button size="small" @click="speedupCheckbox">确认添加</el-button>
<el-button @click="$emit('redialogFun')" size="small">取消</el-button>
</span>
</div>
</el-dialog>
</div>
</template>
<style lang="scss">
@import '@/utils/default.scss';
</style>
<script lang="ts">
import { Component, Vue, Provide, Prop, Watch } from "vue-property-decorator";
import { State, Getter, Mutation, Action } from "vuex-class";
@Component({
components: {}
})
export default class AddPersonInfo extends Vue {
@Prop(Boolean) reVisible!: Boolean;
@Prop(Array) rdeptInfoList!: Array;
@Provide() multipleSelection: any =[];
handleSelectionChange(val) {
this.multipleSelection = val;
}
@Provide() NumberArr: any = [];
//全速
speedupData(){
var arr=this.multipleSelection;
this.$emit('addNewPersonToArr',arr);
this.$refs.NumberArr.clearSelection(); //操作完成清除勾选框
this.$emit('redialogFun');
}
//全速选择框
speedupCheckbox() {
if (this.multipleSelection.length === 0) {
this.$message({
message: '请至少勾选一项,再进行操作',
type: 'warning'
});
} else {
this.speedupData();
}
}
getNumberData() {
let that = this;
(that as any).$axios
.get(`/user/getDutyContactsList`)
.then((res: any) => {
that.NumberArr = res;
that.unique(res)
this.$emit('getNumberData',res);
});
}
unique(arr) {
let that = this;
for(var i=0;i<that.NumberArr.length;i++){
for(var j=0;j< that.rdeptInfoList.length;j++){
if( that.rdeptInfoList[j].userName == that.NumberArr[i].userName){
this.NumberArr.splice(i,1);
}
}
}
}
created() {
let that = this;
that.getNumberData();
}
}
</script>
\ No newline at end of file
<template>
<div class="camerasMg">
<el-row class="topBar">
<el-col>
<el-form :inline="true" :model="searchData">
<el-form-item label>
<el-input v-model="searchData.dutyMan" placeholder="请输人员名称"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="searchFun()">
<i class="el-icon-search"></i> 搜索
</el-button>
<el-button type="primary" @click="resetFun()">
<i class="el-icon-refresh"></i> 重置
</el-button>
</el-form-item>
<el-form-item class="fr">
<el-button plain type="primary" @click="addFun()">
<i class="el-icon-plus"></i> 添加值班计划
</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
<el-table :data="tableData.pageData" stripe border style="width:100%;" :loading="false">
<el-table-column width="50" type="index" label="序号"></el-table-column>
<el-table-column prop="dutyMan" label="值班人员"></el-table-column>
<el-table-column prop="dutyDateStart" label="值班开始时间"></el-table-column>
<el-table-column prop="dutyDateEnd" label="值班结束时间"></el-table-column>
<el-table-column prop="dutyWeek" label="值班星期" width="150" ></el-table-column>
<el-table-column prop="createTime" label="创建时间"></el-table-column>
<el-table-column prop="isCommit" label="日志是否提交">
<template slot-scope="scope">
<font>{{scope.row.isCommit == 0 ? '未提交' : '已提交'}}</font>
</template>
</el-table-column>
<el-table-column label="操作" width="300" align="center">
<template slot-scope="scope">
<el-button @click="editFunEdit(scope.row)" size="small" :disabled="scope.row.isCommit == 1?true:false">
<i class="el-icon-edit"></i> 提交日志
</el-button>
<el-button @click="editFun(scope.row)" size="small">
<i class="el-icon-edit-outline"></i> 详情
</el-button>
<el-button type="danger" @click="delFun(scope.row)" size="small">
<i class="el-icon-delete"></i> 删除
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
background
layout="total,sizes, prev, pager, next, jumper"
:total="tableData.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="PAGE.page"
:page-size="PAGE.size"
></el-pagination>
<BookPlanEdit
v-if="dialogVisible"
:dialogVisible="dialogVisible"
:editForm="formData"
:title="dialogTit"
@dialogFun="closeDialog"
@refreshTableData="getTableData"
:key="zjKey"
></BookPlanEdit>
<BookPlanDownEdit
v-if="dialogVisible2"
:dialogVisible="dialogVisible2"
:dutyId="formData.id"
:editForm="formData"
:title="dialogTit"
@dialogFun="closeDialog"
@refreshTableData="getTableData"
:key="rzKey"
></BookPlanDownEdit>
</div>
</template>
<script lang="ts">
import { Component, Vue, Provide } from "vue-property-decorator";
import BookPlanEdit from "./BookPlanEdit.vue";
import BookPlanDownEdit from "./BookPlanDownEdit.vue";
import METHOD from "@/utils/methods";
@Component({
components: { BookPlanEdit, BookPlanDownEdit}
})
export default class CamerasMg extends Vue {
@Provide() signId: String = "";
@Provide() id: String = "";
@Provide() tableData: Object = { pageData: [], total: 0 };
@Provide() PAGE: any = { page: 1, size: 10 };
@Provide() searchData: any = { dutyMan:'' };
@Provide() loading: Boolean = false;
//编辑组件
@Provide() dialogVisible: Boolean = false;
@Provide() dialogVisible2: Boolean = false;
@Provide() dialogTit: String = "新增预案";
@Provide() formData: Object = {};
@Provide() zjKey: any = 0;
//日志组件
// @Provide() dialogVisible: Boolean = false;
// @Provide() dialogTit: String = "提交日志";
// @Provide() logData: Object = {};
@Provide() rzKey: any = 0;
getTableData() {
let that = this,
params = Object.assign(that.PAGE, that.searchData);
(that as any).$axios
.post("/onDutyInfo/getOnDutyInfoList", params)
.then((res: any) => {
if( res ) that.tableData = res;
});
}
searchFun() {
this.PAGE = { page: 1, size: 10 };
this.getTableData();
}
resetFun() {
this.PAGE = { page: 1, size: 10 };
this.searchData = {};
this.getTableData();
}
addFun() {
this.zjKey++;
this.dialogVisible = true;
this.dialogTit = "新增";
}
editFun(row: any) {
this.dialogTit = "详情";
this.formData = Object.assign({}, row);
this.zjKey++;
this.dialogVisible = true;
}
editFunEdit(row: any) {
this.dialogTit = "提交日志";
this.formData = Object.assign({}, row);
this.rzKey++;
this.dialogVisible2 = true;
}
delFun(row: any) {
let that = this as any;
METHOD.deleteFun(that, `/onDutyInfo/delOnDutyInfoById/${row.id}`, function() {
that.getTableData();
});
}
handleSizeChange(val: any) {
this.PAGE.size = val;
this.getTableData();
}
handleCurrentChange(val: any) {
this.PAGE.page = val;
this.getTableData();
}
closeDialog() {
//关闭窗口
this.dialogVisible = false;
this.dialogVisible2 = false;
this.formData = {};
}
created() {
this.getTableData();
}
}
</script>
<template>
<div class="camerasMg">
<el-row class="topBar">
<el-col>
<el-form :inline="true" :model="searchData">
<el-form-item label>
<el-input v-model="searchData.realityDutyUser" placeholder="请输人员名称"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="searchFun()">
<i class="el-icon-search"></i> 搜索
</el-button>
<el-button type="primary" @click="resetFun()">
<i class="el-icon-refresh"></i> 重置
</el-button>
</el-form-item>
<!-- <el-form-item class="fr">
<el-button plain type="primary" @click="addFun()">
<i class="el-icon-plus"></i> 添加值班日志
</el-button>
</el-form-item> -->
</el-form>
</el-col>
</el-row>
<el-table :data="tableData.pageData" stripe border style="width:100%;" :loading="false">
<el-table-column width="50" type="index" label="序号"></el-table-column>
<el-table-column prop="realityDutyUser" label="实际值班人员"></el-table-column>
<!-- <el-table-column prop="dutyMan" label="实际值班人员"></el-table-column> -->
<el-table-column prop="dutyDateStart" label="值班开始时间"></el-table-column>
<el-table-column prop="dutyDateEnd" label="值班结束时间"></el-table-column>
<el-table-column prop="dutyLog" label="值班日志"></el-table-column>
<el-table-column prop="remarks" label="备注"></el-table-column>
<el-table-column prop="createTime" label="创建时间"></el-table-column>
<el-table-column label="操作" width="200" align="center">
<template slot-scope="scope">
<el-button @click="editFun(scope.row)" size="small">
<i class="el-icon-edit-outline"></i> 详情
</el-button>
<el-button @click="detailFun(scope.row)" size="small">
<i class="el-icon-edit-outline"></i> 编辑
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
background
layout="total,sizes, prev, pager, next, jumper"
:total="tableData.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="PAGE.page"
:page-size="PAGE.size"
></el-pagination>
<BookPlanDownEdit
v-if="dialogVisible"
:dialogVisible="dialogVisible"
:editForm="formData"
:title="dialogTit"
@dialogFun="closeDialog"
@refreshTableData="getTableData"
:key="zjKey"
></BookPlanDownEdit>
</div>
</template>
<style lang="scss">
.el-table
.el-table__header-wrapper
.el-table__header
.has-gutter
.el-table_1_column_5{
width: 50%;
}
</style>
<script lang="ts">
import { Component, Vue, Provide } from "vue-property-decorator";
import BookPlanDownEdit from "./BookPlanDownEdit.vue";
import BookPlanEdit from "./BookPlanEdit.vue";
import METHOD from "@/utils/methods";
@Component({
components: { BookPlanDownEdit }
// components: { BookPlanEdit }
})
export default class CamerasMg extends Vue {
@Provide() signId: String = "";
@Provide() tableData: Object = { pageData: [], total: 0 };
@Provide() PAGE: any = { page: 1, size: 10 };
@Provide() searchData: any = { realityDutyUser:'' };
@Provide() loading: Boolean = false;
//编辑组件
@Provide() dialogVisible: Boolean = false;
@Provide() dialogTit: String = "新增预案";
@Provide() formData: Object = {};
@Provide() zjKey: any = 0;
getTableData() {
let that = this,
params = Object.assign(that.PAGE, that.searchData);
(that as any).$axios
// .post("/onDutyInfo/getOnDutyInfoList", params)
.post("/onDutyLog/getOnDutyLogList", params)
.then((res: any) => {
if( res ) that.tableData = res;
});
}
searchFun() {
this.PAGE = { page: 1, size: 10 };
this.getTableData();
}
resetFun() {
this.PAGE = { page: 1, size: 10 };
this.searchData = {};
this.getTableData();
}
addFun() {
this.zjKey++;
this.dialogVisible = true;
this.dialogTit = "新增";
}
editFun(row: any) {
this.dialogTit = "详情";
this.formData = Object.assign({}, row);
this.zjKey++;
this.dialogVisible = true;
}
detailFun(row: any) {
this.dialogTit = "编辑";
this.formData = Object.assign({}, row);
this.zjKey++;
this.dialogVisible = true;
}
delFun(row: any) {
let that = this as any;
METHOD.deleteFun(that, `/onDutyInfo/delOnDutyInfoById/${row.id}`, function() {
that.getTableData();
});
}
handleSizeChange(val: any) {
this.PAGE.size = val;
this.getTableData();
}
handleCurrentChange(val: any) {
this.PAGE.page = val;
this.getTableData();
}
closeDialog() {
//关闭窗口
this.dialogVisible = false;
this.formData = {};
}
created() {
this.getTableData();
}
}
</script>
<template>
<div class="wrapper editwrap">
<el-dialog
:visible.sync="dialogVisible"
:title="title"
:show-close="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="24">
<el-form class="el-form-class" ref="editForm" :model="editForm" :rules="rules" label-width="100px">
<!-- <div v-if="title != '详情'">
</div>
<div v-else>>
</div> -->
<div v-if="title == '提交日志'">
<el-form-item label="实际值班人员" prop="realityDutyUser" v-model="editForm.realityDutyUser">
<el-tree
:props="NumbersProps"
:data="NumberArrAll"
node-key="id"
show-checkbox
ref="zbyTree"
></el-tree>
</el-form-item>
</div>
<div v-else>
<el-form-item label="实际值班员" prop="realityDutyUser">
<el-input :readonly="true" type="textarea" v-model="editForm.realityDutyUser"></el-input>
</el-form-item>
</div>
<el-form-item label="值班开始时间" prop="dutyDateStart">
<el-date-picker
v-model="editForm.dutyDateStart"
type="datetime"
placeholder="选择日期时间"
align="right"
value-format="yyyy-MM-dd HH:mm:ss"
@change="datePick"
:readonly="true"
></el-date-picker>
</el-form-item>
<el-form-item label="值班结束时间" prop="dutyDateEnd">
<el-date-picker
v-model="editForm.dutyDateEnd"
type="datetime"
placeholder="选择日期时间"
align="right"
value-format="yyyy-MM-dd HH:mm:ss"
@change="datePick"
:readonly="true"
></el-date-picker>
</el-form-item>
<el-form-item label="值班日志" prop="dutyLog">
<el-input type="textarea" v-model="editForm.dutyLog"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input type="textarea" v-model="editForm.remarks"></el-input>
</el-form-item>
</el-form>
</el-col>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="confirmFun('editForm')" v-if="title != '详情'">提交</el-button>
<el-button @click="$emit('dialogFun')" size="small">取消</el-button>
</span>
</el-dialog>
</div>
</template>
<style lang="scss">
.w100 .el-dialog {
width: 80%;
.flcolum {
> div {
border-radius: 3px;
}
}
.yatit {
background: #4273bd;
color: #ffffff;
line-height: 2;
height: 2em;
text-align: center;
margin-bottom: 10px;
border-radius: 2px;
}
.el-transfer-panel {
width: calc((100% - 116px) / 2);
}
.el-transfer__buttons {
width: 56px;
}
.el-transfer__button {
margin-left: 0;
display: block;
}
}
.el-row .el-form-class .el-form-item__label{
width: 110px !important;
}
.el-form-class .el-form-item__content {
margin-left: 110px !important;
}
</style>
<script lang="ts">
import { Component, Vue, Provide, Prop } from "vue-property-decorator";
import { State, Getter, Mutation, Action } from "vuex-class";
import METHOD from "@/utils/methods";
@Component({
components: {}
})
export default class BookPlanDownEdit extends Vue {
// @Getter('signs') signsData: any;
@Prop(Boolean) dialogVisible!: Boolean;
@Provide() showRentPrise: Boolean = false;
@Prop(String) title!: String;
@Prop(String) id!: String;
@Prop(String) dutyId!: String;
@Prop(Object) editForm: any = {
id: "",
dutyId: "",
realityDutyUser: ""
};
@Provide() rules: any = {
// dutyId: [{ required: true, trigger: "blur", message: "该项为必填项!" }],
realityDutyUser: [{ required: true, trigger: "blur", message: "该项为必填项!" }],
dutyDateStart: [{ required: true, trigger: "blur", message: "该项为必填项!" }],
dutyDateEnd: [{ required: true, trigger: "blur", message: "该项为必填项!" }],
dutyLog: [{ required: true, trigger: "blur", message: "该项为必填项!" }]
// handoverMan: [{ required: true, trigger: "blur", message: "该项为必填项!" }]
// handoverContent: [{ required: true, trigger: "blur", message: "该项为必填项!" }]
};
@Provide() NumberArr: any = [];
@Provide() NumberArrAll: any = [];
@Provide() checkedArr: any = [];
@Provide() NumbersProps: Object = {
key: "uid",
label: "userName"
};
//取消事件要在父级取消是所以用到 $emit
confirmFun(formName: string) {
let that = this;
that.editForm.dutyId=this.dutyId;
that.editForm.realityDutyUser = that.getTreeNode("zbyTree");
// that.editForm.handoverMan = that.getTreeNode("qtrTree");
console.log(that.editForm);
(that as any).$refs[formName].validate((valid: boolean) => {
if (valid) {
(that as any).$axios
// .post("/onDutyInfo/addOrEditOnDutyInfo", that.editForm)
.post("/onDutyLog/addOrEditOnDutyLog", that.editForm)
.then(() => {
(that as any).$message({
message: "操作成功!",
type: "success"
});
(that as any).$emit("dialogFun");
that.$emit("refreshTableData"); //刷新表格
});
} else {
return false;
}
});
}
//人员
getNumberData() {
let that = this;
(that as any).$axios.get(`/user/getDutyContactsList`).then((res: any) => {
that.NumberArr = res;
that.NumberArrAll = [
{
uid: 0,
userName: "选择值班人员",
children: that.NumberArr
}
];
});
}
getTreeNode(refName: string) {
let that = this,
strs: any = [],
checkedNode;
checkedNode = (that.$refs[refName] as any).getCheckedNodes();
checkedNode.forEach((ele: any) => {
if (ele.uid != 0)
strs.push((ele.deptName || '-') + "|" + (ele.userName || '-') + "|" + (ele.mobliePhone || '-'));
});
return strs.join(",");
}
datePick(v: string) {
let today: Date = new Date(v);
let d = today.getDay(),
chnNumChar = ["日", "一", "二", "三", "四", "五", "六"];
this.editForm.dutyWeek = "星期" + chnNumChar[d];
}
created() {
}
mounted() {
this.getNumberData();
}
}
</script>
<template>
<div class="wrapper editwrap">
<el-dialog
:visible.sync="dialogVisible"
:title="title"
:show-close="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="24">
<el-form ref="editForm" :model="editForm" :rules="rules" label-width="100px">
<div v-if="title != '详情'">
<el-form-item label="值班员" prop="dutyMan">
<el-tree
:props="NumbersProps"
:data="NumberArrAll"
node-key="id"
show-checkbox
ref="zbyTree"
></el-tree>
</el-form-item>
<el-form-item label="其他人" prop="otherMan">
<el-tree
:props="NumbersProps"
:data="NumberArrAll"
node-key="id"
show-checkbox
ref="qtrTree"
></el-tree>
</el-form-item>
<el-form-item label="值班领导" prop="dutyLeaderID">
<el-select v-model="editForm.dutyLeaderID" placeholder="请选择" @change="seletChange(1)">
<el-option
v-for="item in NumberArr"
:key="item.uid"
:label="item.userName"
:value="item.uid"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="值班主任" prop="dutyDirectorID">
<el-select v-model="editForm.dutyDirectorID" placeholder="请选择" @change="seletChange(2)">
<el-option
v-for="item in NumberArr"
:key="item.uid"
:label="item.userName"
:value="item.uid"
></el-option>
</el-select>
</el-form-item>
</div>
<div v-else>
<el-form-item label="值班员" prop="dutyMan">
<el-input type="textarea" v-model="editForm.dutyMan"></el-input>
</el-form-item>
<el-form-item label="值班领导" prop="dutyLeader">
<el-input type="textarea" v-model="editForm.dutyLeader"></el-input>
</el-form-item>
<el-form-item label="值班主任" prop="dutyDirector">
<el-input type="textarea" v-model="editForm.dutyDirector"></el-input>
</el-form-item>
<el-form-item label="值班星期" prop="dutyWeek">
<el-input type="text" v-model="editForm.dutyWeek"></el-input>
</el-form-item>
</div>
<el-form-item label="值班开始时间" prop="dutyDateStart">
<el-date-picker
v-model="editForm.dutyDateStart"
type="datetime"
placeholder="选择日期时间"
align="right"
value-format="yyyy-MM-dd HH:mm:ss"
@change="datePick"
></el-date-picker>
</el-form-item>
<el-form-item label="值班结束时间" prop="dutyDateEnd">
<el-date-picker
v-model="editForm.dutyDateEnd"
type="datetime"
placeholder="选择日期时间"
align="right"
value-format="yyyy-MM-dd HH:mm:ss"
@change="datePick"
></el-date-picker>
</el-form-item>
<el-form-item label="值班类型" prop="dutyType">
<el-radio-group v-model="editForm.dutyType">
<el-radio label="1">日常值班</el-radio>
<el-radio label="2">应急值班</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否发送短信" prop="isMessage">
<el-radio-group v-model="editForm.isMessage">
<el-radio label="0"></el-radio>
<el-radio label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="短信内容" prop="message">
<el-input type="textarea" v-model="editForm.message"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input type="textarea" v-model="editForm.remarks"></el-input>
</el-form-item>
</el-form>
</el-col>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="confirmFun('editForm')" v-if="title != '详情'">提交</el-button>
<el-button @click="$emit('dialogFun')" size="small">取消</el-button>
</span>
</el-dialog>
</div>
</template>
<style lang="scss">
.w100 .el-dialog {
width: 80%;
.flcolum {
> div {
border-radius: 3px;
}
}
.yatit {
background: #4273bd;
color: #ffffff;
line-height: 2;
height: 2em;
text-align: center;
margin-bottom: 10px;
border-radius: 2px;
}
.el-transfer-panel {
width: calc((100% - 116px) / 2);
}
.el-transfer__buttons {
width: 56px;
}
.el-transfer__button {
margin-left: 0;
display: block;
}
}
</style>
<script lang="ts">
import { Component, Vue, Provide, Prop, Watch } from "vue-property-decorator";
import { State, Getter, Mutation, Action } from "vuex-class";
import METHOD from "@/utils/methods";
@Component({
components: {}
})
export default class BookPlanEdit extends Vue {
// @Getter('signs') signsData: any;
@Prop(Boolean) dialogVisible!: Boolean;
@Prop(String) title!: String;
@Prop(Object) editForm;
@Provide() rules: any = {
dutyDate: [{ required: true, trigger: "blur", message: "该项为必填项!" }],
dutyType: [{ required: true, trigger: "blur", message: "该项为必填项!" }],
dutyMan: [{ required: true, trigger: "blur", message: "该项为必填项!" }],
planTitle: [{ required: true, trigger: "blur", message: "该项为必填项!" }],
planType: [{ required: true, trigger: "blur", message: "该项为必填项!" }]
};
@Provide() NumberArr: any = [];
@Provide() NumberArrAll: any = [];
@Provide() NumbersProps: Object = {
key: "uid",
label: "userName"
};
//取消事件要在父级取消是所以用到 $emit
confirmFun(formName: string) {
let that = this;
that.editForm.dutyMan = that.getTreeNode("zbyTree");
that.editForm.otherMan = that.getTreeNode("qtrTree");
console.log(that.editForm);
(that as any).$refs[formName].validate((valid: boolean) => {
if (valid) {
(that as any).$axios
.post("/onDutyInfo/addOrEditOnDutyInfo", that.editForm)
.then(() => {
(that as any).$message({
message: "操作成功!",
type: "success"
});
(that as any).$emit("dialogFun");
that.$emit("refreshTableData"); //刷新表格
});
} else {
return false;
}
});
}
//人员
getNumberData() {
let that = this;
(that as any).$axios.get(`/user/getDutyContactsList`).then((res: any) => {
that.NumberArr = res;
that.NumberArrAll = [
{
uid: 0,
userName: "选择值班人员",
children: this.NumberArr
}
];
});
}
seletChange(key: any) {
let that = this;
that.NumberArr.forEach((ele: any) => {
if (key == 1 && ele.uid == that.editForm.dutyLeaderID) {
that.editForm.dutyLeader =
(ele.deptName || '-') + "|" + (ele.userName || '-') + "|" + (ele.mobliePhone || '-');
}
if (key == 2 && ele.uid == that.editForm.dutyDirectorID) {
that.editForm.dutyDirector =
(ele.deptName || '-') + "|" + (ele.userName || '-') + "|" + (ele.mobliePhone || '-');
}
});
}
getTreeNode(refName: string) {
let that = this,
strs: any = [],
checkedNode;
checkedNode = (that.$refs[refName] as any).getCheckedNodes();
checkedNode.forEach((ele: any) => {
if (ele.uid != 0)
strs.push((ele.deptName || '-') + "|" + (ele.userName || '-') + "|" + (ele.mobliePhone || '-'));
});
return strs.join(",");
}
datePick(v: string) {
let today: Date = new Date(v);
let d = today.getDay(),
chnNumChar = ["日", "一", "二", "三", "四", "五", "六"];
this.editForm.dutyWeek = "星期" + chnNumChar[d];
}
created() {
// let that = this;
// that.editForm ={...that.formData};
this.getNumberData();
}
mounted() {}
}
</script>
\ No newline at end of file
<template>
<div class="camerasMg">
<el-row class="topBar">
<el-col>
<el-form :inline="true" :model="searchData">
<el-form-item label>
<el-input v-model="searchData.emergencyPlanTitle" placeholder="请输方案标题"></el-input>
</el-form-item>
<el-form-item label>
<el-select v-model="searchData.emergencyPlanLevel" placeholder="请输方案等级">
<el-option label="Ⅰ级" value="Ⅰ"></el-option>
<el-option label="Ⅱ级" value="Ⅱ"></el-option>
<el-option label="Ⅲ级" value="Ⅲ"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="searchFun()">
<i class="el-icon-search"></i> 搜索
</el-button>
<el-button type="primary" @click="resetFun()">
<i class="el-icon-refresh"></i> 重置
</el-button>
</el-form-item>
<el-form-item class="fr">
<el-button plain type="primary" @click="addFun()">
<i class="el-icon-plus"></i> 添加应急处置方案
</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
<el-table :data="tableData.pageData" stripe border style="width:100%;" :loading="false">
<el-table-column width="50" type="index" label="序号"></el-table-column>
<el-table-column prop="emergencyPlanTitle" label="方案标题"></el-table-column>
<el-table-column prop="emergencyPlanLevel" label="方案等级"></el-table-column>
<el-table-column prop="emergencyPlanType" label="方案类型"></el-table-column>
<el-table-column prop="deptName" label="所属部门"></el-table-column>
<el-table-column prop="createTime" label="创建时间"></el-table-column>
<el-table-column prop="relationPlan" label="关联预案"></el-table-column>
<el-table-column label="操作" width="200" align="center">
<template slot-scope="scope">
<el-button @click="editFun(scope.row)" size="small">
<i class="el-icon-edit-outline"></i> 编辑
</el-button>
<el-button type="danger" @click="delFun(scope.row)" size="small">
<i class="el-icon-delete"></i> 删除
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
background
layout="total,sizes, prev, pager, next, jumper"
:total="tableData.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="PAGE.page"
:page-size="PAGE.size"
></el-pagination>
<DealwithNecessaryEdit
v-if="dialogVisible"
:dialogVisible="dialogVisible"
:emergencyId="formData.emergencyId"
:title="dialogTit"
@dialogFun="closeDialog"
@refreshTableData="getTableData"
:key="zjKey"
></DealwithNecessaryEdit>
</div>
</template>
<script lang="ts">
import { Component, Vue, Provide } from "vue-property-decorator";
import DealwithNecessaryEdit from "./DealwithNecessaryEdit.vue";
import METHOD from "@/utils/methods";
@Component({
components: { DealwithNecessaryEdit }
})
export default class DealwithNecessary extends Vue {
@Provide() signId: String = "";
@Provide() tableData: Object = { pageData: [], total: 0 };
@Provide() PAGE: any = { page: 1, size: 10 };
@Provide() searchData: any = { dutyMan:'' };
@Provide() loading: Boolean = false;
//编辑组件
@Provide() dialogVisible: Boolean = false;
@Provide() dialogTit: String = "新增处置方案";
@Provide() formData: Object = {};
@Provide() zjKey: any = 0;
getTableData() {
let that = this,
params = Object.assign(that.PAGE, that.searchData);
(that as any).$axios
.post("/emergencyPlan/getEmergencyPlanInfoList", params)
.then((res: any) => {
if( res ) that.tableData = res;
});
}
searchFun() {
this.PAGE = { page: 1, size: 10 };
this.getTableData();
}
resetFun() {
this.PAGE = { page: 1, size: 10 };
this.searchData = {};
this.getTableData();
}
addFun() {
this.zjKey++;
this.dialogVisible = true;
this.dialogTit = "新增";
}
editFun(row: any) {
this.dialogTit = "编辑";
this.formData = Object.assign({}, row);
this.zjKey++;
this.dialogVisible = true;
}
delFun(row: any) {
let that = this as any;
METHOD.deleteFun(that, `/emergencyPlan/deleteEmergencyPlanInfoById/${row.emergencyId}`, function() {
that.getTableData();
});
}
handleSizeChange(val: any) {
this.PAGE.size = val;
this.getTableData();
}
handleCurrentChange(val: any) {
this.PAGE.page = val;
this.getTableData();
}
closeDialog() {
//关闭窗口
this.dialogVisible = false;
this.formData = {};
}
created() {
this.getTableData();
}
}
</script>
<template>
<div class="camerasMg">
<el-row class="topBar">
<el-col>
<el-form :inline="true" :model="searchData">
<el-form-item label>
<el-input v-model="searchData.exerciseName" placeholder="请输演练名称"></el-input>
</el-form-item>
<el-form-item label>
<el-input v-model="searchData.exerciseType" placeholder="请输演练类型"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="searchFun()">
<i class="el-icon-search"></i> 搜索
</el-button>
<el-button type="primary" @click="resetFun()">
<i class="el-icon-refresh"></i> 重置
</el-button>
</el-form-item>
<el-form-item class="fr">
<el-button plain type="primary" @click="addFun()">
<i class="el-icon-plus"></i> 新增
</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
<el-table :data="tableData.pageData" stripe border style="width:100%;" :loading="false">
<el-table-column width="50" type="index" label="序号"></el-table-column>
<el-table-column prop="exerciseName" label="演练名称"></el-table-column>
<el-table-column prop="grade" label="演练等级">
<template slot-scope="scope">
<font>{{scope.row.grade}}</font>
</template>
</el-table-column>
<el-table-column prop="exerciseType" label="演练类型"></el-table-column>
<el-table-column prop="place" label="演练地点"></el-table-column>
<el-table-column prop="startTime" label="开始时间"></el-table-column>
<el-table-column prop="peopleNum" label="参演人数"></el-table-column>
<el-table-column prop="exercisePurpose" label="演练目的" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="操作" width="300" align="center">
<template slot-scope="scope">
<el-button @click="editFun(scope.row)" size="small">
<i class="el-icon-edit-outline"></i> 编辑
</el-button>
<el-button type="danger" @click="delFun(scope.row)" size="small">
<i class="el-icon-delete"></i> 删除
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
background
layout="total,sizes, prev, pager, next, jumper"
:total="tableData.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="PAGE.page"
:page-size="PAGE.size"
></el-pagination>
<DrillMgEdit
v-if="dialogVisible"
:dialogVisible="dialogVisible"
:editForm="formData"
:title="dialogTit"
@dialogFun="closeDialog"
@refreshTableData="getTableData"
:key="zjKey"
></DrillMgEdit>
</div>
</template>
<script lang="ts">
import { Component, Vue, Provide } from "vue-property-decorator";
import DrillMgEdit from "./DrillMgEdit.vue";
import METHOD from "@/utils/methods";
@Component({
components: { DrillMgEdit }
})
export default class DrillMg extends Vue {
@Provide() signId: String = "";
@Provide() tableData: Object = { pageData: [], total: 0 };
@Provide() PAGE: any = { page: 1, size: 10 };
@Provide() searchData: any = { exerciseName: "" ,exerciseType:''};
@Provide() loading: Boolean = false;
//编辑组件
@Provide() dialogVisible: Boolean = false;
@Provide() dialogTit: String = "新增";
@Provide() formData: Object = {};
@Provide() zjKey: any = 0;
@Provide() reVisible: Boolean = false;
@Provide() reId: String = "";
getTableData() {
let that = this,
params = Object.assign(that.PAGE, that.searchData);
(that as any).$axios
.post("/exerciseInfo/getExerciseInfoList", params)
.then((res: any) => {
if( res ) that.tableData = res;
});
}
searchFun() {
this.PAGE = { page: 1, size: 10 };
this.getTableData();
}
resetFun() {
this.PAGE = { page: 1, size: 10 };
this.searchData = { exerciseName: "" ,exerciseType:''};
this.getTableData();
}
addFun() {
this.zjKey++;
this.dialogVisible = true;
}
editFun(row: any) {
this.dialogTit = "编辑";
this.formData = Object.assign({}, row);
this.zjKey++;
this.dialogVisible = true;
}
delFun(row: any) {
let that = this as any;
METHOD.deleteFun(that, `/exerciseInfo/delExerciseInfoById/${row.id}`, function() {
that.getTableData();
});
}
handleSizeChange(val: any) {
this.PAGE.size = val;
this.getTableData();
}
handleCurrentChange(val: any) {
this.PAGE.page = val;
this.getTableData();
}
closeDialog() {
//关闭窗口
this.dialogVisible = false;
this.formData = {};
}
recloseDialog() {
this.reVisible = false;
}
resoveFun(row: any){
this.reVisible = true;
this.formData = Object.assign({}, row);
}
created() {
this.getTableData();
}
}
</script>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment