Commit 7bdea80e by T

第一次提交,调整后的最新版本

parents
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# fwyz
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "fwyz",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.21.1",
"core-js": "^3.6.5",
"element-plus": "^2.2.17",
"vant": "^3.1.5",
"vue": "^3.0.0",
"vue-router": "^4.0.10",
"wechat-jssdk": "^5.0.7",
"weixin-js-sdk": "^1.6.0",
"echarts": "^5.0.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/compiler-sfc": "^3.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^7.0.0",
"less": "^4.1.1",
"less-loader": "^7.3.0"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
],
"main": "index.js",
"license": "MIT"
}
<!DOCTYPE html>
<html lang="">
<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 %>favicon.ico">
<title>宁波巡特警应急装备库装备智能管控系统</title>
</head>
<script>
window._CONFIG = {};
window._CONFIG['publicURL'] = 'http://192.168.3.188:5007';
</script>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> 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>
</html>
<template>
<div id="app">
<router-view></router-view>
</div>
</template>
<script>
export default {
name: 'App'
}
</script>
import { axios } from '@/utils/request'
//post
export function postAction(url,parameter) {
return axios({
url: url,
method:'post' ,
data: parameter
})
}
//post method= {post | put}
export function httpAction(url,parameter,method) {
return axios({
url: url,
method:method ,
data: parameter
})
}
//put
export function putAction(url,parameter) {
return axios({
url: url,
method:'put',
data: parameter
})
}
//get
export function getAction(url,parameter) {
return axios({
url: url,
method: 'get',
params: parameter
})
}
//deleteAction
export function deleteAction(url,parameter) {
return axios({
url: url,
method: 'delete',
params: parameter
})
}
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
</p>
<h3>Installed CLI Plugins</h3>
<ul>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
</ul>
<h3>Essential Links</h3>
<ul>
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
</ul>
<h3>Ecosystem</h3>
<ul>
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
</ul>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>
import { createApp } from 'vue'
import App from './App.vue'
import router from "./router/index";
// 全局引入vant
import Vant from 'vant';
import 'vant/lib/index.css';
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
const app = createApp();
app.config.productionTip = false;
createApp(App).use(Vant).use(ElementPlus).use(router).mount('#app')
import { createRouter, createWebHashHistory } from "vue-router";
import Home from "../views/Home.vue";
const routes = [
{
path: "/",
name: "Home",
component: Home,
},
{
path: "/pass",
name: "pass",
component: () =>
import(/* webpackChunkName: "about" */ "../views/Pass.vue"),
},
];
const router = createRouter({
history: createWebHashHistory(),
routes,
});
export default router;
const VueAxios = {
vm: {},
// eslint-disable-next-line no-unused-vars
install(Vue, router = {}, instance) {
if (this.installed) {
return;
}
this.installed = true;
if (!instance) {
// eslint-disable-next-line no-console
console.error('You have to install axios');
return;
}
Vue.axios = instance;
Object.defineProperties(Vue.prototype, {
axios: {
get: function get() {
return instance;
}
},
$http: {
get: function get() {
return instance;
}
}
});
}
};
export {
VueAxios,
// eslint-disable-next-line no-undef
//instance as axios
}
\ No newline at end of file
import axios from 'axios'
import { VueAxios } from './axios'
// 创建 axios 实例
const request = axios.create({
// API 请求的默认前缀
baseURL: '/',
timeout: 6000 // 请求超时时间
})
request.interceptors.response.use((response) => {
return response.data
})
const installer = {
vm: {},
install (Vue) {
Vue.use(VueAxios, request)
}
}
export default request
export {
installer as VueAxios,
request as axios
}
<template>
<div>
<el-container>
<el-header height="90px">
<div class="title">宁波巡特警应急装备库装备智能管控系统</div>
</el-header>
<el-row style="margin-top: 8px;">
<el-col :span="8" style="padding-right: 10px;">
<el-card>
<template #header>
<div class="card-header">
<span>装备明细表</span>
</div>
</template>
<el-table :data="equipmentData" :height="900" border :header-cell-style="{background:'#FFFFFF',color:'#000000'}" :row-class-name="tableRowClassName">
<el-table-column prop="EqCode" label="编号" align="center" width="100"/>
<el-table-column prop="CategoryName" label="装备类别" align="center" :show-overflow-tooltip="true" width="120"/>
<el-table-column prop="MaterielName" label="装备名称" align="center" :show-overflow-tooltip="true"/>
<el-table-column prop="LocationName" label="装备位置" align="center" :show-overflow-tooltip="true" width="100"/>
<el-table-column prop="StateName" label="状态" align="center" width="90"/>
</el-table>
</el-card>
</el-col>
<el-col :span="8" style="padding-left: 10px;">
<el-card style="height: 44.25vh;">
<template #header>
<div class="card-header">
<span>仓库明细</span>
</div>
</template>
<el-row>
<el-col :span="8" v-for="item in ckList" :key="item">
<el-container style="padding: 10px;">
<el-aside width="50px" :style="'background:' + item.color" >{{item.title}}</el-aside>
<el-main :style="'font-size: 30px;color:' + item.color" >{{ chartData[item.key] || 0 }}</el-main>
</el-container>
</el-col>
<el-col :span="8" v-for="item in ckList2" :key="item">
<el-container style="padding: 10px;">
<el-aside width="50px" :style="'background:' + item.color" >{{item.title}}</el-aside>
<el-main :style="'font-size: 30px;color:' + item.color" >{{ chartData[item.key] || 0 }}</el-main>
</el-container>
</el-col>
</el-row>
</el-card>
<el-card style="height: 44.25vh;margin-top: 10px">
<template #header>
<div class="card-header">
<span>装备使用次数</span>
</div>
</template>
<div id="lineChart" style="height: 44.25vh; margin-top: -42px"/>
<!-- <template #header>
<div class="card-header">
<span>人员监控记录</span>
</div>
</template>
<el-table :data="doorLog" :height="900" border :header-cell-style="{background:'#FFFFFF',color:'#000000'}">
<el-table-column prop="PoliceName" label="姓名" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="DepartName" label="所属部门" align="center" :show-overflow-tooltip="true"/>
<el-table-column prop="DoorType" label="类型" align="center" width="120">
<template #default="scope">
{{ scope.row.DoorType == 0 ? '进门' : '出门' }}
</template>
</el-table-column>
<el-table-column prop="CreateTime" label="出入库时间" align="center" :show-overflow-tooltip="true" />
</el-table> -->
</el-card>
</el-col>
<el-col :span="8" style="padding-left: 10px;">
<el-card style="height: 44.25vh;">
<template #header>
<div class="card-header">
<span>装备借用记录表</span>
</div>
</template>
<el-table :data="borrowData" :height="410" border :header-cell-style="{background:'#FFFFFF',color:'#000000'}">
<el-table-column label="装备名称" align="center" :show-overflow-tooltip="true">
<template #default="scope">
{{ scope.row.EquName.split('-')[0] }}
</template>
</el-table-column>
<el-table-column label="装备编号" align="center" :show-overflow-tooltip="true" >
<template #default="scope">
{{ scope.row.EquName.split('-')[1] }}
</template>
</el-table-column>
<el-table-column prop="UserName" label="借用人" align="center" width="120"></el-table-column>
<el-table-column prop="BorrowTime" label="借用时间" align="center" :show-overflow-tooltip="true" />
</el-table>
</el-card>
<el-card style="height: 44.25vh;margin-top: 10px">
<template #header>
<div class="card-header">
<span>出警任务</span>
</div>
</template>
<el-table :data="warningData" :height="410" border :header-cell-style="{background:'#FFFFFF',color:'#000000'}" empty-text="暂无出警任务">
<el-table-column prop="PlanName" label="出警任务" align="center" :show-overflow-tooltip="true" />
<el-table-column label="出警装备" align="center" :show-overflow-tooltip="true">
<template #default="scope">
{{scope.row.PlanDetail.map(i => i.MaterielName).join(',')}}
</template>
</el-table-column>
<el-table-column label="出警人员" align="center" width="120" :show-overflow-tooltip="true">
<template #default="scope">
{{scope.row.PlanPolice.map(i => i.UserName).join(',')}}
</template>
</el-table-column>
<el-table-column prop="CreateTime" label="时间" align="center" :show-overflow-tooltip="true" />
</el-table>
</el-card>
</el-col>
</el-row>
</el-container>
</div>
</template>
<script>
const echarts = require('echarts')
import { getAction } from '@/api/manage'
export default {
name: 'Home',
data () {
return {
equipmentData: [],
borrowData: [],
warningData: [],
chartData: {},
ckList: [
{title: '装备总数', color: 'rgb(0,127,72)', key: 'h_EqCount'},
{title: '在库装备', color: 'rgb(46,52,244)', key: 'h_EqPublicCount'},
{title: '维修装备', color: 'rgb(154,122,45)', key: 'h_WXCount'},
],
ckList2: [
{title: '装备保养', color: 'rgb(29 197 26)', key: 'h_ByCount'},
{title: '出库装备', color: 'rgb(245 204 5)', key: 'h_BorrowCount'},
{title: '报废装备', color: 'rgb(139 10 10)', key: 'h_BfCount'},
],
srcUrl: window._CONFIG['publicURL'],
countObj: {
h_EqCount: 0,
h_EqPublicCount: 0,
h_EqPrivateCount: 0,
h_kucunCount: 0,
h_ByCount: 0,
h_jinrichukuCount: 0,
h_jinrirukuCount: 0
},
timer: null,
timer2: null
}
},
created() {
this.getEquipment()
this.getBorrowNotReturnedEquipmentLog()
this.chartStatistics()
this.getWarnData()
this.timer = setInterval(() => {
setTimeout(() => {
this.getEquipment()
this.getBorrowNotReturnedEquipmentLog()
this.chartStatistics()
this.getWarnData()
},0)
}, 30000)
setTimeout(() => {
window.location.reload()
}, 1000*3600*6)
},
mounted() {
this.getLineChart()
this.timer2 = setInterval(() => {
setTimeout(() => {
this.getLineChart()
},0)
}, 30000)
},
beforeUnmount(){
clearInterval(this.timer);
this.timer = null;
clearInterval(this.timer2);
this.timer2 = null;
},
methods: {
getWarnData() {
getAction(window._CONFIG['publicURL'] + '/api/Plan/GetAllOpenPlan').then(res => {
this.warningData = res
})
},
tableRowClassName({row}) {
if (row.Type === 11) {
return 'warning-row';
}
return '';
},
getEquipment() {
getAction(window._CONFIG['publicURL'] + '/api/Equipment?Page=1&Rows=20&Sort=ID&Order=ESC').then(res => {
this.equipmentData = res.Rows
})
},
getBorrowNotReturnedEquipmentLog() {
getAction(window._CONFIG['publicURL'] + '/api/Borrow/GetBorrowNotReturnedEquipmentLog?Page=1&Rows=10&Sort=BorrowTime&Order=DESC').then(res => {
this.borrowData = res.Rows
})
},
chartStatistics() {
getAction(window._CONFIG['publicURL'] + '/api/ChartStatistics').then(res => {
this.chartData = res
})
},
getLineChart() {
getAction(window._CONFIG['publicURL'] + '/api/ChartStatistics/GetEqRate').then(res => {
var chart = echarts.init(document.getElementById('lineChart'));
let option = {
// title: {
// //text: '装备使用次数',
// x:'center',
// y:'top',
// padding: [20, 0, 0, 0],
// textStyle: { //主标题样式
// fontSize: 20, //字体大小
// },
// },
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
xAxis: {
type: 'category',
data: res.Rows.map((i,index) => {
if(index%2) {
return '\n' + i.MaterialName
} else {
return i.MaterialName
}
}),
axisLabel: {
interval: 0
},
},
yAxis: {
type: 'value'
},
series: [
{
name: '使用次数',
data: res.Rows.map(i => i.UseCount),
type: 'bar'
}
]
};
chart.setOption(option);
})
}
}
}
</script>
<style lang="less" scope>
.el-header {
background-color: #44b4ff;
color: #fff;
text-align: center;
line-height: 90px;
.title {
font-size: 42px;
font-weight: 700;
}
}
.el-card__header {
background-color: #62d2ff;
.card-header {
font-size: 25px;
font-weight: 550;
color: #fff;
text-align: center;
}
}
.el-card__body {
padding: 0 !important;
}
.topTitle{
flex: 1;
font-size: 24px;
font-weight: 520;
padding-left: 20px;;
}
.el-table .warning-row {
background: oldlace;
}
.block {
padding: 30px 0;
text-align: center;
border-right: solid 1px var(--el-border-color);
display: inline-block;
width: 49%;
box-sizing: border-box;
vertical-align: top;
}
// .el-carousel__item:nth-child(2n) {
// background-color: #99a9bf;
// }
// .el-carousel__item:nth-child(2n + 1) {
// background-color: #d3dce6;
// }
.el-aside {
display:flex;/*实现垂直居中*/
align-items:center;/*实现水平居中*/
justify-content:center;
color: #fff;
writing-mode: vertical-lr;
margin: 0 auto;
}
.el-main {
background-color: #E9EEF3;
color: #333;
text-align: center;
line-height: 120px;
}
</style>
\ No newline at end of file
<template>
<div id="verify_msg">
<div class="ver_header_bg">
<img src="../assets/cnag_ver_header_bg.jpg">
</div>
<div class="ver_success">
<strong>验证成功</strong>
</div>
<div class="ver_box">
<div class="ver_head_img">
<img src="../assets/ver_head.jpg">
</div>
<!-- <div class="img_title ver_title">
档案照片(点击放大)
</div> -->
<div class="clearfix checkImg" style="text-align:center;">
<div class="fl" style="display:inline-block;" v-if="result.backImagePath">
<a data-name="backImagePath" @click="open(index)">
<img data-name="backImagePath" :src="result.backImagePath">
</a>
</div>
<div class="fl" style="display:inline-block;" v-if="result.frontImagePath">
<a data-name="frontImagePath" @click="open(index)">
<img data-name="frontImagePath" :src="result.frontImagePath">
</a>
</div>
</div>
<!-- <div id="frontAndBack" class="clearfix fb">
<p class="fl fb_one">背面</p>
<p class="fr fb_two">正面</p>
</div> -->
<!-- <div class="msg_title ver_title">
档案信息
</div> -->
<div>
<table>
<tr>
<td colspan=2>
<span class="ver_name">认证编号:</span><span data-name="certificationNumber" class="ver_meg big_width">
{{ result.proCode }}
</span>
</td>
</tr>
<tr>
<td colspan=2>
<span class="ver_name">钱币名称:</span>
<span data-name="name" class="ver_meg big_width" v-if="result.name.length > 16">
{{ result.name.substring(0, 16) }}
<br/>
{{ result.name.substring(16, result.name.length) }}
</span>
<span data-name="name" class="ver_meg big_width" v-else>
{{ result.name }}
</span>
</td>
</tr>
<tr>
<td>
<span class="ver_name">评级结果:</span>
<span data-name="confirmLevel" class="ver_meg short_width">
{{ result.confirmLevel }}
</span>
</td>
<td>
<span class="ver_name">年份:</span>
<span data-name="faceCoinYear" class="ver_meg short_width">
{{ result.faceCoinYear }}
</span>
</td>
</tr>
<tr>
<td>
<span class="ver_name">材质:</span>
<span data-name="textureCode1" class="ver_meg short_width">
{{ result.textureCode1 }}
</span>
</td>
<td>
<span class="ver_name">面额(元):</span>
<span data-name="denomination" class="ver_meg short_width">
{{ result.denomination }}
</span>
</td>
</tr>
<tr>
<td colspan=2>
<span class="ver_name">造币厂:</span>
<span data-name="castingUnit" class="ver_meg big_width">
{{ result.castingUnit }}
</span>
</td>
</tr>
<tr>
<td colspan=2>
<span class="ver_name">最大发行量:</span>
<span data-name="maxCirculation" class="ver_meg big_width">
{{ result.maxCirculation }}
</span>
</td>
</tr>
<tr>
<td>
<span class="ver_name">直径(mm):</span>
<span data-name="diameter" class="ver_meg short_width">
{{ result.diameter }}
</span>
</td>
<td>
<span class="ver_name">质量:</span>
<span data-name="quality" class="ver_meg short_width">
{{ result.quality }}
</span>
</td>
</tr>
<tr>
<td colspan=2>
<span class="ver_name">正面图案:</span>
<span data-name="frontPatternDescribe1" class="ver_meg big_width">
{{ result.frontPatternDescribe1 }}
</span>
</td>
</tr>
<tr>
<td colspan=2>
<span class="ver_name">背面图案:</span>
<span data-name="backPatternDescribe1" class="ver_meg big_width">
{{ result.backPatternDescribe1 }}
</span>
</td>
</tr>
</table>
</div>
</div>
<div class="ver_back">
<a href="/wx/index.html">真伪验证</a>
</div>
</div>
</template>
<script>
import { ImagePreview } from 'vant';
export default {
name: 'Pass',
data () {
return {
result: {}
}
},
created() {
this.result = JSON.parse(this.$route.query._objStr)
},
methods: {
open () {
ImagePreview([this.result.backImagePath]);
}
}
}
</script>
<style scoped>
#verify_msg .ver_header_bg img{
width: 100%;
}
#verify_msg .ver_box{
width: 96%;
margin: 0 auto;
background: #f3dfba;
padding-bottom: 1em;
}
#verify_msg .ver_head_img img{
width: 100%;
}
.ver_title{
color: #e40000;
text-align: center;
font-size: .8em;
margin-top: .8em;
margin-bottom: .8em;
}
.checkImg .fr, .checkImg .fl{
width: 40%;
background: #fff;
padding: .4em 0.4em .4em;
overflow: hidden;
height: 7.2em;
}
.checkImg .fr{
margin-right: 4%;
}
.checkImg .fl{
margin-left: 4%;
}
.checkImg .fr img, .checkImg .fl img{
width: 100%;
height: 100%;
}
table{
width: 92%;
margin: 0 auto;
font-size: .8em;
color: #8a641b;
}
table .ver_name{
font-weight: bold;
vertical-align: middle;
display: inline-block;
}
table .ver_meg{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
vertical-align: middle;
display: inline-block;
}
table td{
padding: .3em 0 .4em .5em;
border-bottom: 1px solid #e4c58b;
width: 50%;
}
.msg_title{
margin-top: 1.2em;
margin-bottom: .4em;
}
#ver_mark{
position: fixed;
bottom: 1em;
right: 1em;
width: 2.2em;
height: 2.2em;
}
.big_width{
max-width: 20em;
}
.short_width{
max-width: 8em;
}
.ver_success{
text-align: center;
padding: .4em;
}
.ver_success strong{
font-size: 1em;
color: #0271c0;
}
.ver_back{
padding: 1.4em 0;
text-align: center;
}
.ver_back a{
font-size: 1em;
color: #fff;
background: #366cd7;
padding: .3em 4em;
letter-spacing: .4em;
border-radius: 6px;
}
.fb p{
width: 40%;
text-align: center;
font-size: .8em;
color: #8a641b;
}
.fb_one{
margin-left: 4%;
}
.fb_two{
margin-right: 4%;
}
</style>
\ No newline at end of file
module.exports = {
publicPath: './',
devServer: {
host: '192.168.2.246',
port: 10051,
proxy: {
'/cnagerp': {
target: 'http://114.255.139.109:9001',
ws: false,
changeOrigin: true
}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论