Commit 7969d656 authored by “yiyousong”'s avatar “yiyousong”

pref:清理无用文件

parent 85ccaee8
<template>
<div class="new-page" :style="`min-height: ${pageMinHeight}px`">
<h1>{{$t('content')}}</h1>
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
name: 'Demo',
i18n: require('./i18n'),
data() {
return {
}
},
computed: {
...mapState('setting', ['pageMinHeight']),
desc() {
return this.$t('description')
}
}
}
</script>
<style scoped lang="less">
@import "index";
</style>
\ No newline at end of file
module.exports = {
messages: {
CN: {
content: '演示页面',
description: '这是一个演示页面'
},
HK: {
content: '演示頁面',
description: '這是一個演示頁面'
},
US: {
content: 'Demo Page',
description: 'This is a demo page'
}
}
}
\ No newline at end of file
import Demo from './Demo.vue'
export default Demo
\ No newline at end of file
.new-page{
height: 100%;
background-color: @base-bg-color;
text-align: center;
padding: 200px 0 0 0;
border-radius: 4px;
//margin-top: -24px;
h1{
font-size: 48px;
}
}
\ No newline at end of file
<template>
<a-modal
:title="title"
:visible="formVisible"
@cancel="formVisible = false"
>
<div slot="footer">
<a-button @click="resetForm">重置</a-button>
<a-button type="primary" :loading="formConfirmLoading" @click="handleOk">确定</a-button>
</div>
<slot>
<a-form-model
ref="ruleForm"
:model="formInfo"
:rules="formRules"
:label-col="{span:labelCol}"
:wrapper-col="{span: wrapperCol}"
>
<p class="msg primary-color"><a-icon type="info-circle" /> 提示:预警时长是指在判定时长以内,系统提前一段时间向管理员发送预警信息</p>
<a-form-model-item label="预警时长" prop="warning_time">
<w-input v-model.number="formInfo.warning_time" placeholder="请输入预警时长" suffix="分钟"/>
</a-form-model-item>
<p class="msg primary-color"><a-icon type="info-circle" /> 提示:提示时长是指在判定时长以内,系统提前一段时间向工作人员发送提示信息</p>
<a-form-model-item label="提示时长" prop="tips_time">
<w-input v-model.number="formInfo.tips_time" placeholder="请输入提示时长" suffix="分钟"/>
</a-form-model-item>
<p class="msg primary-color"><a-icon type="info-circle" /> 提示:判定时长是指异常行为到达判定时长之后,系统向管路员发送提示信息,并记录一次扣分</p>
<a-form-model-item label="判定时长" prop="determine_time">
<w-input v-model.number="formInfo.determine_time" placeholder="请输入判定时长" suffix="分钟"/>
</a-form-model-item>
<a-form-model-item label="算法类型" prop="algorithm">
<w-input v-model="formInfo.algorithm" type="select" :dictionaries="$dictionaries('algorithm')" placeholder="请输入算法类型"/>
</a-form-model-item>
</a-form-model>
</slot>
</a-modal>
</template>
<script>
import form from "@/mixins/form"
export default {
mixins:[form],
props:{
labelCol:{
type:Number,
default:5,
},
wrapperCol:{
type:Number,
default:16,
}
},
data(){
return{
tablename:"aimodel",//接口名称
formInfo:{
aimodel:"",//监察模型
algorithm:"",//算法类型
warning_time:0,//预警时长 分钟
tips_time:0,//提示时长 分钟
determine_time:0//判定时长 分钟
},//表单提交数据
formRules:{
algorithm:[{ required: true, message: '算法类型不能为空', trigger: ['blur','change'] }],
},//表单验证
title:"提示"
}
},
methods:{
// 保存
handleOk(){
this.formSave()
},
// 新增
onAdd(){
this.resetForm()//初始化表单
this.formInfo.id && this.$delete(this.formInfo,'id')
this.title = "新增"
this.formVisible = true
},
// 编辑
onEdit(row){
this.formVisible = true
let editObj = {id:row.id}
Object.keys(this.formInfo).forEach(v=>{
editObj[v] = row[v]
})
this.formInfo = editObj
this.title = `${this.formInfo.aimodel}编辑`
}
}
}
</script>
<style lang="less" scoped>
.msg{
font-size: 12px;
}
</style>
\ No newline at end of file
<template>
<div class="ff aimodel viewbox">
<h2>监察模型</h2>
<div class="aimodel-t">
通过视频监控识别技术分析窗口工作人员的人体动作,检测违规行为。违规行为消息即时推送至管理员进行核查,有效加强行政效能监察,强化服务窗口督查。
</div>
<div class="aimodel-box flex_row">
<div class="aimodel-item" v-for="(item,index) in tabledataSource" :key="item.id" :class="{disable:item.status == 0}">
<div class="aimodel-item-b">
<div class="aimodel-i-h">
<h3>{{item.aimodel}}</h3>
<images :src="item.picture"/>
</div>
<div class="aimodel-i-c">
<div class="aimodel-row flex_row flex_justify_b" v-if="item.settime1">
<p class="aimodel-lable">{{item.timenum==2?'离开判定时长':'判定时长'}}</p>
<p class="aimodel-val">{{item.settime1}}分钟</p>
</div>
<div class="aimodel-row flex_row flex_justify_b" v-if="item.timenum == 2">
<p class="aimodel-lable">离岗判定时长</p>
<p class="aimodel-val">{{item.settime2}}分钟</p>
</div>
<div class="aimodel-row flex_row flex_justify_b">
<p class="aimodel-lable">算法适配</p>
<p class="aimodel-val">{{$dictionaryValue('algorithm',item.algorithm)}}</p>
</div>
</div>
<div class="aimodel-i-f flex_row flex_justify_b">
<div>
<a-row>
<a-col :span="12">是否启用</a-col>
<w-input v-model="item.valid" :span="12" type="switch" @change="onvalid(index)"/>
</a-row>
</div>
<div @click="OnTableEdit(item)" style="cursor: pointer;">编辑</div>
</div>
</div>
</div>
<div class="aimodel-item">
<div class="aimodel-item-add flex_row flex_align_c">
<div>
<img src="./img/nav5.png" alt="">
<p>更多模型正在生存中<br/>尽情期待~</p>
</div>
</div>
</div>
</div>
<show ref="pageshow" @success="getTableInfo"/>
</div>
</template>
<script>
import table from "@/mixins/table"
import show from "./form"
import {aimodelSave} from "@/services/default"
export default {
mixins:[table],
data(){
return{
tablename:"aimodel",//接口地址 名称
tabledataSource:[],//表格数据
}
},
methods:{
onvalid(i){
const arr = Object.assign({},this.tabledataSource)
let obj = arr[i]
console.log(obj)
aimodelSave({id:obj.id,valid:obj.valid}).then(res=>{
const {code,msg} = res.data
if(code == 0){
this.$message.success('修改成功')
}else{
arr[i].valid = obj.valid == 1?0:1
this.tabledataSource = arr
this.$message.error(msg)
}
})
}
},
components:{
show
}
}
</script>
<style lang="less" scoped>
.aimodel{
background:#fff url(./img/bg.png) no-repeat center;
background-size: 40%;
min-height: 750px;
.disable{
position: relative;
&::after{
content:"";
position: absolute;
left: 0;
top: 0;
z-index: 1;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, 0.3);
}
}
h2{
font-size: 20px;
text-align: center;
padding-top: 40px;
font-weight: bold;
}
.aimodel-box{
margin-top: 40px;
}
.aimodel-t{
text-align: center;
margin:0 auto;
width: 50%;
}
.aimodel-item{
width: 20%;
box-sizing: border-box;
padding:0 20px;
.aimodel-item-b{
background: linear-gradient(180deg, rgba(23, 67, 198, 1) 0%, rgba(31, 116, 223, 1) 51%, rgba(44, 140, 240, 1) 99%);
border-radius: 8px;
min-height: 350px;
padding:5px;
color: #fff;
position: relative;
overflow: hidden;
}
.aimodel-i-h{
text-align: center;
border-bottom: 1px solid rgba(255, 255, 255, 0.5);
padding-bottom: 30px;
h3{
color: #fff;
padding:20px 0;
font-weight: bold;
font-size: 18px;
}
img{
display: inline-block;
width: 80%;
height: 110px;
}
}
.aimodel-i-c{
padding-bottom: 70px;
height: 163px;
}
.aimodel-lable{
text-align: left;
}
.aimodel-val{
text-align: right;
}
.aimodel-row{
p{
margin: 10px 0 0;
}
}
.aimodel-i-f{
position: absolute;
left: 0;
bottom: 0;
width: 100%;
padding: 10px 0;
text-align: center;
background: rgba(0, 0, 0, 0.5);
&>div{
flex: 1;
&:first-child{
border-right: 1px solid #fff;
}
}
}
}
.aimodel-item-add{
height: 100%;
background: rgba(242, 242, 242, 1);
border-radius: 8px;
min-height: 350px;
padding:5px;
color: #202020;
position: relative;
overflow: hidden;
text-align: center;
img{
width: 50%;
}
p{
font-weight: bold;
margin-top:20px;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="analyse">
<div class="search ff">
<a-form layout="inline">
<a-form-item>
<w-input type="month" v-model="month" placeholder="请选择时间"/>
</a-form-item>
<a-form-item style="padding-top:4px">
<a-button type="primary" @click="getInit">搜索</a-button>
</a-form-item>
</a-form>
</div>
<div class="viewbox">
<a-row :gutter="[20,20]">
<a-col :span="8">
<div class="analyse-card ff">
<h2 class="t primary-color">每一分的进步都是一种成长</h2>
<gauge style="height:385px" :option="gaugeoption"/>
<div class="analyse-b flex_row flex_justify_a">
<div class="analyse-b-i ">
<p>离岗算法准确率</p>
<gaugePie style="height:100px" :option="lgoption"/>
</div>
<div class="analyse-b-i ">
<p>离开算法准确率</p>
<gaugePie style="height:100px" :option="lkoption"/>
</div>
<div class="analyse-b-i ">
<p>玩手机算法准确率</p>
<gaugePie style="height:100px" :option="wsjoption"/>
</div>
<div class="analyse-b-i ">
<p>睡岗算法准确率</p>
<gaugePie style="height:100px" :option="sgoption"/>
</div>
<div class="analyse-b-i ">
<p>扶头算法准确率</p>
<gaugePie style="height:100px" :option="ftoption"/>
</div>
</div>
</div>
</a-col>
<a-col :span="16">
<div class="analyse-card ff p-l-15 p-r-15">
<h3>本月异常行为情况展示</h3>
<pieCalendar style="height:405px" :moments="month" :info="errdata"/>
</div>
</a-col>
<a-col :span="8">
<div class="analyse-card ff p-l-15 p-r-15">
<h3>本月扣分部门Top5</h3>
<barloading style="height:405px" :option="topoption"/>
</div>
</a-col>
<a-col :span="16">
<div class="analyse-card ff p-l-15 p-r-15">
<h3>本月扣分窗口排名Top10</h3>
<bar style="height:405px" :option="top10option"/>
</div>
</a-col>
</a-row>
</div>
</div>
</template>
<script>
import {gauge,gaugePie,pieCalendar,bar,barloading} from "@/components/echats"
import {analysisfrom,sectiontop,ycdata,windowtop} from "@/services/default"
import moment from "moment"
export default {
data(){
return{
gaugeoption:{},
lgoption:{},
lkoption:{},
wsjoption:{},
sgoption:{},
ftoption:{},
topoption:{},
top10option:{},
errdata:[],
month:moment().format('YYYY-MM')//月份
}
},
created(){
this.getInit()
},
methods:{
getInit(){
this.getanalysisfrom()
this.getsectiontop()
this.getycdata()
this.getwindowtop()
},
getanalysisfrom(){
analysisfrom({month:this.month}).then(res=>{
const{code,data,msg} = res.data
if(code == 0){
this.gaugeoption = this.optionfn(data.accuracy_lv,'综合正确率')
this.lgoption = this.optionfn(data.lg_lv,'正确率')
this.lkoption = this.optionfn(data.lk_lv,'正确率')
this.wsjoption = this.optionfn(data.wsj_lv,'正确率')
this.sgoption = this.optionfn(data.sj_lv,'正确率')
this.ftoption = this.optionfn(data.ft_lv,'正确率')
}else{
this.$message.error(msg)
}
})
},
getsectiontop(){
sectiontop({month:this.month}).then(res=>{
const{code,data,msg} = res.data
if(code == 0){
let x = []
let y = []
data.forEach(element => {
x.unshift(element.name)
y.unshift(element.score)
});
const option = {
yAxis:{
data:x
},
series:[
{
data:y
},
{
data:y
},
]
}
this.topoption = option
}else{
this.$message.error(msg)
}
})
},
getycdata(){
ycdata({month:this.month}).then(res=>{
const{code,data,msg} = res.data
if(code == 0){
console.log(data)
this.errdata = data
}else{
this.$message.error(msg)
}
})
},
getwindowtop(){
windowtop({month:this.month}).then(res=>{
const{code,data,msg} = res.data
if(code == 0){
let x = []
let y = []
data.forEach(v=>{
x.push(v.window_name)
y.push(v.score)
})
let options = {
xAxis:{
data: x
},
series:[
{
data:y
}
]
}
this.top10option = options
}else{
this.$message.error(msg)
}
})
},
optionfn(value,name){
const option = {
series:[
{
data: [
{
value: value,
name: name
}
]
}
]
}
return option
}
},
components:{
gauge,
gaugePie,
pieCalendar,
bar,
barloading
}
}
</script>
<style lang="less" scoped>
.search{
padding: 10px 20px;
}
.analyse-card{
position: relative;
border-radius: 8px;
font-size: 12px;
.t{
text-align: center;
padding-top: 20px;
}
.analyse-b{
position: absolute;
left: 0;
bottom: 0;
right: 0;
}
.analyse-b-i{
flex: 1;
p{
margin: 0;
text-align: center;
}
}
h3{
font-size: 14px;
padding-top:10px;
font-weight: bold;
}
}
</style>
\ No newline at end of file
<template>
<div class="ff p-t-15 p-l-15 p-r-15 p-b-15 viewbox">
<Standardtable
:columns="tablecolumns"
:dataSource="tabledataSource"
:bordered="true"
:selectedRows="selectedRows"
:columnsSearch="columnsSearch"
:pagination="pagination"
:loading="tableLoading"
@selectedRowChange="selectedRowChange"
@add="OnTableAdd"
@del="OnTableAllDel"
@Search="onSearch"
@change="handleTableChange"
>
<exportFile slot="search-add">
<a-button type="primary">导出文件</a-button>
</exportFile>
<div slot="search-del"></div>
<div slot="search-more"></div>
</Standardtable>
<show ref="pageshow" @success="getTableInfo"/>
</div>
</template>
<script>
import table from "@/mixins/table"
import show from "./pageshow"
export default {
mixins:[table],
data(){
return{
tablename:"appeal",//接口地址 名称
tablecolumns:[
{
title: "序号",
width: "70px",
customRender:this.RenderIndex
},
{
title: "申诉人",
dataIndex: "workman_name",
},
{
title: "申诉说明",
dataIndex: "appeal_text",
},
{
title: "申诉时间",
dataIndex: "create_time",
},
{
title: "审核人",
dataIndex: "appeal_sh_name",
},
{
title: "申诉结果",
dataIndex: "appeal_result",
customRender:(text)=>{
let obj = this.$dictionaryValue('appeal_result',text,'obj')
return <span style={{'color':obj.color}}>{obj.label}</span>
}
},
{
title: "操作",
width: "200px",
customRender:(text, record)=>{
if(text == 1){
return (
<div>
<span class="redact mr" value={record} onClick={()=>this.onAppeal(record)}>审批</span>
<tableActive show={true} edit={false} del={false} record={record} onEdit={this.OnTableEdit} onDel={this.OnTableDel} onShow={this.onPageShow}/>
</div>
)
}else{
return (
<div>
<tableActive show={true} edit={false} del={false} record={record} onEdit={this.OnTableEdit} onDel={this.OnTableDel} onShow={this.onPageShow}/>
</div>
)
}
}
},
],//表头数据
tabledataSource:[],//表格数据
columnsSearch:[
{type:'text',dataIndex:'workman_name',span:5,width:150,dictionaries:[{label:'全部',value:''},{label:'选项1',value:1},{label:'选项2',value:2}],placeholder:"请输入申诉人"},
{type:'date',dataIndex:'time',span:5,width:150,placeholder:"请输入申诉时间"},
]//表格查询条件
}
},
methods:{
onPageShow(row){
this.$refs.pageshow.onShow(row)
},
onAppeal(row){
this.$refs.pageshow.onShow(row)
}
},
components:{
show
}
}
</script>
\ No newline at end of file
<template>
<a-drawer
title="详情"
:width="450"
placement="right"
:visible="visible"
@close="visible = false"
>
<div class="p-w">
<h2 class="primary-color">违规说明</h2>
<a-row>
<a-col :span="12">
<div class="p-w-r flex_row">
<div class="p-l">工作人员:</div>
<div class="p-v">{{info.alert.workman_name}}</div>
</div>
</a-col>
<a-col :span="12">
<div class="p-w-r flex_row">
<div class="p-l">扣分分值:</div>
<div class="p-v">{{info.alert.role_score}}</div>
</div>
</a-col>
<a-col :span="12">
<div class="p-w-r flex_row">
<div class="p-l">扣分原因:</div>
<div class="p-v">{{$dictionaryValue('warn_alert',info.alert.warn_alert)}}</div>
</div>
</a-col>
<a-col :span="12">
<div class="p-w-r flex_row">
<div class="p-l">时长:</div>
<div class="p-v">{{info.alert.duration}}</div>
</div>
</a-col>
<a-col :span="24">
<div class="p-w-r flex_row">
<div class="p-l">报警时间:</div>
<div class="p-v">{{info.alert.last_time}}</div>
</div>
</a-col>
<a-col :span="24">
<div class="p-w-r flex_row">
<div class="p-l">报警附件:</div>
<div class="p-v flex_row"><thumbImage v-for="(item,index) in info.alert.picture" :key="index" :src="info.alert.picture" :index="index" style="margin-right:5px"/></div>
</div>
</a-col>
<a-col :span="24">
<div class="p-w-r flex_row">
<div class="p-l">处理意见:</div>
<div class="p-v">{{info.sp.appeal_sh_text}}</div>
</div>
</a-col>
</a-row>
</div>
<div class="p-w">
<h2 class="primary-color">申诉说明</h2>
<a-row>
<a-col :span="12">
<div class="p-w-r flex_row">
<div class="p-l">申诉人:</div>
<div class="p-v">{{info.appeal.workman_name}}</div>
</div>
</a-col>
<a-col :span="12">
<div class="p-w-r flex_row">
<div class="p-l">申诉时间:</div>
<div class="p-v">{{info.appeal.create_time}}</div>
</div>
</a-col>
<a-col :span="24">
<div class="p-w-r flex_row">
<div class="p-l">申诉说明:</div>
<div class="p-v">{{info.appeal.appeal_text}}</div>
</div>
</a-col>
<a-col :span="24">
<div class="p-w-r flex_row">
<div class="p-l">申诉附件:</div>
<div class="p-v flex_row"><thumbImage v-for="(item,index) in info.appeal.pic_path" :key="index" :src="info.appeal.pic_path" :index="index" style="margin-right:5px"/></div>
</div>
</a-col>
</a-row>
</div>
<div class="p-w" style="background:#fff4f4" v-if="info.sp.appeal_sh_text != 1">
<h2 class="primary-color">申诉审批</h2>
<a-row>
<a-col :span="24">
<div class="p-w-r flex_row">
<div class="p-l">审批结果:</div>
<div class="p-v">{{$dictionaryValue('appeal_result',info.sp.appeal_result)}}</div>
</div>
</a-col>
<a-col :span="24">
<div class="p-w-r flex_row">
<div class="p-l">审批意见:</div>
<div class="p-v">{{info.sp.appeal_sh_text}}</div>
</div>
</a-col>
</a-row>
</div>
<div class="p-w" style="background:#fff4f4" v-if="info.sp.appeal_sh_text == 1">
<h2 class="primary-color">申诉审批</h2>
<a-row>
<a-col :span="24">
<div class="p-w-r flex_row">
<div class="p-l">审批结果:</div>
<div class="p-v">
<w-input type="radio" v-model="form.appeal_result" :dictionaries="[{label:'审核通过',value:2},{label:'审核不通过',value:3}]" />
</div>
</div>
</a-col>
<a-col :span="24">
<div class="p-w-r flex_row">
<div class="p-l">审批意见:</div>
<div class="p-v" style="flex:1">
<w-input type="textarea" v-model="form.appeal_sh_text"/>
</div>
</div>
</a-col>
</a-row>
</div>
<div style="height:53px"></div>
<div class="footer">
<a-button type="primary" @click="onSave" v-if="info.sp.appeal_sh_text == 1">提交</a-button>
<a-button style="margin-left:10px" @click="visible = false">关闭</a-button>
</div>
</a-drawer>
</template>
<script>
import {appealInfo,appealsh} from "@/services/default"
export default {
data(){
return{
visible:false,
info:{
alert:{},
appeal:{},
sp:{}
},
row:{},
form:{
appeal_sh_text:"",
appeal_result:2
}
}
},
methods:{
onShow(row){
this.form.appeal_sh_text = ''
this.form.appeal_result = 2
this.row = row
this.visible = true
appealInfo({id:row.id}).then(res=>{
console.log(res)
const {code,data,msg} = res.data
if(code == 0){
this.info = data
}else{
this.$message.error(msg)
}
})
},
onSave(){
let form = {
id:this.row.id,
...this.form
}
appealsh(form).then(res=>{
const {code,msg} = res.data
if(code == 0){
this.visible = false
this.$parent.getTableInfo()
}else{
this.$message.error(msg)
}
})
}
}
}
</script>
<style lang="less" scoped>
.footer{
position: absolute;
left: 0;
bottom: 0;
right: 0;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
background: #fff;
}
.p-tit{
padding: 10px 15px;
color: #ff4d4f;
background: #fff1f1;
font-weight: blod;
border-left: 4px solid #ff4d4f;
}
.p-w{
margin-bottom: 20px;
background: #f1f7fd;
border-radius: 6px;
padding: 10px;
position: relative;
.p-w-r{
margin-bottom: 10px;
}
.p-l{
width: 80px;
text-align: right;
}
h2{
font-weight: bold;
}
.p-photo{
position: absolute;
top:20px;
right: 20px;
width: 100px;
height: 120px;
img{
display: block;
width: 100%;
height: 100%;
}
}
}
</style>
\ No newline at end of file
<template>
<div>
<div>
<a-button type="danger" @click="clear">清除规则</a-button>
</div>
<div class="camera-c" style="width:314px;height:300px" ref="canvasbox">
<canvas id="myCanvas" width="314" height="300"></canvas>
</div>
</div>
</template>
<script>
export default {
props:['value'],
model: {
prop: 'value',
event: 'change.value'
},
data(){
return {
line:[],
ctx:null,
clientWidth:"",
clientHeight:""
}
},
watch:{
line:function(v){
let ctx = this.ctx
ctx.beginPath();
ctx.lineWidth="2";
ctx.strokeStyle="#000";
v.forEach((element) => {
if(v.length == 1){
ctx.moveTo(element.x,element.y);
}else{
ctx.lineTo(element.x,element.y);
}
});
ctx.stroke(); // 进行绘制
},
value:function(val){
console.log(val)
if(val){
this.line = JSON.parse(val).map(v=>{
v.x = v.x*this.clientWidth
v.y = v.y*this.clientHeight
return v
})
}else{
this.clear()
}
}
},
mounted(){
const event = this.$refs.canvasbox
const{clientWidth,clientHeight} = event
this.clientWidth = clientWidth
this.clientHeight = clientHeight
let c = document.getElementById("myCanvas");
let ctx = c.getContext("2d");
this.ctx = ctx
let _this = this
event.addEventListener('click',function(e){
const {offsetX,offsetY} = e
_this.line.push({x:offsetX,y:offsetY})
let newArr = JSON.parse(JSON.stringify(_this.line))
newArr.map(v=>{
v.x = v.x/clientWidth
v.y = v.y/clientHeight
return v
})
console.log(newArr)
_this.$emit('change.value',JSON.stringify(newArr))
})
},
methods:{
clear(){
this.line = []
this.ctx.clearRect(0,0,314,300);
this.$emit('change.value','')
}
}
}
</script>
<style lang="less" scoped>
.camera-c{
border:1px solid #999
}
</style>
\ No newline at end of file
<template>
<a-modal
:title="title"
:visible="formVisible"
@cancel="formVisible = false"
>
<div slot="footer">
<a-button @click="resetForm">重置</a-button>
<a-button type="primary" :loading="formConfirmLoading" @click="handleOk">确定</a-button>
</div>
<slot>
<a-form-model
ref="ruleForm"
:model="formInfo"
:rules="formRules"
:label-col="{span:labelCol}"
:wrapper-col="{span: wrapperCol}"
>
<a-form-model-item label="摄像头" prop="camera_id">
<div>{{camera_name}}</div>
</a-form-model-item>
<a-form-model-item label="规则坐标轴" prop="detection_area">
<w-input v-model="formInfo.detection_area" placeholder="请输入规则坐标轴"/>
</a-form-model-item>
<a-form-model-item label="绘制规则">
<areaCanvas class="camera-area" v-model="formInfo.detection_area" v-if="formVisible"/>
</a-form-model-item>
</a-form-model>
</slot>
</a-modal>
</template>
<script>
import form from "@/mixins/form"
import {areaInfo} from "@/services/default"
import areaCanvas from "./areaCanvas"
export default {
mixins:[form],
props:{
labelCol:{
type:Number,
default:5,
},
wrapperCol:{
type:Number,
default:16,
}
},
data(){
return{
tablename:"area",//接口名称
camera_name:"",//摄像头名
formInfo:{
camera_id:"",//摄像头id
detection_area:"",//规则坐标轴
},//表单提交数据
formRules:{
detection_area:[{ required: true, message: '请绘制规则', trigger: ['blur','change'] }],
},//表单验证
title:"提示"
}
},
methods:{
// 保存
handleOk(){
this.formSave()
},
// 新增
onAdd(){
this.resetForm()//初始化表单
this.formInfo.id && this.$delete(this.formInfo,'id')
this.title = "新增"
this.formVisible = true
},
// 编辑
onEdit(row){
this.resetForm()//初始化表单
this.formInfo.camera_id = row.id
this.camera_name = row.name
this.title = "分析区域设置"
this.formVisible = true
areaInfo({id:row.id}).then(res=>{
const {code,data} = res.data
if(code==0 && data){
let obj = {}
Object.keys(this.formInfo).forEach(v=>{
obj[v] = data[v] || ''
})
this.formInfo = obj
}
})
}
},
components:{
areaCanvas
}
}
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<template>
<a-modal
:width="700"
:title="title"
:visible="formVisible"
@cancel="formVisible = false"
>
<div slot="footer">
<a-button @click="resetForm">重置</a-button>
<a-button type="primary" :loading="formConfirmLoading" @click="handleOk">确定</a-button>
</div>
<slot>
<a-form-model
ref="ruleForm"
:model="formInfo"
:rules="formRules"
:label-col="{span:labelCol}"
:wrapper-col="{span: wrapperCol}"
>
<a-row :gutter="10">
<a-col :span="12">
<a-form-model-item label="摄像头名称" prop="name">
<w-input v-model="formInfo.name" placeholder="请输入摄像头名称"/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="摄像头mac" prop="number">
<w-input v-model="formInfo.number" placeholder="请输入摄像头mac"/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="ip" prop="ip">
<w-input v-model="formInfo.ip" placeholder="请输入ip"/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="端口号" prop="port">
<w-input v-model="formInfo.port" placeholder="请输入端口号"/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="用户名" prop="username">
<w-input v-model="formInfo.username" placeholder="请输入用户名"/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="密码" prop="password">
<w-input v-model="formInfo.password" placeholder="请输入密码"/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="楼栋" prop="building">
<w-input v-model.number="formInfo.building" placeholder="请输入楼栋" suffix="栋"/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="楼层" prop="lv">
<w-input v-model.number="formInfo.lv" placeholder="请输入楼层" suffix="层"/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="所属服务器" prop="servers_id">
<w-input v-model="formInfo.servers_id" type="select" :dictionaries="serversdictionaries" placeholder="请输入服务器id"/>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</slot>
</a-modal>
</template>
<script>
import form from "@/mixins/form"
import {serversListdata} from "@/services/default"
export default {
mixins:[form],
props:{
labelCol:{
type:Number,
default:7,
},
wrapperCol:{
type:Number,
default:16,
}
},
data(){
return{
tablename:"device",//接口名称
formInfo:{
name:"",//摄像头名称
number:"",//摄像头mac
ip:"",//ip
port:"",//端口号
username:"",//用户名
password:"",//密码
building:"",//楼栋
lv:"",//楼层
servers_id:"",//服务器id
window_id:""//窗口id
},//表单提交数据
formRules:{
name:[{ required: true, message: '摄像头名称不能为空', trigger: ['blur','change'] }],
number:[{ required: true, message: '摄像头mac不能为空', trigger: ['blur','change'] }],
ip:[{ required: true, message: 'ip不能为空', trigger: ['blur','change'] }],
port:[{ required: true, message: '端口号不能为空', trigger: ['blur','change'] }],
username:[{ required: true, message: '用户名不能为空', trigger: ['blur','change'] }],
password:[{ required: true, message: '密码不能为空', trigger: ['blur','change'] }],
building:[{ required: true, message: '楼栋不能为空', trigger: ['blur','change'] }],
lv:[{ required: true, message: '楼层不能为空', trigger: ['blur','change'] }],
servers_id:[{ required: true, message: '服务器id不能为空', trigger: ['blur','change'] }],
},//表单验证
title:"提示",
serversdictionaries:[],//服务器字典
}
},
methods:{
// 保存
handleOk(){
this.formSave()
},
// 新增
onAdd(){
this.getServersListdata()
this.resetForm()//初始化表单
this.formInfo.id && this.$delete(this.formInfo,'id')
this.title = "新增"
this.formVisible = true
// 新增需要获取窗口id
this.$parent.window_id && (this.formInfo.window_id = this.$parent.window_id)
},
// 编辑
onEdit(row){
this.getServersListdata()
this.title = "编辑"
this.formVisible = true
let editObj = {id:row.id}
Object.keys(this.formInfo).forEach(v=>{
editObj[v] = row[v]
})
this.formInfo = editObj
},
// 查询服务器字典
getServersListdata(){
serversListdata({page:1,size:99999}).then(res=>{
console.log(res)
const {code,data,msg} = res.data
if(code == 0){
if(data.data && data.data.length>0){
this.serversdictionaries = data.data.map(v=>{
return {label:v.name,value:v.id}
})
}
}else{
this.$message.error(msg)
}
})
}
}
}
</script>
\ No newline at end of file
<template>
<div class="ff">
<a-row>
<a-col :span="5">
<div class="window-tree">
<h3>窗口分布</h3>
<a-input-search style="margin-bottom: 8px" placeholder="请输入窗口名称" @change="onChange" />
<a-tree :tree-data="treelist"
:auto-expand-parent="autoExpandParent"
:expanded-keys="expandedKeys"
@expand="onExpand"
@select="onSelect"
show-icon
:replaceFields="{title:'name', key:'id' }">
<a-icon slot="site" type="layout" theme="filled" class="primary-color"/>
<a-icon slot="buness" type="contacts" theme="filled" class="primary-color"/>
<a-icon slot="cameraicon" type="youtube" theme="filled" class="primary-color"/>
<template slot="camera" slot-scope="{dataRef}">
<!-- <span>{{dataRef.name}}</span> -->
<span v-if="dataRef.name.indexOf(searchValue) > -1">
{{ dataRef.name.substr(0, dataRef.name.indexOf(searchValue)) }}
<span style="color: #f50">{{ searchValue }}</span>
{{ dataRef.name.substr(dataRef.name.indexOf(searchValue) + searchValue.length) }}
</span>
<span v-else>{{ dataRef.name }}</span>
<span class="primary-color" style="padding-left:15px" v-if="dataRef.set == 1">
<a-icon type="check-circle" theme="filled" />
有规则
</span>
</template>
</a-tree>
</div>
</a-col>
<a-col :span="19">
<tables ref="camera"/>
</a-col>
</a-row>
</div>
</template>
<script>
import {windowtree} from "@/services/default"
import tables from "./table"
export default {
data(){
return {
treelist:[],
searchValue:"",
autoExpandParent:true,
expandedKeys:[]
}
},
created(){
this.getwindowtree()
},
methods:{
getwindowtree(){
windowtree().then(res=>{
const {code,data,msg} = res.data
if(code == 0){
let tree = data.map(v=>{
v['id'] = `0-${v.id}`
v['slots'] = {icon:'buness'}
v.children.map(child=>{
child['scopedSlots'] = {title:'camera',icon:'cameraicon'}
return child
})
return v
})
// this.treelist = [{id:0,name:"站点",children:tree,slots:{icon:'site'}}]
this.treelist = tree
}else{
this.$message.error(msg)
}
console.log(res)
})
},
onExpand(expandedKeys) {
this.expandedKeys = expandedKeys;
this.autoExpandParent = false;
},
onChange(e){
const value = e.target.value;
this.searchValue = value
},
onSelect(v){
// 点击窗口触发
if(typeof v[0] == 'number'){
this.$refs.camera.windowCamera(v[0])
}
}
},
components:{
tables
}
}
</script>
<style lang="less" scoped>
.window-tree{
padding: 10px 15px;
border-right: 1px solid #f5f5f5;
}
</style>
\ No newline at end of file
<template>
<div class="ff camera">
<h3>摄像头列表</h3>
<a-spin :spinning="tableLoading">
<div class="camera-box">
<a-row :gutter="[20,20]">
<a-col :span="6" v-if="window_id">
<div class="device-item flex_row flex_align_c flex_justify_c device-item-add" @click="OnTableAdd">
<div>
<a-icon type="plus-circle" theme="filled" style="font-size:40px"/>
<p style="margin-top:5px">添加摄像头</p>
</div>
</div>
</a-col>
<a-col :span="6" v-for="(item) in tabledataSource" :key="item.id">
<div class="device-item">
<div class="device-item-icon flex_row flex_align_c">
<img src="../img/camera.png" alt="">
</div>
<div class="device-item-body">
<div class="more">
<a-dropdown :trigger="['click']">
<a class="ant-dropdown-link" @click="e => e.preventDefault()">
<a-button shape="circle" icon="more" size="small"/>
</a>
<a-menu slot="overlay">
<a-menu-item>
<a href="javascript:;" @click="onAddarea(item)">配置规则</a>
</a-menu-item>
<a-menu-item>
<a href="javascript:;" @click="OnTableEdit(item)">编辑</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm
title="删除后不可恢复,确定要删除吗?"
ok-text="确定"
cancel-text="再想想"
@confirm="OnTableDel(item)"
>
<a href="javascript:;">删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</div>
<h4>{{item.name}} <a-tag color="blue" style="margin-left:2px;font-size:12px" v-if="item.window_name">{{item.window_name}}</a-tag></h4>
<p>
<span class="p-label">MAC地址:</span>
<span class="p-value"><a-tooltip :title="item.number">{{item.number}}</a-tooltip></span>
</p>
<p>
<span class="p-label">IP地址:</span>
<span class="p-value"><a-tooltip :title="item.ip">{{item.ip}}</a-tooltip></span>
</p>
<p>
<span class="p-label">端口:</span>
<span class="p-value">{{item.port}}</span>
</p>
<p>
<span class="p-label">楼栋:</span>
<span class="p-value">{{item.building}}</span>
</p>
<p>
<span class="p-label">楼层:</span>
<span class="p-value">{{item.lv}}</span>
</p>
<p>
<span class="p-label">所属服务器:</span>
<span class="p-value"><a-tooltip :title="item.servers_name">{{item.servers_name}}</a-tooltip></span>
</p>
</div>
</div>
</a-col>
</a-row>
</div>
</a-spin>
<show ref="pageshow" @success="getTableInfo"/>
<areaform ref="areaform" @success="getTableInfo"></areaform>
</div>
</template>
<script>
import table from "@/mixins/table"
import show from "./form"
import areaform from "./areaform"
export default {
mixins:[table],
data(){
return{
tablename:"device",//接口地址 名称
tabledataSource:[],//表格数据
columnsSearch:[
],//表格查询条件
window_id:""
}
},
methods:{
windowCamera(window_id){
this.window_id = window_id
this.tablequery = {window_id:window_id}
this.tableReload()
},
onAddarea(row){
this.$refs.areaform.onEdit(row)
}
},
components:{
show,
areaform
}
}
</script>
<style lang="less" scoped>
.camera{
padding: 15px;
}
</style>
\ No newline at end of file
<template>
<a-modal
:title="title"
:visible="formVisible"
@cancel="formVisible = false"
>
<div slot="footer">
<a-button @click="resetForm">重置</a-button>
<a-button type="primary" :loading="formConfirmLoading" @click="handleOk">确定</a-button>
</div>
<slot>
<a-form-model
ref="ruleForm"
:model="formInfo"
:rules="formRules"
:label-col="{span:labelCol}"
:wrapper-col="{span: wrapperCol}"
>
<a-form-model-item label="服务器名称" prop="name">
<w-input v-model="formInfo.name" placeholder="请输入服务器名称"/>
</a-form-model-item>
<a-form-model-item label="服务器编号" prop="number">
<w-input v-model="formInfo.number" placeholder="请输入服务器编号"/>
</a-form-model-item>
<a-form-model-item label="服务器类型" prop="type">
<w-input v-model="formInfo.type" placeholder="请输入服务器类型"/>
</a-form-model-item>
<a-form-model-item label="ip" prop="ip">
<w-input v-model="formInfo.ip" placeholder="请输入ip"/>
</a-form-model-item>
<a-form-model-item label="端口号" prop="port">
<w-input v-model="formInfo.port" placeholder="请输入端口号"/>
</a-form-model-item>
</a-form-model>
</slot>
</a-modal>
</template>
<script>
import form from "@/mixins/form"
export default {
mixins:[form],
props:{
labelCol:{
type:Number,
default:5,
},
wrapperCol:{
type:Number,
default:16,
}
},
data(){
return{
tablename:"servers",//接口名称
formInfo:{
name:"",//服务器名称
number:"",//服务器编号
type:"",//服务器类型
ip:"",//ip
port:"",//端口号
},//表单提交数据
formRules:{
name:[{ required: true, message: '服务器名称不能为空', trigger: ['blur','change'] }],
number:[{ required: true, message: '服务器编号不能为空', trigger: ['blur','change'] }],
type:[{ required: true, message: '服务器类型不能为空', trigger: ['blur','change'] }],
ip:[{ required: true, message: 'ip不能为空', trigger: ['blur','change'] }],
port:[{ required: true, message: '端口号不能为空', trigger: ['blur','change'] }],
},//表单验证
title:"提示"
}
},
methods:{
// 保存
handleOk(){
this.formSave()
},
// 新增
onAdd(){
this.resetForm()//初始化表单
this.formInfo.id && this.$delete(this.formInfo,'id')
this.title = "新增"
this.formVisible = true
},
// 编辑
onEdit(row){
this.title = "编辑"
this.formVisible = true
let editObj = {id:row.id}
Object.keys(this.formInfo).forEach(v=>{
editObj[v] = row[v]
})
this.formInfo = editObj
}
}
}
</script>
\ No newline at end of file
<template>
<div class="ff camera">
<h3 style="margin-bottom:20px">服务器列表</h3>
<a-spin :spinning="tableLoading">
<div class="camera-box">
<a-row :gutter="[20,20]">
<a-col :span="6">
<div class="device-item flex_row flex_align_c flex_justify_c device-item-add" @click="OnTableAdd">
<div>
<a-icon type="plus-circle" theme="filled" style="font-size:40px"/>
<p style="margin-top:5px">添加服务器</p>
</div>
</div>
</a-col>
<a-col :span="6" v-for="(item) in tabledataSource" :key="item.id">
<div class="device-item">
<div class="device-item-icon flex_row flex_align_c">
<img src="../img/service.jpg" alt="">
</div>
<div class="device-item-body">
<div class="more">
<a-dropdown :trigger="['click']">
<a class="ant-dropdown-link" @click="e => e.preventDefault()">
<a-button shape="circle" icon="more" size="small"/>
</a>
<a-menu slot="overlay">
<a-menu-item>
<a href="javascript:;" @click="OnTableEdit(item)">编辑</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm
title="删除后不可恢复,确定要删除吗?"
ok-text="确定"
cancel-text="再想想"
@confirm="OnTableDel(item)"
>
<a href="javascript:;">删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</div>
<h4>{{item.name}} </h4>
<p>
<span class="p-label">服务器编号:</span>
<span class="p-value"><a-tooltip :title="item.number">{{item.number}}</a-tooltip></span>
</p>
<p>
<span class="p-label">服务器类型:</span>
<span class="p-value"><a-tooltip :title="item.ip">{{item.ip}}</a-tooltip></span>
</p>
<p>
<span class="p-label">IP地址:</span>
<span class="p-value">{{item.port}}</span>
</p>
<p>
<span class="p-label">端口号:</span>
<span class="p-value">{{item.building}}</span>
</p>
</div>
</div>
</a-col>
</a-row>
</div>
</a-spin>
<show ref="pageshow" @success="getTableInfo"/>
</div>
</template>
<script>
import table from "@/mixins/table"
import show from "./form"
export default {
mixins:[table],
data(){
return{
tablename:"servers",//接口地址 名称
tabledataSource:[],//表格数据
columnsSearch:[],//表格查询条件
}
},
components:{
show
}
}
</script>
<style lang="less" scoped>
.camera{
padding: 15px;
}
</style>
\ No newline at end of file
<template>
<a-modal
:title="title"
:visible="formVisible"
@cancel="formVisible = false"
>
<div slot="footer">
<a-button @click="resetForm">重置</a-button>
<a-button type="primary" :loading="formConfirmLoading" @click="handleOk">确定</a-button>
</div>
<slot>
<a-form-model
ref="ruleForm"
:model="formInfo"
:rules="formRules"
:label-col="{span:labelCol}"
:wrapper-col="{span: wrapperCol}"
>
<a-form-model-item label="姓名" prop="name">
<w-input v-model="formInfo.name" placeholder="请输入姓名"/>
</a-form-model-item>
<a-form-model-item label="电话" prop="phone">
<w-input v-model="formInfo.phone" placeholder="请输入电话"/>
</a-form-model-item>
<a-form-model-item label="微信用户id" prop="wxuserid">
<w-input v-model="formInfo.wxuserid" placeholder="请输入微信用户id"/>
</a-form-model-item>
<a-form-model-item label="是否监察权限" prop="lgauth">
<w-input type="switch" v-model="formInfo.lgauth" placeholder="请输入是否监察权限"/>
</a-form-model-item>
</a-form-model>
</slot>
</a-modal>
</template>
<script>
import form from "@/mixins/form"
export default {
mixins:[form],
props:{
labelCol:{
type:Number,
default:5,
},
wrapperCol:{
type:Number,
default:16,
}
},
data(){
return{
tablename:"employee",//接口名称
formInfo:{
name:"",//姓名
phone:"",//电话
lgauth:1,//是否监察权限
wxuserid:"",//微信用户id
},//表单提交数据
formRules:{
name:[{ required: true, message: '姓名不能为空', trigger: ['blur','change'] }],
phone:[{ required: true, message: '电话不能为空', trigger: ['blur','change'] }],
lgauth:[{ required: true, message: '是否监察权限不能为空', trigger: ['blur','change'] }],
wxuserid:[{ required: true, message: '微信用户id不能为空', trigger: ['blur','change'] }],
},//表单验证
title:"提示"
}
},
methods:{
// 保存
handleOk(){
this.formSave()
},
// 新增
onAdd(){
this.resetForm()//初始化表单
this.formInfo.id && this.$delete(this.formInfo,'id')
this.title = "新增"
this.formVisible = true
},
// 编辑
onEdit(row){
this.title = "编辑"
this.formVisible = true
let editObj = {id:row.id}
Object.keys(this.formInfo).forEach(v=>{
editObj[v] = row[v]
})
this.formInfo = editObj
}
}
}
</script>
\ No newline at end of file
<template>
<div class="ff p-t-15 p-l-15 p-r-15">
<Standardtable
:columns="tablecolumns"
:dataSource="tabledataSource"
:bordered="true"
:selectedRows="selectedRows"
:columnsSearch="columnsSearch"
:pagination="pagination"
:loading="tableLoading"
@selectedRowChange="selectedRowChange"
@add="OnTableAdd"
@del="OnTableAllDel"
@Search="onSearch"
@change="handleTableChange"
>
<div slot="search-more"></div>
</Standardtable>
<show ref="pageshow" @success="getTableInfo"/>
<siteForm ref="site" />
</div>
</template>
<script>
import table from "@/mixins/table"
import show from "./form"
import siteForm from "./siteForm.vue"
export default {
mixins:[table],
data(){
return{
tablename:"employee",//接口地址 名称
tablecolumns:[
{
title: "序号",
width: "70px",
customRender:this.RenderIndex
},
{
title: "姓名",
dataIndex: "name",
},
{
title: "电话",
dataIndex: "phone",
},
{
title: "是否监察权限",
dataIndex: "lgauth",
customRender:(text)=>{return text==1?'':''}
},
{
title: "微信用户id",
dataIndex: "wxuserid",
},
{
title: "操作",
width: "220px",
customRender:(text, record)=>{
return (
<div>
<span class="redact mr" value={record} onClick={()=>this.onAuth(record)}>场所授权</span>
<tableActive record={record} onEdit={this.OnTableEdit} onDel={this.OnTableDel}/>
</div>
)
}
},
],//表头数据
tabledataSource:[],//表格数据
columnsSearch:[
{type:'text',dataIndex:'name',span:5,width:150,dictionaries:[{label:'全部',value:''},{label:'选项1',value:1},{label:'选项2',value:2}],placeholder:"请输入姓名"},
]//表格查询条件
}
},
methods:{
onAuth(row){
this.$refs.site.onEditAuth(row)
}
},
components:{
show,
siteForm
}
}
</script>
\ No newline at end of file
<template>
<a-modal
title="场所授权"
:width="800"
:visible="formVisible"
@ok="handleOk"
@cancel="formVisible = false"
>
<div class="ff">
<Standardtable
:pagination="false"
:isSearch="false"
:columns="tablecolumns"
:dataSource="tabledataSource"
:bordered="true"
:selectedRows="selectedRows"
:columnsSearch="columnsSearch"
:loading="tableLoading"
:defaultCheckedKey="defaultCheckedKey"
@selectedRowChange="selectedRowChange"
@add="OnTableAdd"
@del="OnTableAllDel"
@Search="onSearch"
@change="handleTableChange"
>
</Standardtable>
</div>
</a-modal>
</template>
<script>
import table from "@/mixins/table"
import {employeeSave} from "@/services/default"
export default {
mixins:[table],
data(){
return{
formVisible:false,
tablename:"waited",//接口地址 名称
tablecolumns:[
{
title: "ID",
dataIndex: "id",
},
{
title: "站点",
dataIndex: "name",
},
{
title: "编号",
dataIndex: "number",
width: '40%',
},
],//表头数据
tabledataSource:[],//表格数据
defaultCheckedKey:[],
rowId:""
}
},
methods:{
handleOk(){
let arr = []
if(this.selectedId && this.selectedId.length>0){
arr = this.selectedId
}else{
arr = this.defaultCheckedKey
}
employeeSave({id:this.rowId,video_site:arr.join(',')}).then(res=>{
console.log(res)
const {code,msg} = res.data
if(code == 0){
this.$parent.tableReload()
this.formVisible = false
}else{
this.$message.error(msg)
}
})
},
onEditAuth(row){
console.log(row)
this.selectedId = [] //选中id
this.selectedRows = [] //选中对象
this.rowId = row.id
this.defaultCheckedKey = row.video_site?row.video_site.split(',').map(Number):[]
this.formVisible = true
},
}
}
</script>
\ No newline at end of file
<template>
<span :style="{color:num<0?'#FF2222':'#18BE6A'}">{{name}}{{num*100}}%<a-icon :type="num<0?'arrow-down':'arrow-up'" /></span>
</template>
<script>
export default {
props:['num'],
computed:{
name:function(vm){
return vm.num<0?'下降':'提升'
}
}
}
</script>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(1 0 0 1 -1399 -656 )">
<path d="M 9.23958333333333 13.2395833333333 C 9.30208333333333 13.1770833333333 9.33333333333333 13.0972222222222 9.33333333333333 13 L 9.33333333333333 11 C 9.33333333333333 10.9027777777778 9.30208333333333 10.8229166666667 9.23958333333333 10.7604166666667 C 9.17708333333333 10.6979166666667 9.09722222222222 10.6666666666667 9 10.6666666666667 L 7 10.6666666666667 C 6.90277777777778 10.6666666666667 6.82291666666667 10.6979166666667 6.76041666666667 10.7604166666667 C 6.69791666666667 10.8229166666667 6.66666666666667 10.9027777777778 6.66666666666667 11 L 6.66666666666667 13 C 6.66666666666667 13.0972222222222 6.69791666666667 13.1770833333333 6.76041666666667 13.2395833333333 C 6.82291666666667 13.3020833333333 6.90277777777778 13.3333333333333 7 13.3333333333333 L 9 13.3333333333333 C 9.09722222222222 13.3333333333333 9.17708333333333 13.3020833333333 9.23958333333333 13.2395833333333 Z M 11.8697916666667 6.84375 C 11.9565972222222 6.58680555555556 12 6.30555555555556 12 6 C 12 5.38888888888889 11.8072916666667 4.82291666666667 11.421875 4.30208333333333 C 11.0364583333333 3.78125 10.5555555555556 3.37847222222222 9.97916666666667 3.09375 C 9.40277777777778 2.80902777777778 8.8125 2.66666666666667 8.20833333333333 2.66666666666667 C 6.52083333333333 2.66666666666667 5.23263888888889 3.40625 4.34375 4.88541666666667 C 4.23958333333333 5.05208333333333 4.26736111111111 5.19791666666667 4.42708333333333 5.32291666666667 L 5.80208333333333 6.36458333333333 C 5.85069444444445 6.40625 5.91666666666667 6.42708333333333 6 6.42708333333333 C 6.11111111111111 6.42708333333333 6.19791666666667 6.38541666666667 6.26041666666667 6.30208333333333 C 6.62847222222222 5.82986111111111 6.92708333333333 5.51041666666667 7.15625 5.34375 C 7.39236111111111 5.17708333333333 7.69097222222222 5.09375 8.05208333333333 5.09375 C 8.38541666666667 5.09375 8.68229166666667 5.18402777777778 8.94270833333333 5.36458333333333 C 9.203125 5.54513888888889 9.33333333333333 5.75 9.33333333333333 5.97916666666667 C 9.33333333333333 6.24305555555556 9.26388888888889 6.45486111111111 9.125 6.61458333333333 C 8.98611111111111 6.77430555555556 8.75 6.93055555555556 8.41666666666667 7.08333333333333 C 7.97916666666667 7.27777777777778 7.578125 7.578125 7.21354166666667 7.984375 C 6.84895833333333 8.390625 6.66666666666667 8.82638888888889 6.66666666666667 9.29166666666667 L 6.66666666666667 9.66666666666667 C 6.66666666666667 9.76388888888889 6.69791666666667 9.84375 6.76041666666667 9.90625 C 6.82291666666667 9.96875 6.90277777777778 10 7 10 L 9 10 C 9.09722222222222 10 9.17708333333333 9.96875 9.23958333333333 9.90625 C 9.30208333333333 9.84375 9.33333333333333 9.76388888888889 9.33333333333333 9.66666666666667 C 9.33333333333333 9.53472222222222 9.40798611111111 9.36284722222222 9.55729166666667 9.15104166666667 C 9.70659722222222 8.93923611111111 9.89583333333333 8.76736111111111 10.125 8.63541666666667 C 10.3472222222222 8.51041666666667 10.5173611111111 8.41145833333333 10.6354166666667 8.33854166666667 C 10.7534722222222 8.265625 10.9131944444444 8.14409722222222 11.1145833333333 7.97395833333333 C 11.3159722222222 7.80381944444444 11.4704861111111 7.63715277777778 11.578125 7.47395833333333 C 11.6857638888889 7.31076388888889 11.7829861111111 7.10069444444444 11.8697916666667 6.84375 Z M 14.9270833333333 3.984375 C 15.6423611111111 5.21006944444444 16 6.54861111111111 16 8 C 16 9.45138888888889 15.6423611111111 10.7899305555556 14.9270833333333 12.015625 C 14.2118055555556 13.2413194444444 13.2413194444444 14.2118055555556 12.015625 14.9270833333333 C 10.7899305555556 15.6423611111111 9.45138888888889 16 8 16 C 6.54861111111111 16 5.21006944444444 15.6423611111111 3.984375 14.9270833333333 C 2.75868055555556 14.2118055555556 1.78819444444444 13.2413194444444 1.07291666666667 12.015625 C 0.357638888888889 10.7899305555556 0 9.45138888888889 0 8 C 0 6.54861111111111 0.357638888888889 5.21006944444444 1.07291666666667 3.984375 C 1.78819444444444 2.75868055555556 2.75868055555556 1.78819444444444 3.984375 1.07291666666667 C 5.21006944444444 0.357638888888888 6.54861111111111 0 8 0 C 9.45138888888889 0 10.7899305555556 0.357638888888888 12.015625 1.07291666666667 C 13.2413194444444 1.78819444444444 14.2118055555556 2.75868055555556 14.9270833333333 3.984375 Z " fill-rule="nonzero" fill="#1f74df" stroke="none" transform="matrix(1 0 0 1 1399 656 )" />
</g>
</svg>
\ No newline at end of file
<template>
<div class="ff p-t-15 p-l-15 p-r-15 p-b-15 viewbox">
<Standardtable
:columns="tablecolumns"
:dataSource="tabledataSource"
:bordered="true"
:selectedRows="selectedRows"
:columnsSearch="columnsSearch"
:pagination="pagination"
:loading="tableLoading"
@selectedRowChange="selectedRowChange"
@add="OnTableAdd"
@del="OnTableAllDel"
@Search="onSearch"
@change="handleTableChange"
>
<exportFile slot="search-add">
<a-button type="primary">导出文件</a-button>
</exportFile>
<div slot="search-del"></div>
<div slot="search-more"></div>
</Standardtable>
<show ref="pageshow" @success="getTableInfo"/>
</div>
</template>
<script>
import table from "@/mixins/table"
import show from "./pageshow"
import {windowListdata} from "@/services/default"
export default {
mixins:[table],
data(){
return{
tablename:"alert",//接口地址 名称
tablecolumns:[
{
title: "序号",
width: "70px",
customRender:this.RenderIndex
},
{
title: "报警类型",
dataIndex: "warn_alert",
},
{
title: "工作人姓名",
dataIndex: "workman_name",
},
{
title: "部门名",
dataIndex: "section_name",
},
{
title: "窗口",
dataIndex: "window_name",
},
{
title: "手机号",
dataIndex: "workman_phone",
},
{
title: "发生时间",
dataIndex: "out_time",
},
{
title: "时长",
dataIndex: "duration",
},
{
title: "报警时间",
dataIndex: "last_time",
},
{
title: "是否处理",
dataIndex: "have_process",
customRender:(v)=><div class={v==0?'danger-color':''}>{v==0?'未处理':'已处理'}</div>
},
{
title: "操作",
width: "200px",
customRender:(text, record)=><tableActive show={true} edit={false} record={record} onEdit={this.OnTableEdit} onDel={this.OnTableDel} onShow={this.onPageShow}/>
},
],//表头数据
tabledataSource:[],//表格数据
columnsSearch:[
{type:'checkbox',dataIndex:'have_process',span:5,width:120,dictionaries:[{label:'只看未处理',value:0}]},
{type:'select',dataIndex:'warn_alert',span:5,width:150,dictionaries:this.$dictionaries('warn_alert'),placeholder:"请输入报警类型"},
{type:'text',dataIndex:'workman_name',span:5,width:180,placeholder:"请输入工作人姓名"},
{type:'select',dataIndex:'window_id',span:5,width:150,dictionaries:[],placeholder:"请输入窗口"},
{type:'range',dataIndex:'time',span:5,width:220,placeholder:"请输入报警时间"},
]//表格查询条件
}
},
created(){
// 查询窗口
windowListdata({page:1,size:100000}).then(res=>{
const {code,data,msg} = res.data
if(code == 0){
console.log(data)
let windictionaries = data.data.map(v=>{
return {label:v.name,value:v.id}
})
this.columnsSearch[3] = {type:'select',dataIndex:'window_id',span:5,width:150,dictionaries:windictionaries,placeholder:"请输入窗口"}
}else{
this.$message.error(`窗口字典:${msg}`)
}
})
},
methods:{
onPageShow(row){
this.$refs.pageshow.onShow(row)
}
},
components:{
show
}
}
</script>
\ No newline at end of file
<template>
<a-drawer
title="详情"
:width="450"
placement="right"
:visible="visible"
@close="visible = false"
>
<div class="p-tit">报警类型:{{$dictionaryValue('warn_alert',info.warn_alert)}}</div>
<div class="p-w">
<div class="p-photo">
<images :src="info.workman_photo"/>
</div>
<h2 class="primary-color">{{info.window_name}}</h2>
<div class="p-w-r flex_row">
<div class="p-l">工作人员:</div>
<div class="p-v">{{info.workman_name}}</div>
</div>
<div class="p-w-r flex_row">
<div class="p-l">工号:</div>
<div class="p-v">{{info.workman_number}}</div>
</div>
<div class="p-w-r flex_row">
<div class="p-l">所属部门:</div>
<div class="p-v">{{info.section_name}}</div>
</div>
<div class="p-w-r flex_row">
<div class="p-l">联系电话:</div>
<div class="p-v">{{info.workman_phone}}</div>
</div>
<div class="p-w-r flex_row">
<div class="p-l">所属楼栋:</div>
<div class="p-v">{{info.window_building}}</div>
</div>
<div class="p-w-r flex_row">
<div class="p-l">所属楼层:</div>
<div class="p-v">{{info.window_lv}}</div>
</div>
</div>
<div class="p-w">
<div class="p-w-r flex_row">
<div class="p-l">发生时间:</div>
<div class="p-v">{{info.out_time}}</div>
</div>
<div class="p-w-r flex_row">
<div class="p-l">时长:</div>
<div class="p-v">{{info.duration}}</div>
</div>
<div class="p-w-r flex_row">
<div class="p-l">报警时间:</div>
<div class="p-v">{{info.last_time}}</div>
</div>
<div class="p-w-r flex_row">
<div class="p-l">报警附件:</div>
<div class="p-v flex_row"><thumbImage v-for="(item,index) in info.workman_picture" :key="index" :src="info.workman_picture" :index="index" style="margin-right:5px"/></div>
</div>
</div>
<div class="p-w">
<div class="p-w-r flex_row">
<div class="p-l">是否处理:</div>
<div class="p-v" :class="{'danger-color':info.have_process == 0}">{{info.have_process == 0?'未处理':"已处理"}}</div>
</div>
<div class="p-w-r flex_row">
<div class="p-l">处理意见:</div>
<div class="p-v">{{info.remark}}</div>
</div>
</div>
<div style="height:53px"></div>
<div class="footer">
<a-popconfirm
title="删除后不可恢复,确定要删除吗?"
ok-text="确定"
cancel-text="再想想"
@confirm="$parent.OnTableDel(row)"
>
<a-button type="danger">删除</a-button>
</a-popconfirm>
<a-button style="margin-left:10px" @click="visible = false">关闭</a-button>
</div>
</a-drawer>
</template>
<script>
import {alertInfo} from "@/services/default"
export default {
data(){
return{
visible:false,
info:{},
row:{}
}
},
methods:{
onShow(row){
this.row = row
this.visible = true
alertInfo({id:row.id}).then(res=>{
console.log(res)
const {code,data,msg} = res.data
if(code == 0){
this.info = data
}else{
this.$message.error(msg)
}
})
}
}
}
</script>
<style lang="less" scoped>
.footer{
position: absolute;
left: 0;
bottom: 0;
right: 0;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
background: #fff;
}
.p-tit{
padding: 10px 15px;
color: #ff4d4f;
background: #fff1f1;
font-weight: blod;
border-left: 4px solid #ff4d4f;
}
.p-w{
margin-top: 20px;
background: #f1f7fd;
border-radius: 6px;
padding: 10px;
position: relative;
.p-w-r{
margin-bottom: 10px;
}
.p-l{
width: 80px;
text-align: right;
}
h2{
font-weight: bold;
}
.p-photo{
position: absolute;
top:20px;
right: 20px;
width: 100px;
height: 120px;
img{
display: block;
width: 100%;
height: 100%;
}
}
}
</style>
\ No newline at end of file
<template>
<a-layout class="list_content">
<a-layout-sider class="list_left" width="220px">
<div class="left">
<div class="title">请选择窗口</div>
<a-input
autocomplete="autocomplete"
placeholder="请输入窗口名搜索"
onfocus="this.placeholder=''"
onblur="this.placeholder='请输入窗口名搜索'"
style="width:160px;"
allow-clear
/>
<div class="tree">
<a-tree
v-model="checkedKeys"
checkable
:expanded-keys="expandedKeys"
:auto-expand-parent="autoExpandParent"
:selected-keys="selectedKeys"
:tree-data="treeData"
@expand="onExpand"
@select="onSelect"
/>
</div>
</div>
</a-layout-sider>
<a-layout-content>
<div class="list_right">
<div class="right">
<p>1号窗口</p>
</div>
<div class="right">
<p>1号窗口</p>
</div>
<div class="right">
<p>1号窗口</p>
</div>
<div class="right">
<p>1号窗口</p>
</div>
<div class="right">
<p>1号窗口</p>
</div>
<div class="right">
<p>1号窗口</p>
</div>
<div class="right">
<p>1号窗口</p>
</div>
<div class="right">
<p>1号窗口</p>
</div>
<div class="right">
<p>1号窗口</p>
</div>
</div>
</a-layout-content>
</a-layout>
</template>
<script>
const treeData = [
{
title: '四川省政务服务中心',
key: '0-0',
children: [
{
title: '四川省政务服务中心',
key: '0-0-0',
children: [
{ title: '1号窗口11111', key: '0-0-0-1' },
{ title: '2号窗口', key: '0-0-0-2' },
],
},
{
title: '社保局',
key: '0-0-1',
children: [
{ title: '0-0-1-0', key: '0-0-1-0' },
{ title: '0-0-1-1', key: '0-0-1-1' },
{ title: '0-0-1-2', key: '0-0-1-2' },
],
},
{
title: '人社局',
key: '0-0-2',
children: [
{ title: '0-0-1-0', key: '0-0-1-0' },
{ title: '0-0-1-1', key: '0-0-1-1' },
{ title: '0-0-1-2', key: '0-0-1-2' },
],
},
],
},
];
export default {
data () {
return {
expandedKeys: ['0-0-0', '0-0-1'],
autoExpandParent: true,
checkedKeys: ['0-0-0'],
selectedKeys: [],
treeData,
};
},
watch: {
checkedKeys (val) {
console.log('onCheck', val);
},
},
methods: {
onChange (value) {
console.log(value);
},
onExpand (expandedKeys) {
console.log('onExpand', expandedKeys);
// if not set autoExpandParent to false, if children expanded, parent can not collapse.
// or, you can remove all expanded children keys.
this.expandedKeys = expandedKeys;
this.autoExpandParent = false;
},
onCheck (checkedKeys) {
console.log('onCheck', checkedKeys);
this.checkedKeys = checkedKeys;
},
onSelect (selectedKeys, info) {
console.log('onSelect', info);
this.selectedKeys = selectedKeys;
},
}
}
</script>
<style lang="less" scoped>
.list_content {
height: 100%;
.list_left {
height: 100%;
background-color: #fff;
.left {
margin-top: 20px;
margin-left: 20px;
.title {
font-family: '微软雅黑', sans-serif;
font-weight: 400;
font-style: normal;
font-size: 16px;
margin-bottom: 20px;
}
.tree {
margin-top: 20px;
/deep/.ant-tree > li:first-child {
font-size: 13px;
}
}
}
}
.list_right {
display: flex;
flex-wrap: wrap;
background-color: #fff;
.right {
width: 419px;
height: 202px;
background-color: rgba(217, 217, 217, 1);
border-width: 1px;
border-style: solid;
border-color: rgba(199, 199, 199, 1);
text-align: center;
line-height: 202px;
p {
font-weight: 400;
font-size: 16px;
color: #aaaaaa;
}
}
}
}
/deep/.ant-layout.ant-layout-has-sider > .ant-layout,
.ant-layout.ant-layout-has-sider > .ant-layout-content {
overflow-x: hidden;
overflow-y: scroll;
}
</style>
\ No newline at end of file
<template>
<a-modal
:title="title"
:visible="formVisible"
@cancel="formVisible = false"
>
<div slot="footer">
<a-button @click="resetForm">重置</a-button>
<a-button type="primary" :loading="formConfirmLoading" @click="handleOk">确定</a-button>
</div>
<slot>
<a-form-model
ref="ruleForm"
:model="formInfo"
:rules="formRules"
:label-col="{span:labelCol}"
:wrapper-col="{span: wrapperCol}"
>
<a-form-model-item label="角色名" prop="name">
<w-input v-model="formInfo.name" placeholder="请输入角色名"/>
</a-form-model-item>
<a-form-model-item label="说明" prop="sumarry">
<w-input type="textarea" v-model="formInfo.sumarry" placeholder="请输入说明"/>
</a-form-model-item>
</a-form-model>
</slot>
</a-modal>
</template>
<script>
import form from "@/mixins/form"
export default {
mixins:[form],
props:{
labelCol:{
type:Number,
default:5,
},
wrapperCol:{
type:Number,
default:16,
}
},
data(){
return{
tablename:"position",//接口名称
formInfo:{
name:"",//角色名
sumarry:"",//说明
},//表单提交数据
formRules:{
name:[{ required: true, message: '角色名不能为空', trigger: ['blur','change'] }],
sumarry:[{ required: true, message: '说明不能为空', trigger: ['blur','change'] }],
},//表单验证
title:"提示"
}
},
methods:{
// 保存
handleOk(){
this.formSave()
},
// 新增
onAdd(){
this.resetForm()//初始化表单
this.formInfo.id && this.$delete(this.formInfo,'id')
this.title = "新增"
this.formVisible = true
},
// 编辑
onEdit(row){
this.title = "编辑"
this.formVisible = true
let editObj = {id:row.id}
Object.keys(this.formInfo).forEach(v=>{
editObj[v] = row[v]
})
this.formInfo = editObj
}
}
}
</script>
\ No newline at end of file
<template>
<div class="ff p-t-15 p-l-15 p-r-15">
<Standardtable
:columns="tablecolumns"
:dataSource="tabledataSource"
:bordered="true"
:selectedRows="selectedRows"
:columnsSearch="columnsSearch"
:pagination="pagination"
:loading="tableLoading"
@selectedRowChange="selectedRowChange"
@add="OnTableAdd"
@del="OnTableAllDel"
@Search="onSearch"
@change="handleTableChange"
>
<div slot="search-more"></div>
</Standardtable>
<show ref="pageshow" @success="getTableInfo"/>
<menuForm ref="menu"/>
</div>
</template>
<script>
import table from "@/mixins/table"
import show from "./form"
import menuForm from "./menuForm"
export default {
mixins:[table],
data(){
return{
tablename:"position",//接口地址 名称
tablecolumns:[
{
title: "序号",
width: "70px",
customRender:this.RenderIndex
},
{
title: "角色名",
dataIndex: "name",
},
{
title: "说明",
dataIndex: "sumarry",
},
{
title: "操作",
width: "220px",
customRender:(text, record)=>{
return (
<div>
<span class="redact mr" value={record} onClick={()=>this.onAuth(record)}>功能授权</span>
<tableActive record={record} onEdit={this.OnTableEdit} onDel={this.OnTableDel}/>
</div>
)
}
},
],//表头数据
tabledataSource:[],//表格数据
columnsSearch:[
]//表格查询条件
}
},
methods:{
onAuth(row){
this.$refs.menu.onEditAuth(row)
}
},
components:{
show,
menuForm
}
}
</script>
\ No newline at end of file
<template>
<a-modal
title="功能授权"
:width="800"
:visible="formVisible"
@ok="handleOk"
@cancel="formVisible = false"
>
<div class="ff">
<Standardtable
:pagination="false"
:isSearch="false"
:columns="tablecolumns"
:dataSource="tabledataSource"
:bordered="true"
:selectedRows="selectedRows"
:columnsSearch="columnsSearch"
:loading="tableLoading"
:defaultCheckedKey="defaultCheckedKey"
@selectedRowChange="selectedRowChange"
@add="OnTableAdd"
@del="OnTableAllDel"
@Search="onSearch"
@change="handleTableChange"
>
</Standardtable>
</div>
</a-modal>
</template>
<script>
import table from "@/mixins/table"
import {positionauth} from "@/services/default"
export default {
mixins:[table],
data(){
return{
formVisible:false,
tablename:"auth",//接口地址 名称
tablecolumns:[
{
title: "ID",
dataIndex: "id",
},
{
title: "菜单名称",
dataIndex: "name",
},
{
title: "路由",
dataIndex: "router",
width: '40%',
},
],//表头数据
tabledataSource:[],//表格数据
defaultCheckedKey:[],
rowId:""
}
},
methods:{
handleOk(){
let arr = []
if(this.selectedId && this.selectedId.length>0){
arr = this.selectedId
}else{
arr = this.defaultCheckedKey
}
positionauth({id:this.rowId,auth_id:arr.join(',')}).then(res=>{
console.log(res)
const {code,msg} = res.data
if(code == 0){
this.$parent.tableReload()
this.formVisible = false
}else{
this.$message.error(msg)
}
})
},
// 重写数据返回后函数
tableAfterData(data){
this.deeps(data.data)
return data
},
onEditAuth(row){
this.selectedId = [] //选中id
this.selectedRows = [] //选中对象
this.rowId = row.id
this.defaultCheckedKey = row.auth_id?row.auth_id.split(',').map(Number):[]
this.formVisible = true
},
deeps(d){
return d.map(v=>{
if(v.children && v.children.length==0){
delete v.children
}else{
v.children = this.deeps(v.children)
}
return v
})
}
}
}
</script>
\ No newline at end of file
<template>
<div> 1</div>
</template>
\ No newline at end of file
<template>
<div class="ff p-t-15 p-l-15 p-r-15">
<Standardtable
:isSearch="false"
:columns="tablecolumns"
:dataSource="tabledataSource"
:bordered="true"
:selectedRows="selectedRows"
:columnsSearch="columnsSearch"
:pagination="pagination"
:loading="tableLoading"
@selectedRowChange="selectedRowChange"
@add="OnTableAdd"
@del="OnTableAllDel"
@Search="onSearch"
@change="handleTableChange"
>
</Standardtable>
</div>
</template>
<script>
import table from "@/mixins/table"
export default {
mixins:[table],
data(){
return{
tablename:"log",//接口地址 名称
tablecolumns:[
{
title: "序号",
width: "70px",
customRender:this.RenderIndex
},
{
title: "用户",
dataIndex: "account",
},
{
title: "操作时间",
dataIndex: "create_time",
},
{
title: "操作类型",
dataIndex: "data_type",
},
{
title: "操作详情",
dataIndex: "summary",
},
],//表头数据
tabledataSource:[],//表格数据
columnsSearch:[
]//表格查询条件
}
},
}
</script>
\ No newline at end of file
<template>
<div class="ff p-t-15 p-l-15 p-r-15">
<Standardtable
:columns="tablecolumns"
:dataSource="tabledataSource"
:bordered="true"
:selectedRows="selectedRows"
:columnsSearch="columnsSearch"
:pagination="pagination"
:loading="tableLoading"
@selectedRowChange="selectedRowChange"
@add="OnTableAdd"
@del="OnTableAllDel"
@Search="onSearch"
@change="handleTableChange"
>
<div slot="search-more"></div>
</Standardtable>
<show ref="pageshow" @success="getTableInfo"/>
<siteForm ref="site" />
</div>
</template>
<script>
import table from "@/mixins/table"
import show from "./show"
import siteForm from "./siteForm.vue"
export default {
mixins:[table],
data(){
return{
tablename:"user",//接口地址
tablecolumns:[
{
title: "序号",
width: "70px",
customRender:this.RenderIndex
},
{
title: "用户名",
dataIndex: "user_name",
},
{
title: "用户账号",
dataIndex: "account",
},
{
title: "用户电话",
dataIndex: "mobile",
},
{
title: "创建时间",
dataIndex: "create_time",
},
{
title: "更新时间",
dataIndex: "update_time",
},
{
title: "登陆时间",
dataIndex: "login_time",
},
{
title: "操作",
width: "220px",
customRender:(text, record)=>{
return (
<div>
<span class="redact mr" value={record} onClick={()=>this.onAuth(record)}>场所授权</span>
<tableActive record={record} onEdit={this.OnTableEdit} onDel={this.OnTableDel}/>
</div>
)
}
},
],//表头数据
columnsSearch:[
{type:'text',dataIndex:'keyword',span:12,width:150,placeholder:"请输入搜索名称"}
]//表格查询条件
}
},
methods:{
onAuth(row){
this.$refs.site.onEditAuth(row)
}
},
components:{
show,
siteForm
}
}
</script>
\ No newline at end of file
<template>
<a-modal
:title="title"
:visible="formVisible"
@cancel="formVisible = false"
>
<div slot="footer">
<a-button @click="resetForm">重置</a-button>
<a-button type="primary" :loading="formConfirmLoading" @click="handleOk">确定</a-button>
</div>
<slot>
<a-form-model
ref="ruleForm"
:model="formInfo"
:rules="formRules"
:label-col="{span:labelCol}"
:wrapper-col="{span: wrapperCol}"
>
<a-form-model-item label="用户名" prop="user_name">
<w-input v-model="formInfo.user_name" placeholder="请输入用户名"/>
</a-form-model-item>
<a-form-model-item label="用户账号" prop="account">
<w-input v-model="formInfo.account" placeholder="请输入用户账号"/>
</a-form-model-item>
<a-form-model-item label="账号密码" prop="password">
<w-input type="password" v-model="formInfo.password" placeholder="请输入用户账号"/>
</a-form-model-item>
<a-form-model-item label="用户电话" prop="mobile">
<w-input v-model="formInfo.mobile" placeholder="请输入用户电话"/>
</a-form-model-item>
<!-- <a-form-model-item label="上传图片" prop="mobile">
<w-upload filetype="images" :limit="1"/>
</a-form-model-item>
<a-form-model-item label="上传多图" prop="mobile">
<w-upload filetype="images" :limit="2"/>
</a-form-model-item>
<a-form-model-item label="上传文件" prop="mobile">
<w-upload filetype="file" :limit="2"/>
</a-form-model-item>
<a-form-model-item label="上传文件" prop="mobile">
<w-upload filetype="file" :limit="1" :multiple="false"/>
</a-form-model-item> -->
</a-form-model>
</slot>
</a-modal>
</template>
<script>
import form from "@/mixins/form"
export default {
mixins:[form],
props:{
labelCol:{
type:Number,
default:5,
},
wrapperCol:{
type:Number,
default:16,
}
},
data(){
return{
tablename:"user",
formInfo:{
user_name:"",//用户名
account:"",//用户账号
password:"",//密码
mobile:"",//用户电话
},//表单提交数据
formRules:{
user_name:[{ required: true, message: '用户名不能为空', trigger: ['blur','change'] }],
account:[{ required: true, message: '用户账号不能为空', trigger: ['blur','change'] }],
password:[{ required: true, message: '账号密码不能为空', trigger: ['blur','change'] }],
mobile:[{ required: true, message: '用户电话不能为空', trigger: ['blur','change'] }],
},//表单验证
title:"提示"
}
},
methods:{
// 保存
handleOk(){
this.formSave()
},
// 新增
onAdd(){
this.resetForm()//初始化表单
this.formInfo.id && this.$delete(this.formInfo,'id')
this.title = "新增菜单"
this.formVisible = true
},
// 编辑
onEdit(row){
this.title = "编辑菜单"
this.formVisible = true
let editObj = {id:row.id}
Object.keys(this.formInfo).forEach(v=>{
editObj[v] = row[v]
})
this.formInfo = editObj
}
}
}
</script>
\ No newline at end of file
<template>
<a-modal
title="场所授权"
:width="800"
:visible="formVisible"
@ok="handleOk"
@cancel="formVisible = false"
>
<div class="ff">
<Standardtable
:pagination="false"
:isSearch="false"
:columns="tablecolumns"
:dataSource="tabledataSource"
:bordered="true"
:selectedRows="selectedRows"
:columnsSearch="columnsSearch"
:loading="tableLoading"
:defaultCheckedKey="defaultCheckedKey"
@selectedRowChange="selectedRowChange"
@add="OnTableAdd"
@del="OnTableAllDel"
@Search="onSearch"
@change="handleTableChange"
>
</Standardtable>
</div>
</a-modal>
</template>
<script>
import table from "@/mixins/table"
import {usersite} from "@/services/default"
export default {
mixins:[table],
data(){
return{
formVisible:false,
tablename:"waited",//接口地址 名称
tablecolumns:[
{
title: "ID",
dataIndex: "id",
},
{
title: "站点",
dataIndex: "name",
},
{
title: "编号",
dataIndex: "number",
width: '40%',
},
],//表头数据
tabledataSource:[],//表格数据
defaultCheckedKey:[],
rowId:""
}
},
methods:{
handleOk(){
let arr = []
if(this.selectedId && this.selectedId.length>0){
arr = this.selectedId
}else{
arr = this.defaultCheckedKey
}
usersite({user_id:this.rowId,siteid:arr.join(',')}).then(res=>{
console.log(res)
const {code,msg} = res.data
if(code == 0){
this.$parent.tableReload()
this.formVisible = false
}else{
this.$message.error(msg)
}
})
},
onEditAuth(row){
console.log(row)
this.selectedId = [] //选中id
this.selectedRows = [] //选中对象
this.rowId = row.id
this.defaultCheckedKey = row.user_site?row.user_site.split(',').map(Number):[]
this.formVisible = true
},
}
}
</script>
\ No newline at end of file
<template>
<a-modal
:title="title"
:visible="formVisible"
@cancel="formVisible = false"
>
<div slot="footer">
<a-button @click="resetForm">重置</a-button>
<a-button type="primary" :loading="formConfirmLoading" @click="handleOk">确定</a-button>
</div>
<slot>
<a-form-model
ref="ruleForm"
:model="formInfo"
:rules="formRules"
:label-col="{span:labelCol}"
:wrapper-col="{span: wrapperCol}"
>
<a-form-model-item label="版本号" prop="number">
<w-input v-model="formInfo.number" placeholder="请输入版本号"/>
</a-form-model-item>
<a-form-model-item label="版本说明" prop="sumarry">
<w-input type="textarea" v-model="formInfo.sumarry" placeholder="请输入版本说明"/>
</a-form-model-item>
</a-form-model>
</slot>
</a-modal>
</template>
<script>
import form from "@/mixins/form"
export default {
mixins:[form],
props:{
labelCol:{
type:Number,
default:5,
},
wrapperCol:{
type:Number,
default:16,
}
},
data(){
return{
tablename:"edition",//接口名称
formInfo:{
number:"",//版本号
sumarry:"",//版本说明
},//表单提交数据
formRules:{
number:[{ required: true, message: '版本号不能为空', trigger: ['blur','change'] }],
sumarry:[{ required: true, message: '版本说明不能为空', trigger: ['blur','change'] }],
},//表单验证
title:"提示"
}
},
methods:{
// 保存
handleOk(){
this.formSave()
},
// 新增
onAdd(){
this.resetForm()//初始化表单
this.formInfo.id && this.$delete(this.formInfo,'id')
this.title = "新增"
this.formVisible = true
},
// 编辑
onEdit(row){
this.title = "编辑"
this.formVisible = true
let editObj = {id:row.id}
Object.keys(this.formInfo).forEach(v=>{
editObj[v] = row[v]
})
this.formInfo = editObj
}
}
}
</script>
\ No newline at end of file
<template>
<div class="ff p-t-15 p-l-15 p-r-15">
<Standardtable
:columns="tablecolumns"
:dataSource="tabledataSource"
:bordered="true"
:selectedRows="selectedRows"
:columnsSearch="columnsSearch"
:pagination="pagination"
:loading="tableLoading"
@selectedRowChange="selectedRowChange"
@add="OnTableAdd"
@del="OnTableAllDel"
@Search="onSearch"
@change="handleTableChange"
>
<div slot="search-del"></div>
<div slot="search-more"></div>
</Standardtable>
<show ref="pageshow" @success="getTableInfo"/>
</div>
</template>
<script>
import table from "@/mixins/table"
import show from "./form"
export default {
mixins:[table],
data(){
return{
tablename:"edition",//接口地址 名称
tablecolumns:[
{
title: "序号",
width: "70px",
customRender:this.RenderIndex
},
{
title: "版本号",
dataIndex: "number",
},
{
title: "版本说明",
dataIndex: "sumarry",
},
{
title: "更新时间",
dataIndex: "create_time",
},
// {
// title: "操作",
// width: "200px",
// customRender:(text, record)=><tableActive record={record} onEdit={this.OnTableEdit} onDel={this.OnTableDel}/>
// },
],//表头数据
tabledataSource:[],//表格数据
columnsSearch:[
]//表格查询条件
}
},
components:{
show
}
}
</script>
\ No newline at end of file
<template>
<a-modal
:title="title"
:visible="formVisible"
@cancel="formVisible = false"
>
<div slot="footer">
<a-button @click="resetForm">重置</a-button>
<a-button type="primary" :loading="formConfirmLoading" @click="handleOk">确定</a-button>
</div>
<slot>
<a-form-model
ref="ruleForm"
:model="formInfo"
:rules="formRules"
:label-col="{span:labelCol}"
:wrapper-col="{span: wrapperCol}"
>
<a-form-model-item label="指标简称" prop="summary">
<w-input v-model="formInfo.summary" placeholder="请输入指标简称"/>
</a-form-model-item>
<a-form-model-item label="指标详情" prop="standard">
<w-input v-model="formInfo.standard" placeholder="请输入指标详情"/>
</a-form-model-item>
<a-form-model-item label="指标分值" prop="score">
<w-input v-model.number="formInfo.score" placeholder="请输入指标分值" suffix="分"/>
</a-form-model-item>
</a-form-model>
</slot>
</a-modal>
</template>
<script>
import form from "@/mixins/form"
export default {
mixins:[form],
props:{
labelCol:{
type:Number,
default:5,
},
wrapperCol:{
type:Number,
default:16,
}
},
data(){
return{
tablename:"role",//接口名称
formInfo:{
standard:"",//指标详情
summary:"",//指标简称
score:0,//指标分值
},//表单提交数据
formRules:{
standard:[{ required: true, message: '指标详情不能为空', trigger: ['blur','change'] }],
summary:[{ required: true, message: '指标简称不能为空', trigger: ['blur','change'] }],
score:[{ required: true, message: '指标分值不能为空', trigger: ['blur','change'] }],
},//表单验证
title:"提示"
}
},
methods:{
// 保存
handleOk(){
this.formSave()
},
// 新增
onAdd(){
this.resetForm()//初始化表单
this.formInfo.id && this.$delete(this.formInfo,'id')
this.title = "新增"
this.formVisible = true
},
// 编辑
onEdit(row){
this.title = "编辑"
this.formVisible = true
let editObj = {id:row.id}
Object.keys(this.formInfo).forEach(v=>{
editObj[v] = row[v]
})
this.formInfo = editObj
}
}
}
</script>
\ No newline at end of file
<template>
<div class="ff p-t-15 p-l-15 p-r-15 p-b-15">
<a-row :gutter="20">
<a-col :span="4">
<h2>分类管理</h2>
<div class="n-item" :class="{'active':checkId == item}" v-for="(item,index) in flList" :key="index" @click="onNav(item)">{{item}}</div>
</a-col>
<a-col :span="20">
<h2>指标管理</h2>
<tables :checkId="checkId" v-if="checkId"/>
</a-col>
</a-row>
</div>
</template>
<script>
import {listrole} from "@/services/default"
import tables from "./table"
export default {
data(){
return {
checkId:'',
flList:[]
}
},
created(){
listrole().then(res=>{
const {code,msg,data} = res.data
if(code == 0){
this.flList = data
this.checkId = data[0]
}else{
this.$message.error(msg)
}
})
},
methods:{
onNav(id){
this.checkId = id
}
},
components:{
tables
}
}
</script>
<style lang="less" scoped>
h2{
font-size: 16px;
}
.n-item{
margin-top: 10px;
padding:10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
border-radius: 8px;
cursor: pointer;
&.active{
color: #fff;
background: #1890ff;
}
}
</style>
\ No newline at end of file
<template>
<div class="ff">
<Standardtable
:isSearch="false"
:columns="tablecolumns"
:dataSource="tabledataSource"
:bordered="true"
:selectedRows="selectedRows"
:columnsSearch="columnsSearch"
:pagination="pagination"
:loading="tableLoading"
@selectedRowChange="selectedRowChange"
@add="OnTableAdd"
@del="OnTableAllDel"
@Search="onSearch"
@change="handleTableChange"
>
</Standardtable>
<show ref="pageshow" @success="getTableInfo"/>
</div>
</template>
<script>
import table from "@/mixins/table"
import show from "./form"
export default {
mixins:[table],
props:['checkId'],
data(){
return{
tablename:"role",//接口地址 名称
tablecolumns:[
{
title: "序号",
width: "70px",
customRender:this.RenderIndex
},
{
title: "指标详情",
dataIndex: "standard",
},
{
title: "指标简称",
dataIndex: "summary",
},
{
title: "指标分值",
dataIndex: "score",
},
{
title: "操作",
width: "200px",
customRender:(text, record)=><tableActive del={false} record={record} onEdit={this.OnTableEdit} onDel={this.OnTableDel}/>
},
],//表头数据
tabledataSource:[],//表格数据
columnsSearch:[],//表格查询条件
}
},
watch:{
checkId:{
handler:function(){
this.tableReload()
},
}
},
methods:{
// 重写数据请求之前
tableBeforeData(data){
data['class'] = this.checkId
return data
}
},
components:{
show
}
}
</script>
\ No newline at end of file
<template>
<div class="ff p-t-15 p-l-15 p-r-15 p-b-15">
<a-row :gutter="20">
<a-col :span="18">
<div class="search">
<a-row :gutter="5">
<w-input :span="4" v-model="tablequery.name" placeholder="请输入窗口名"/>
<w-input :span="4" type="select" v-model="tablequery.section_id" :dictionaries="sectionList" placeholder="请选择部门"/>
<a-col :span="2">
<a-button type="primary" @click="tableReload">查询</a-button>
</a-col>
</a-row>
</div>
<div class="win-type">
<span v-for="(item,index) in countlist" :key="index" :style="{color:item.color}">{{item.label}}{{item.count}}</span>
</div>
<div class="win-table" v-if="tabledataSource.length>0">
<a-row type="flex" align="middle">
<a-col :span="4" class="col" v-for="(item) in tabledataSource" :key="item.id">
<div class="win-item flex_row flex_align_c flex_justify_c" :style="{background:$dictionaryValue('video_online',item.video_online,'obj').color}" @click="onpageshow(item)">
<div>
<h3>{{item.name}}</h3>
<p>窗口编号:{{item.number}}</p>
</div>
</div>
</a-col>
</a-row>
</div>
<a-empty v-else/>
</a-col>
<a-col :span="6">
<show ref="pageshow"/>
</a-col>
</a-row>
</div>
</template>
<script>
import table from "@/mixins/table"
import show from "./pageshow"
import {sectionListdata} from "@/services/default"
export default {
mixins:[table],
data(){
return{
tablename:"windowinfo",//接口地址 名称
tablequery:{
section_id:"",//部门id
name:""//窗口名
},
countlist:[],//窗口状态
sectionList:[]
}
},
created(){
sectionListdata().then(res=>{
const {code,data,msg} = res.data
if(code == 0){
this.sectionList = data.map(v=>{
v['label'] = v.name
v['value'] = v.id
return v
})
}else{
this.$message.error(`部门字典错误:${msg}`)
}
})
},
methods:{
// 重写接口提交之前数据
tableBeforeData(data){
data.size = 10000
return data
},
// 重写接口返回后数据
tableAfterData(data){
console.log(data)
if(data.code == 0){
const {count} = data.data
this.countlist = count
}
return data
},
// 详情
onpageshow(row){
this.$refs.pageshow.onShow(row)
}
},
components:{
show
}
}
</script>
<style lang="less" scoped>
.win-type{
padding: 5px;
background: #f6f6f9;
margin: 10px 0;
span{
display: inline-block;
margin-right: 12px;
position: relative;
cursor:pointer
}
}
.win-table{
border-right: 1px solid #ddd;
border-bottom: 1px solid #ddd;
.col{
border-left: 1px solid #ddd;
border-top: 1px solid #ddd;
padding:10px;
box-sizing: border-box;
}
.win-item{
cursor: pointer;
border-radius: 8px;
height: 80px;
text-align: center;
color: #fff;
h3{
color: #fff;
}
p{
margin: 0;
}
}
}
</style>
\ No newline at end of file
<template>
<div>
<div class="camera"></div>
<div class="pageshow">
<div class="photo">
<images :src='formInfo.photo' alt="" />
</div>
<div class="userinfo">
<div class="text-row">
<div class="lable">姓名</div>
<div class="val">{{formInfo.name?formInfo.name:'--'}}</div>
</div>
<div class="text-row">
<div class="lable">工号</div>
<div class="val">{{formInfo.number?formInfo.number:'--'}}</div>
</div>
<div class="text-row">
<div class="lable">部门</div>
<div class="val">{{formInfo.section_name?formInfo.section_name:'--'}}</div>
</div>
<div class="text-row">
<div class="lable">电话</div>
<div class="val">{{formInfo.phone?formInfo.phone:'--'}}</div>
</div>
<div class="text-row">
<div class="lable">站点名</div>
<div class="val">{{formInfo.sitename?formInfo.sitename:'--'}}</div>
</div>
<div class="text-row">
<div class="lable">窗口号</div>
<div class="val">{{formInfo.window_number?formInfo.window_number:'--'}}</div>
</div>
<div class="text-row">
<div class="lable">受理业务</div>
<div class="val">{{formInfo.name?formInfo.name:'--'}}</div>
</div>
</div>
</div>
</div>
</template>
<script>
import {windowInfo} from "@/services/default"
export default {
data(){
return{
formInfo:{},
}
},
methods:{
// 编辑
onShow(row){
console.log(row)
windowInfo({id:row.id}).then(res=>{
const {code,data,msg} = res.data
if(code == 0){
this.formInfo = data
}else{
this.$message.error(msg)
}
})
}
}
}
</script>
<style lang="less" scoped>
.pageshow{
position: relative;
padding: 10px;
background: #f0f2f5;
.photo{
position: absolute;
left: 10px;
top: 10px;
height: 240px;
width: 150px;
img{
display: block;
width: 100%;
height: 100%;
}
}
.userinfo{
margin-left: 160px;
height: 240px;
background: #fff;
padding:10px;
box-sizing: border-box;
border-radius: 6px;
}
.text-row{
&+.text-row{
margin-top: 10px;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="ff p-t-15 p-l-15 p-r-15">
<Standardtable
:active="false"
:columns="tablecolumns"
:dataSource="tabledataSource"
:bordered="true"
:selectedRows="selectedRows"
:columnsSearch="columnsSearch"
:pagination="pagination"
:loading="tableLoading"
@selectedRowChange="selectedRowChange"
@add="OnTableAdd"
@del="OnTableAllDel"
@Search="onSearch"
@change="handleTableChange"
>
</Standardtable>
<show ref="pageshow" @success="getTableInfo"/>
</div>
</template>
<script>
import table from "@/mixins/table"
import show from "./pageshow"
export default {
mixins:[table],
data(){
return{
tablename:"queue",//接口地址 名称
tablecolumns:[
{
title: "序号",
width: "70px",
customRender:this.RenderIndex
},
{
title: "业务名",
dataIndex: "business",
},
{
title: "群众手机号",
dataIndex: "phone",
},
{
title: "办事群众",
dataIndex: "name",
},
{
title: "群众身份证号",
dataIndex: "idcard",
},
{
title: "办事开始时间",
dataIndex: "calltime",
},
{
title: "结束时间",
dataIndex: "endtime",
},
{
title: "窗口名",
dataIndex: "windowname",
},
{
title: "部门名",
dataIndex: "sectionname",
},
{
title: "操作",
width: "200px",
customRender:(text, record)=><a record={record}>查看视频</a>
},
],//表头数据
tabledataSource:[],//表格数据
columnsSearch:[
{type:'text',dataIndex:'business',span:5,width:150,dictionaries:[{label:'全部',value:''},{label:'选项1',value:1},{label:'选项2',value:2}],placeholder:"请输入业务名"},
{type:'text',dataIndex:'idcard',span:5,width:150,dictionaries:[{label:'全部',value:''},{label:'选项1',value:1},{label:'选项2',value:2}],placeholder:"请输入群众身份证号"},
{type:'text',dataIndex:'windowname',span:5,width:150,dictionaries:[{label:'全部',value:''},{label:'选项1',value:1},{label:'选项2',value:2}],placeholder:"请输入窗口名"},
]//表格查询条件
}
},
components:{
show
}
}
</script>
\ No newline at end of file
<template>
<div>视频播放</div>
</template>
\ No newline at end of file
<template>
<a-modal
:title="title"
:visible="formVisible"
@cancel="formVisible = false"
>
<div slot="footer">
<a-button @click="formVisible = false">取消</a-button>
<a-button type="primary" :loading="formConfirmLoading" @click="handleOk">确定</a-button>
</div>
<slot>
<p style="color:red"><a-icon type="info-circle" /> 温馨提示:该功能将统一改变的列表中所有窗口(已单独配置窗口除外)的监测时间,请谨慎操作。</p>
<a-form-model
ref="formInfoTime"
:model="formInfoTime"
:label-col="{span:labelCol}"
:wrapper-col="{span: wrapperCol}"
>
<a-form-model-item label="上午监测时间" prop="kq_amstart_time">
<a-time-picker v-model="formInfoTime.kq_amstart_time" valueFormat="HH:mm:ss"/>
<span style="padding:0 5px">~</span>
<a-time-picker v-model="formInfoTime.kq_amend_time" valueFormat="HH:mm:ss"/>
</a-form-model-item>
<a-form-model-item label="下午监测时间" prop="kq_pmstart_time">
<a-time-picker v-model="formInfoTime.kq_pmstart_time" valueFormat="HH:mm:ss"/>
<span style="padding:0 5px">~</span>
<a-time-picker v-model="formInfoTime.kq_pmend_time" valueFormat="HH:mm:ss"/>
</a-form-model-item>
</a-form-model>
</slot>
</a-modal>
</template>
<script>
import {kqsetSave,kqsetInfo} from "@/services/default"
export default {
props:{
labelCol:{
type:Number,
default:5,
},
wrapperCol:{
type:Number,
default:16,
}
},
data(){
return{
formConfirmLoading:false,
formVisible:false,
formInfoTime:{
kq_amstart_time:"",//上午上班时间 09:00
kq_amend_time:"",//上午下班时间
kq_pmstart_time:"",//上午上班时间
kq_pmend_time:"",//下午下班时间
},//表单提交数据
title:"统一检测时间"
}
},
methods:{
// 保存
handleOk(){
kqsetSave(this.formInfoTime).then(res=>{
const {code,msg} = res.data
if(code == 0){
this.$message.success("提交成功")
this.$emit("success")
this.formVisible = false
}else{
this.$message.error(msg)
}
})
},
// 编辑
onEdit(){
this.formVisible = true
kqsetInfo().then(res=>{
const {code,data} = res.data
if(code==0 && data){
let obj = {id:data.id}
Object.keys(this.formInfoTime).forEach(v=>{
obj[v] = data[v] || ''
})
this.formInfoTime = obj
}
})
}
}
}
</script>
\ No newline at end of file
<template>
<div class="window viewbox">
<a-row :gutter="16">
<a-col class="gutter-row" :span="6">
<div class="gutter-box ff br">
<PageCard title="部门列表" icon="database">
<div slot="head-right">更新时间:</div>
<div class="b-body">
<div class="handle-btn">
<importFile @success="fileComplete" :action="action">
<a-button type="primary">
导入部门
</a-button>
</importFile>
<emptyFile keyword="section">
<a-button>
下载模板
</a-button>
</emptyFile>
</div>
<div class="buness-list">
<div class="b-l-a" :class="{active:section_id == ''}" @click="onSectionWindow('')">
<a-icon type="golden" theme="filled" class="primary-color"/>
<span>全部部门</span>
</div>
<div class="b-l-a" :class="{active:item.id == section_id}" v-for="item in sectionListInfo" :key="item.id" @click="onSectionWindow(item.id)">
<a-icon type="golden" theme="filled" class="primary-color"/>
<span>{{item.name}}</span>
</div>
</div>
</div>
</PageCard>
</div>
</a-col>
<a-col class="gutter-row" :span="18">
<div class="gutter-box ff">
<PageCard title="窗口列表" icon="database">
<div class="b-body" style="padding:0 15px">
<tables ref="tables"/>
</div>
</PageCard>
</div>
</a-col>
</a-row>
</div>
</template>
<script>
import {sectionListdata} from "@/services/default"
import tables from "./table"
import {section} from "@/services/api"
export default {
data(){
return{
sectionListInfo:[],
action:section.allupload,//导入部门接口地址
section_id:''
}
},
created(){
this.sectionList()
},
methods:{
onSectionWindow(id){
if(id){
this.section_id = id
this.$refs.tables.tablequery = {section_id:id}
}else{
this.section_id = ''
this.$refs.tables.tablequery = {}
}
this.$refs.tables.tableReload()
},
sectionList(){
sectionListdata().then(res=>{
console.log(res.data)
const {code,data} = res.data
if(code == 0){
this.sectionListInfo = data
}
})
},
fileComplete(type){
if(type == 'addfile'){
// 文件导入成功
this.sectionList()
}
}
},
components:{
tables
}
}
</script>
<style lang="less" scoped>
.handle-btn{
padding: 0 10px 10px;
button{
margin-right: 5px;
}
}
.b-body{
min-height: 700px;
}
.buness-list{
height: 600px;
overflow-y: auto;
}
.b-l-a{
padding: 10px;
font-size: 13px;
&:hover{
background: #f5f5f5;
}
span{
padding-left: 5px;
}
&.active{
background: #f5f5f5;
}
}
</style>
\ No newline at end of file
<template>
<a-drawer
title="详情"
:width="450"
placement="right"
:visible="visible"
@close="visible = false"
>
<div class="p-w">
<h2 class="primary-color">{{info.window.name}}</h2>
<div class="p-w-r flex_row">
<div class="p-l">窗口编号:</div>
<div class="p-v">{{info.window.number}}</div>
</div>
<div class="p-w-r flex_row">
<div class="p-l">所属部门:</div>
<div class="p-v">{{info.window.section_name}}</div>
</div>
<div class="p-w-r flex_row">
<div class="p-l">所属楼栋:</div>
<div class="p-v">{{info.window.building}}</div>
</div>
<div class="p-w-r flex_row">
<div class="p-l">所属楼层:</div>
<div class="p-v flex_row">{{info.window.lv}}</div>
</div>
</div>
<div class="p-w">
<div class="p-photo">
<images :src="info.workman.photo"/>
</div>
<h2 class="primary-color">{{info.workman.name}}</h2>
<div class="p-w-r flex_row">
<div class="p-l">工号:</div>
<div class="p-v">{{info.workman.number}}</div>
</div>
<div class="p-w-r flex_row">
<div class="p-l">是否在中心:</div>
<div class="p-v">{{info.workman.in_flag==0?'不在':''}}</div>
</div>
<div class="p-w-r flex_row">
<div class="p-l">联系电话:</div>
<div class="p-v">{{info.workman.phone}}</div>
</div>
</div>
<div class="p-w">
<h2 class="primary-color">检测</h2>
<div class="p-w-r flex_row">
<div class="p-l">上午监测时间:</div>
<div class="p-v">{{info.window.kq_amstart_time}} ~ {{info.window.kq_amend_time}}</div>
</div>
<div class="p-w-r flex_row">
<div class="p-l">下午监测时间:</div>
<div class="p-v">{{info.window.kq_pmstart_time}} ~ {{info.window.kq_pmend_time}}</div>
</div>
</div>
<div style="height:53px"></div>
<div class="footer">
<a-popconfirm
title="删除后不可恢复,确定要删除吗?"
ok-text="确定"
cancel-text="再想想"
@confirm="onDel"
>
<a-button type="danger">删除</a-button>
</a-popconfirm>
<a-button style="margin-left:10px" @click="visible = false">关闭</a-button>
</div>
</a-drawer>
</template>
<script>
import {windowshow} from "@/services/default"
export default {
data(){
return{
visible:false,
info:{
window:{},
workman:{}
},
row:{}
}
},
methods:{
onShow(row){
this.row = row
this.visible = true
windowshow({id:row.id}).then(res=>{
const {code,data,msg} = res.data
if(code == 0){
this.info = data
}else{
this.$message.error(msg)
}
})
},
onDel(){
this.visible = false
this.$parent.OnTableDel(this.row)
}
}
}
</script>
<style lang="less" scoped>
.footer{
position: absolute;
left: 0;
bottom: 0;
right: 0;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
background: #fff;
}
.p-tit{
padding: 10px 15px;
color: #ff4d4f;
background: #fff1f1;
font-weight: blod;
border-left: 4px solid #ff4d4f;
}
.p-w{
margin-top: 20px;
background: #f1f7fd;
border-radius: 6px;
padding: 10px;
position: relative;
.p-w-r{
margin-bottom: 10px;
}
.p-l{
width: 100px;
text-align: right;
}
h2{
font-weight: bold;
}
.p-photo{
position: absolute;
top:20px;
right: 20px;
width: 100px;
height: 120px;
img{
display: block;
width: 100%;
height: 100%;
}
}
}
</style>
\ No newline at end of file
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