caidanquanxian

This commit is contained in:
2309368887@qq.com 2022-07-18 09:24:05 +08:00
commit 4e3da40fdb
36 changed files with 2078 additions and 1342 deletions

View File

@ -30,11 +30,11 @@
<% })%> <% })%>
<el-table-column label="操作" fixed="right" align="right" width="140"> <el-table-column label="操作" fixed="right" align="right" width="140">
<template #default="scope"> <template #default="scope">
<el-button type="text" size="small" @click="table_show(scope.row, scope.$index)">查看</el-button> <el-button link size="small" @click="table_show(scope.row, scope.$index)">查看</el-button>
<el-button type="text" size="small" @click="table_edit(scope.row, scope.$index)">编辑</el-button> <el-button link size="small" @click="table_edit(scope.row, scope.$index)">编辑</el-button>
<el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)"> <el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
<template #reference> <template #reference>
<el-button type="text" size="small">删除</el-button> <el-button link size="small">删除</el-button>
</template> </template>
</el-popconfirm> </el-popconfirm>
</template> </template>

View File

@ -99,9 +99,10 @@ export default {
video: { video: {
list: { list: {
name: "获取视频设备列表", name: "获取视频设备列表",
req: async function(){ req: async function(data){
return await http.post( return await http.post(
`${config.API_URL}/third/tdevice/vchannel/`, `${config.API_URL}/third/tdevice/vchannel/`,
data
); );
} }
}, },

View File

@ -10,5 +10,20 @@ export default {
return await http.get(this.url, data); return await http.get(this.url, data);
} }
} }
} },
file_logs: {
list: {
url: `${config.API_URL}/monitor/log/`,
name: "文件日志",
req: async function(data){
return await http.get(this.url, data);
}
},
detail: {
name: "文件日志",
req: async function(name){
return await http.get(`${config.API_URL}/monitor/log/${name}/`);
}
}
},
} }

View File

@ -332,7 +332,7 @@ export default {
}, },
runOnce: { runOnce: {
name: "执行一次", name: "执行一次",
req: async function(data,id){ req: async function(data, id){
return await http.post(`${config.API_URL}/system/ptask/${id}/run_once/`,data); return await http.post(`${config.API_URL}/system/ptask/${id}/run_once/`,data);
} }
}, },

View File

@ -4,7 +4,7 @@ import http from "@/utils/request"
export default { export default {
tdevice: { tdevice: {
list: { list: {
name: "三方喇叭接口", name: "三方设备接口",
req: async function(data){ req: async function(data){
return await http.get( return await http.get(
`${config.API_URL}/third/tdevice/`, `${config.API_URL}/third/tdevice/`,
@ -30,6 +30,33 @@ export default {
); );
} }
}, },
speakerSync: {
name: "同步喇叭",
req: async function(data){
return await http.post(
`${config.API_URL}/third/tdevice/speaker_sync/`,
data
);
}
},
dchannelSync: {
name: "同步闸机",
req: async function(data){
return await http.post(
`${config.API_URL}/third/tdevice/dchannel_sync/`,
data
);
}
},
vchannelSync: {
name: "同步监控",
req: async function(data){
return await http.post(
`${config.API_URL}/third/tdevice/vchannel_sync/`,
data
);
}
},
}, },
blt:{ blt:{
list:{ list:{

View File

@ -175,6 +175,11 @@ export default {
stripe: { type: Boolean, default: false }, stripe: { type: Boolean, default: false },
pageSize: { type: Number, default: config.pageSize }, pageSize: { type: Number, default: config.pageSize },
pageSizes: { type: Array, default: config.pageSizes }, pageSizes: { type: Array, default: config.pageSizes },
pageStr: { type: String, default: config.request.page },
pageSizeStr: { type: String, default: config.request.pageSize },
orderStr: { type: String, default: config.request.order },
isTree: { type: Boolean, default: false },
parseData: { type: Function, default: config.parseData },
rowKey: { type: String, default: "" }, rowKey: { type: String, default: "" },
summaryMethod: { type: Function, default: null }, summaryMethod: { type: Function, default: null },
column: { type: Object, default: () => {} }, column: { type: Object, default: () => {} },
@ -194,7 +199,7 @@ export default {
this.total = this.tableData.length; this.total = this.tableData.length;
}, },
apiObj() { apiObj() {
this.tableParams = this.params; // this.tableParams = this.params;
this.refresh(); this.refresh();
}, },
}, },
@ -219,7 +224,7 @@ export default {
order: null, order: null,
loading: false, loading: false,
tableHeight: "100%", tableHeight: "100%",
tableParams: this.params, tableParams: Object.assign({}, this.params),
userColumn: [], userColumn: [],
customColumnShow: false, customColumnShow: false,
summary: {}, summary: {},
@ -241,7 +246,11 @@ export default {
if (this.apiObj) { if (this.apiObj) {
this.getData(); this.getData();
} else if (this.data) { } else if (this.data) {
this.tableData = this.data; if (this.isTree) {
this.tableData = this.redata(this.data);
} else {
this.tableData = this.data;
}
this.total = this.tableData.length; this.total = this.tableData.length;
} }
}, },
@ -266,55 +275,34 @@ export default {
async getData() { async getData() {
this.loading = true; this.loading = true;
var reqData = { var reqData = {
[config.request.page]: this.currentPage, [this.pageStr]: this.currentPage,
[config.request.pageSize]: this.scPageSize, [this.pageSizeStr]: this.scPageSize,
// [config.request.prop]: this.prop, // [config.request.prop]: this.prop,
[config.request.order]: this.order, [this.orderStr]: this.order,
}; };
if (this.hidePagination) { if (this.hidePagination) {
reqData[config.request.page] = 0; reqData[this.pageStr] = 0;
// delete reqData[config.request.page] // delete reqData[config.request.page]
// delete reqData[config.request.pageSize] // delete reqData[config.request.pageSize]
} }
Object.assign(reqData, this.tableParams); Object.assign(reqData, this.tableParams);
try { try {
var res = await this.apiObj.req(reqData); var res = await this.apiObj.req(reqData);
if (this.hidePagination) { var response = this.parseData(res);
if (res.length == 0) {
this.emptyText = "暂无数据";
}
if(this.$route.path==='/sys/dept'||this.$route.path==='/sys/perm'){
this.tableData = this.redata(res);
console.log(this.tableData)
}else{
this.tableData = res || [];
}
this.loading = false;
this.$refs.scTable.setScrollTop(0);
this.$emit("dataChange", res, this.tableData);
}
} catch (error) {
this.loading = false;
this.emptyText = error.response.data.err_msg || error.statusText;
return false;
}
try {
var response = config.parseData(res);
if (response.total === 0) { if (response.total === 0) {
this.emptyText = "暂无数据"; this.emptyText = "暂无数据";
} }
let dataList = null; let dataList = null;
if (this.hidePagination) { if (this.hidePagination) {
dataList = response.data || []; dataList = response.data || [];
} else { } else {
dataList = response.rows?response.rows:response.data.rows?response.data.rows:response.data.pageData?response.data.pageData:[]; dataList = response.rows;
}
if (this.isTree) {
this.tableData = this.redata(dataList);
} else {
this.tableData = dataList || [];
} }
if(this.$route.path==='/sys/dept'||this.$route.path==='/ops/menu'){
this.tableData = this.redata(dataList);
console.log(this.tableData)
}else{
this.tableData = dataList || [];
}
this.total = response.total || 0; this.total = response.total || 0;
this.summary = response.summary || {}; this.summary = response.summary || {};
this.loading = false; this.loading = false;
@ -322,32 +310,36 @@ export default {
this.$emit("dataChange", res, this.tableData); this.$emit("dataChange", res, this.tableData);
} catch (error) { } catch (error) {
this.loading = false; this.loading = false;
this.emptyText = "数据格式错误"; if(error.response.data){
this.emptyText = error.response.data.err_msg;
}else{
this.emptyText = error.statusText || "数据格式错误";
}
return false; return false;
} }
}, },
redata(postList){ redata(postList) {
let posts = []; let posts = [];
postList.forEach(item => { postList.forEach((item) => {
let obj = new Object(); let obj = new Object();
obj = {...item}; obj = { ...item };
obj.parentId = item.parent; obj.parentId = item.parent;
posts.push(obj) posts.push(obj);
}); });
let obj = posts.reduce((res, v) => (res[v.id] = v , res), {});//Object let obj = posts.reduce((res, v) => ((res[v.id] = v), res), {}); //Object
let arr = []; let arr = [];
for (let item of posts) { for (let item of posts) {
if (item.parentId == null) { if (item.parentId == null) {
arr.push(item); arr.push(item);
continue continue;
} }
let parent = obj[item.parentId]; let parent = obj[item.parentId];
parent.children = parent.children ? parent.children : []; parent.children = parent.children ? parent.children : [];
parent.children.push(item); parent.children.push(item);
} }
console.log(arr); console.log(arr);
return arr; return arr;
}, },
// //
paginationChange() { paginationChange() {
this.getData(); this.getData();
@ -362,30 +354,30 @@ export default {
this.$refs.scTable.clearSelection(); this.$refs.scTable.clearSelection();
this.getData(); this.getData();
}, },
// params // query
upData(params, page = 1) { upData(query, page = 1) {
this.currentPage = page; this.currentPage = page;
this.$refs.scTable.clearSelection(); this.$refs.scTable.clearSelection();
Object.assign(this.tableParams, params || {}); Object.assign(this.tableParams, query);
this.getData(); this.getData();
}, },
// params sort // query filter
queryData(params, page = 1) { queryData(query, page = 1) {
this.currentPage = page; this.currentPage = page;
this.tableParams = params || {}; Object.assign(this.tableParams, query);
this.$refs.scTable.clearSelection(); this.$refs.scTable.clearSelection();
this.$refs.scTable.clearFilter(); this.$refs.scTable.clearFilter();
this.getData(); this.getData();
}, },
// params // tableParamsparams
reload(params, page = 1) { reload() {
this.currentPage = page; this.currentPage = 1;
this.tableParams = params || {}; this.tableParams = Object.assign({}, this.params);
this.$refs.scTable.clearSelection(); this.$refs.scTable.clearSelection();
this.$refs.scTable.clearSort(); this.$refs.scTable.clearSort();
this.$refs.scTable.clearFilter(); this.$refs.scTable.clearFilter();
this.getData(); this.getData();
this.$emit('resetQuery') this.$emit("resetQuery");
}, },
// //
columnSettingChange(userColumn) { columnSettingChange(userColumn) {

View File

@ -34,6 +34,7 @@ const routes = [
"title": "首页", "title": "首页",
"icon": "el-icon-home-filled", "icon": "el-icon-home-filled",
"type": "menu", "type": "menu",
"perms": ["home"]
}, },
"children": [ "children": [
{ {
@ -77,6 +78,7 @@ const routes = [
"title": "事件", "title": "事件",
"icon": "el-icon-goods-filled", "icon": "el-icon-goods-filled",
"type": "menu", "type": "menu",
"perms": ["ecm"]
}, },
"children": [ "children": [
{ {
@ -150,7 +152,8 @@ const routes = [
"meta": { "meta": {
"title": "工单", "title": "工单",
"icon": "el-icon-circle-check-filled", "icon": "el-icon-circle-check-filled",
"type": "menu" "type": "menu",
"perms": ["wf"]
}, },
"children": [ "children": [
{ {
@ -248,7 +251,8 @@ const routes = [
"meta": { "meta": {
"title": "作业", "title": "作业",
"icon": "el-icon-list", "icon": "el-icon-list",
"type": "menu" "type": "menu",
"perms": ["opm"]
}, },
"children": [ "children": [
{ {
@ -379,7 +383,8 @@ const routes = [
"meta": { "meta": {
"title": "相关方", "title": "相关方",
"icon": "el-icon-avatar", "icon": "el-icon-avatar",
"type": "menu" "type": "menu",
"perms": ["rpm"]
}, },
"children": [ "children": [
{ {
@ -451,7 +456,8 @@ const routes = [
"meta": { "meta": {
"title": "访客", "title": "访客",
"icon": "el-icon-user-filled", "icon": "el-icon-user-filled",
"type": "menu" "type": "menu",
"perms": ["vm"]
}, },
"children": [ "children": [
{ {
@ -503,7 +509,8 @@ const routes = [
"meta": { "meta": {
"title": "区域", "title": "区域",
"icon": "el-icon-location-filled", "icon": "el-icon-location-filled",
"type": "menu" "type": "menu",
"perms": ["am"]
}, },
"children": [ "children": [
{ {
@ -563,7 +570,8 @@ const routes = [
"meta": { "meta": {
"title": "人事", "title": "人事",
"icon": "el-icon-platform", "icon": "el-icon-platform",
"type": "menu" "type": "menu",
"perms": ["hrm"]
}, },
"children": [ "children": [
@ -608,7 +616,8 @@ const routes = [
"meta": { "meta": {
"title": "系统", "title": "系统",
"icon": "el-icon-tools", "icon": "el-icon-tools",
"type": "menu" "type": "menu",
"perms": ["sys"]
}, },
"children": [ "children": [
{ {
@ -616,7 +625,7 @@ const routes = [
"name": "user", "name": "user",
"meta": { "meta": {
"title": "账户管理", "title": "账户管理",
"icon": "el-icon-user-filled", "icon": "el-icon-user",
"type": "menu", "type": "menu",
"perms": ["user"] "perms": ["user"]
}, },
@ -638,7 +647,7 @@ const routes = [
"name": "post", "name": "post",
"meta": { "meta": {
"title": "岗位管理", "title": "岗位管理",
"icon": "sc-icon-organization", "icon": "el-icon-postcard",
"type": "menu", "type": "menu",
"perms": ["post"] "perms": ["post"]
}, },
@ -704,7 +713,7 @@ const routes = [
"path": "/ops/log", "path": "/ops/log",
"meta": { "meta": {
"title": "请求日志", "title": "请求日志",
"icon": "el-icon-fold", "icon": "el-icon-document",
"perms": ["log"] "perms": ["log"]
}, },
"component": "ops/log_request" "component": "ops/log_request"
@ -714,20 +723,20 @@ const routes = [
"path": "/ops/thirdLogs", "path": "/ops/thirdLogs",
"meta": { "meta": {
"title": "第三方日志", "title": "第三方日志",
"icon": "el-icon-fold", "icon": "el-icon-document",
"perms": ["third_log"] "perms": ["third_log"]
}, },
"component": "ops/thirdLogs" "component": "ops/thirdLogs"
}, },
{ {
"name": "files", "name": "fileLogs",
"path": "/ops/files", "path": "/ops/fileLogs",
"meta": { "meta": {
"title": "文件日志", "title": "文件日志",
"icon": "el-icon-fold", "icon": "el-icon-document",
"perms": ["file_log"] "perms": ["file_log"]
}, },
"component": "ops/files" "component": "ops/fileLogs"
}, },
] ]
}, },

View File

@ -1,13 +1,12 @@
<template> <template>
<div style="display:flex;row nowrap"> <div style="display:flex;row nowrap">
<!-- <el-tag
<!-- <el-tag
v-for="user in userData" v-for="user in userData"
:key="user.id" :key="user.id"
> >
{{ user.name }} {{ user.name }}
</el-tag>--> </el-tag>-->
<el-button <el-button
v-if="selectable" v-if="selectable"
type="primary" type="primary"
circle circle
@ -19,146 +18,120 @@
<el-dialog <el-dialog
title="选择人员" title="选择人员"
width="90%" width="80%"
height="100px"
v-model="dialoguser" v-model="dialoguser"
:before-close="handleClose" :before-close="handleClose"
:append-to-body="true" :append-to-body="true"
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-card> <el-row>
<el-row> <el-col :md="8" :sm="24">
<el-col :md="8" :sm="24"> <el-main class="nopadding">
<el-main class="nopadding"> <el-tabs type="border-card" stretch="true">
<el-tabs type="border-card" stretch="true"> <el-tab-pane label="按部门分类">
<el-tab-pane label="按部门分类"> <el-input placeholder="输入关键字进行过滤" v-model="filterText">
<el-input placeholder="输入关键字进行过滤" v-model="filterText"> </el-input>
</el-input>
<el-tree <el-tree
class="filter-tree" class="filter-tree"
style="padding-top: 15px" style="padding-top: 15px"
:data="deptdata" :data="deptdata"
default-expand-all default-expand-all
:filter-node-method="filterNode" :filter-node-method="filterNode"
ref="tree" ref="tree"
@node-click="handleNodeClick" @node-click="handleNodeClick"
>
</el-tree>
</el-tab-pane>
<el-tab-pane label="按岗位分类">
<el-input
placeholder="输入关键字进行过滤"
v-model="filterTexts"
>
</el-input>
<el-tree
class="filter-tree"
style="padding-top: 15px"
:data="postdata"
default-expand-all
:filter-node-method="filterNodes"
ref="tree"
@node-click="handleNodeClicks"
>
</el-tree>
</el-tab-pane>
</el-tabs>
</el-main>
</el-col>
<el-col :md="16" :sm="24">
<el-header style="border-bottom: none">
<div class="left-panel">
<el-input
v-model="search.keyword"
placeholder="姓名"
clearable
@click="upsearch"
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="upsearch"
></el-button>
</div>
<div class="right-panel">
<el-button type="primary" icon="el-icon-plus" @click="addUser"
>添加选择</el-button
> >
</div> </el-tree>
</el-header> </el-tab-pane>
<el-main class="nopadding"> <el-tab-pane label="按岗位分类">
<scTable <el-input placeholder="输入关键字进行过滤" v-model="filterTexts">
ref="table" </el-input>
:data="apiObj"
row-key="id"
@selection-change="selectionChange"
stripe
:hidePagination="true"
hideDo
@resetQuery="resetQuery"
>
<el-table-column type="selection" width="50"></el-table-column>
<el-table-column
label="#"
type="index"
width="50"
></el-table-column>
<el-table-column label="姓名" prop="name"></el-table-column>
<el-table-column label="手机号" prop="phone"></el-table-column> <el-tree
<el-table-column label="部门" prop="belong_dept"> class="filter-tree"
<template #default="scope"> style="padding-top: 15px"
<span v-if="scope.row.belong_dept_">{{ :data="postdata"
scope.row.belong_dept_.name default-expand-all
}}</span> :filter-node-method="filterNodes"
</template> ref="tree"
</el-table-column> @node-click="handleNodeClicks"
<el-table-column >
label="创建时间" </el-tree>
prop="create_time" </el-tab-pane>
></el-table-column> </el-tabs>
<!-- </el-main>
<el-table-column </el-col>
label="操作" <el-col :md="16" :sm="24">
fixed="right" <el-header style="border-bottom: none">
align="left" <div class="left-panel">
width="100"
>
<template #default="scope">
<el-button-group>
<el-button
type="primary"
icon="el-icon-plus"
@click="handleForm('add', scope.row)"
></el-button>
</el-button-group>
</template>
</el-table-column>-->
</scTable>
</el-main>
<div style="padding-top: 15px">
<el-input <el-input
style="width: 80%" v-model="search.keyword"
v-model="username" placeholder="姓名"
placeholder="选择人员的姓名"
clearable clearable
@click="upsearch"
></el-input> ></el-input>
<el-button @click="visible = false" style="float: right"
> </el-button
>
<el-button <el-button
v-if="mode != 'show'"
style="float: right"
type="primary" type="primary"
:loading="isSaveing" icon="el-icon-search"
@click="submitfrom()" @click="upsearch"
> </el-button ></el-button>
</div>
<div class="right-panel">
<el-button type="primary" icon="el-icon-plus" @click="addUser"
>添加选择</el-button
> >
</div> </div>
</el-col> </el-header>
</el-row> <el-main class="nopadding">
</el-card> <scTable
ref="table"
:data="apiObj"
row-key="id"
@selection-change="selectionChange"
stripe
hideDo
@resetQuery="resetQuery"
>
<el-table-column type="selection" width="50"></el-table-column>
<el-table-column
label="#"
type="index"
width="50"
></el-table-column>
<el-table-column label="姓名" prop="name"></el-table-column>
<el-table-column label="手机号" prop="phone"></el-table-column>
<el-table-column label="部门" prop="belong_dept">
<template #default="scope">
<span v-if="scope.row.belong_dept_">{{
scope.row.belong_dept_.name
}}</span>
</template>
</el-table-column>
<el-table-column
label="创建时间"
prop="create_time"
></el-table-column>
</scTable>
</el-main>
<el-row style="padding-top: 8px">
<el-col :md="16" :sm="24">
<span style="font-weight:bold">已选人员:</span>{{username}}
</el-col>
<el-col :md="8" :sm="24" style="text-align:right">
<el-button @click="visible = false"
> </el-button>
<el-button
v-if="mode != 'show'"
type="primary"
:loading="isSaveing"
@click="submitfrom()"
> </el-button >
</el-col>
</el-row>
</el-col>
</el-row>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
@ -219,8 +192,6 @@ export default {
this.getUser(); this.getUser();
this.getDept(); this.getDept();
this.getPost(); this.getPost();
}, },
watch: { watch: {
filterText(val) { filterText(val) {
@ -229,28 +200,26 @@ export default {
filterTexts(val) { filterTexts(val) {
this.$refs.tree.filter(val); this.$refs.tree.filter(val);
}, },
dataValue(val) { dataValue(val) {
this.$emit("input", val); this.$emit("input", val);
console.log(val) console.log(val);
}, },
userData(val) { userData(val) {
if (val) { if (val) {
this.change(); this.change();
} }
}, },
}, },
methods: { methods: {
showDialog() { showDialog() {
this.dialoguser = true; this.dialoguser = true;
this.$nextTick(function () { this.$nextTick(function () {
this.apiObj.map(item => { this.apiObj.map((item) => {
if (item.id === this.user) { if (item.id === this.user) {
this.$refs.table.toggleRowSelection(item, true) this.$refs.table.toggleRowSelection(item, true);
} }
}) });
}) });
}, },
// //
getUser() { getUser() {
@ -310,7 +279,7 @@ export default {
addUser() { addUser() {
this.username = []; this.username = [];
this.userData = []; this.userData = [];
if (!this.multiple && this.selection.length > 1) { if (!this.multiple && this.selection.length > 1) {
this.$message.error("对应的人员只允许选择一人!"); this.$message.error("对应的人员只允许选择一人!");

View File

@ -22,60 +22,338 @@
--el-color-primary-dark-9: #060f19; --el-color-primary-dark-9: #060f19;
} }
.el-menu {border: none!important;} .el-menu {
.el-menu .el-menu-item a {color: inherit;text-decoration: none;display: block;width:100%;height:100%;position: absolute;top:0px;left:0px;} border: none !important;
.el-form-item-msg {font-size: 12px;color: #999;clear: both;width: 100%;} }
.el-container {height: 100%;}
.el-aside {border-right: 1px solid var(--el-border-color-light);}
.el-container + .el-aside {border-right: 0;border-left: 1px solid var(--el-border-color-light);}
.el-header {background: #fff;border-bottom: 1px solid var(--el-border-color-light);padding:13px 15px;display: flex;justify-content: space-between;align-items: center;}
.el-header .left-panel {display: flex;align-items: center;}
.el-header .right-panel {display: flex;align-items: center;}
.el-header .right-panel > * + * {margin-left:10px;}
.el-footer {background: #fff;border-top: 1px solid var(--el-border-color-light);padding:13px 15px;height: 51px;}
.el-main {padding:15px;}
.el-main.nopadding {padding:0;background: #fff;}
.el-drawer__body {overflow: auto;padding:0;}
.el-popconfirm__main {margin: 14px 0;}
.el-card__header {border-bottom: 0;font-size: 17px;font-weight: bold;padding:15px 20px 0px 20px;}
.el-dialog__title {font-size: 17px;font-weight: bold;}
.el-drawer__header>:first-child {font-size: 17px;font-weight: bold;}
.el-tree.menu .el-tree-node__content {height:36px;}
.el-tree.menu .el-tree-node__content .el-tree-node__label .icon {margin-right: 5px;}
.el-progress__text {font-size: 12px!important;}
.el-progress__text i {font-size: 14.4px!important;}
.el-step.is-horizontal .el-step__line {height:1px;}
.el-step__title {font-size: 14px;}
.drawerBG {background: #f6f8f9;}
.el-button+.el-dropdown {margin-left: 10px;}
.el-button-group+.el-dropdown {margin-left: 10px;}
.el-tag+.el-tag {margin-left: 10px;}
.el-button-group+.el-button-group {margin-left: 10px;}
.el-tabs__nav-wrap::after {height: 1px;}
.el-table th.is-sortable {transition: .1s;}
.el-table th.is-sortable:hover {background: #eee;}
.el-table .el-table__body-wrapper {background: #f6f8f9;}
.el-col .el-card {margin-bottom: 15px;}
.el-main {flex-basis: 100%;}
.el-main > .scTable .el-table--border::before {display: none;}
.el-main > .scTable .el-table--border::after {display: none;}
.el-main > .scTable .el-table--border .el-table__inner-wrapper::after {display: none;}
.el-main > .scTable .el-table__border-left-patch {display: none;}
.el-main > .scTable .el-table--border .el-table__inner-wrapper tr:first-child td:first-child {border-left: 0;}
.el-main > .scTable .el-table--border .el-table__inner-wrapper tr:first-child th:first-child {border-left: 0;}
.el-table.el-table--large {font-size: 14px;}
.el-table.el-table--small {font-size: 12px;}
.el-table {font-size: 12px;}
.el-radio-button__inner {font-size: 12px;}
.el-checkbox-button__inner {font-size: 12px;}
.aminui-side-split li.active {background-color: var(--el-color-primary);} .el-menu .el-menu-item a {
.adminui-tags li:hover {background-color: var(--el-color-primary-light-9);} color: inherit;
.adminui-tags li.active {background-color: var(--el-color-primary)!important;} text-decoration: none;
.contextmenu li:hover {background-color: var(--el-color-primary-light-9)!important;color: var(--el-color-primary-light-2)!important;} display: block;
.data-box .item-background {background-color: var(--el-color-primary)!important;} width: 100%;
.layout-setting,.diy-grid-setting {background-color: var(--el-color-primary)!important;} height: 100%;
position: absolute;
top: 0px;
left: 0px;
}
.el-form-item-msg {
font-size: 12px;
color: #999;
clear: both;
width: 100%;
}
.el-container {
height: 100%;
}
.el-aside {
border-right: 1px solid var(--el-border-color-light);
}
.el-container+.el-aside {
border-right: 0;
border-left: 1px solid var(--el-border-color-light);
}
.el-header {
background: #fff;
border-bottom: 1px solid var(--el-border-color-light);
padding: 13px 15px;
display: flex;
justify-content: space-between;
align-items: center;
}
.el-header .left-panel {
display: flex;
align-items: center;
}
.el-header .right-panel {
display: flex;
align-items: center;
}
.el-header .right-panel>*+* {
margin-left: 10px;
}
.el-footer {
background: #fff;
border-top: 1px solid var(--el-border-color-light);
padding: 13px 15px;
height: 51px;
}
.el-main {
padding: 15px;
}
.el-main.nopadding {
padding: 0;
background: #fff;
}
.el-drawer__body {
overflow: auto;
padding: 0;
}
.el-popconfirm__main {
margin: 14px 0;
}
.el-card__header {
border-bottom: 0;
font-size: 17px;
font-weight: bold;
padding: 15px 20px 0px 20px;
}
.el-dialog__title {
font-size: 17px;
font-weight: bold;
}
.el-drawer__header>:first-child {
font-size: 17px;
font-weight: bold;
}
.el-tree.menu .el-tree-node__content {
height: 36px;
}
.el-tree.menu .el-tree-node__content .el-tree-node__label .icon {
margin-right: 5px;
}
.el-progress__text {
font-size: 12px !important;
}
.el-progress__text i {
font-size: 14.4px !important;
}
.el-step.is-horizontal .el-step__line {
height: 1px;
}
.el-step__title {
font-size: 14px;
}
.drawerBG {
background: #f6f8f9;
}
.el-button+.el-dropdown {
margin-left: 10px;
}
.el-button-group+.el-dropdown {
margin-left: 10px;
}
.el-tag+.el-tag {
margin-left: 10px;
}
.el-button-group+.el-button-group {
margin-left: 10px;
}
.el-tabs__nav-wrap::after {
height: 1px;
}
.el-table th.is-sortable {
transition: .1s;
}
.el-table th.is-sortable:hover {
background: #eee;
}
.el-table .el-table__body-wrapper {
background: #f6f8f9;
}
.el-col .el-card {
margin-bottom: 15px;
}
.el-main {
flex-basis: 100%;
}
.el-main>.scTable .el-table--border::before {
display: none;
}
.el-main>.scTable .el-table--border::after {
display: none;
}
.el-main>.scTable .el-table--border .el-table__inner-wrapper::after {
display: none;
}
.el-main>.scTable .el-table__border-left-patch {
display: none;
}
.el-main>.scTable .el-table--border .el-table__inner-wrapper tr:first-child td:first-child {
border-left: 0;
}
.el-main>.scTable .el-table--border .el-table__inner-wrapper tr:first-child th:first-child {
border-left: 0;
}
.el-table.el-table--large {
font-size: 14px;
}
.el-table.el-table--small {
font-size: 12px;
}
.el-table {
font-size: 12px;
}
.el-radio-button__inner {
font-size: 12px;
}
.el-checkbox-button__inner {
font-size: 12px;
}
.aminui-side-split li.active {
background-color: var(--el-color-primary);
}
.adminui-tags li:hover {
background-color: var(--el-color-primary-light-9);
}
.adminui-tags li.active {
background-color: var(--el-color-primary) !important;
}
.contextmenu li:hover {
background-color: var(--el-color-primary-light-9) !important;
color: var(--el-color-primary-light-2) !important;
}
.data-box .item-background {
background-color: var(--el-color-primary) !important;
}
.layout-setting,
.diy-grid-setting {
background-color: var(--el-color-primary) !important;
}
/* 覆盖tinymce样式 */ /* 覆盖tinymce样式 */
.sceditor .tox-tinymce {border: 1px solid #DCDFE6;border-radius: 0;} .sceditor .tox-tinymce {
body .tox-tinymce-aux {z-index: 5700;} border: 1px solid #DCDFE6;
border-radius: 0;
}
body .tox-tinymce-aux {
z-index: 5700;
}
.el-table--medium td,   .el-table--medium th {
padding: 2px 0;
}
.el-form-item {
margin-bottom: 16px;
}
.el-card,
.el-message {
border-radius: 0px;
overflow: hidden;
}
.el-card__body {
padding: 6px;
}
.el-card__header {
padding: 6px;
}
.el-tabs--border-card>.el-tabs__content {
padding: 6px;
}
.el-dialog__header {
padding: 10px 10px 6px;
}
.el-dialog {
display: flex;
flex-direction: column;
margin: 0 !important;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
/*height:600px;*/
max-height: calc(100% - 30px);
max-width: calc(100% - 30px);
}
.el-dialog__headerbtn {
top: 8px;
}
.el-dialog .el-dialog__body {
flex: 1;
overflow: auto;
padding: 8px 12px;
}
.el-drawer__header {
margin-bottom: 16px;
}
.el-drawer .el-drawer__body {
flex: 1;
overflow: auto;
padding: 8px 12px;
}
.el-form--label-top .el-form-item__label {
line-height: 16px;
}
.el-button+.el-button {
margin-left: 4px;
}
.el-tabs__header {
margin: 0 0 6px;
}
.pagination-container {
padding: 0px 0px;
}
body .el-table th.gutter {
display: table-cell !important;
}
.el-dialog__footer {
padding: 6px 6px 6px;
}

View File

@ -1,88 +1,143 @@
<template> <template>
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<div class="right-panel-search"> <el-button type="primary" icon="el-icon-refresh" @click="syncData"
<el-input v-model="search.keyword" placeholder="编号" clearable @click="upsearch"></el-input> >同步</el-button
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button> >
</div> </div>
</div> <div class="right-panel">
</el-header> <el-input
<el-main class="nopadding"> v-model="search.keyword"
<scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" stripe @resetQuery="resetQuery" > placeholder="编号"
<el-table-column type="selection" width="50"></el-table-column> clearable
<el-table-column label="序号" type="index" width="50"></el-table-column> @click="upsearch"
<el-table-column label="喇叭名称" prop="name" min-width="150"></el-table-column> ></el-input>
<el-table-column label="音量" prop="extra" min-width="100"> <el-button
<template #default="scope"> type="primary"
<span v-if="scope.row.extra&&scope.row.extra.player">{{scope.row.extra.player.EnvVolume}}</span> icon="el-icon-search"
</template> @click="upsearch"
</el-table-column> ></el-button>
<el-table-column label="设备sn" prop="sn" min-width="90"></el-table-column> </div>
<el-table-column label="ip" prop="extra" min-width="90"> </el-header>
<template #default="scope"> <el-main class="nopadding">
<span v-if="scope.row.extra">{{scope.row.extra.ip}}</span> <scTable
</template> ref="table"
</el-table-column> :apiObj="apiObj"
<el-table-column label="状态" prop="extra" min-width="90"> row-key="id"
<template #default="scope"> @selection-change="selectionChange"
<span v-if="scope.row.extra">{{scope.row.extra.online}}</span> stripe
</template> @resetQuery="resetQuery"
</el-table-column> >
<!--<el-table-column label="位置" prop="count_people" min-width="90"></el-table-column>--> <el-table-column type="selection" width="50"></el-table-column>
<el-table-column label="所在区域" prop="create_time" min-width="180"></el-table-column> <el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="覆盖区域" prop="create_time" width="160"></el-table-column> <el-table-column
<el-table-column label="操作" fixed="right" align="center" width="160"> label="喇叭名称"
<template #default="scope"> prop="name"
<el-button-group> min-width="150"
<el-button text type="primary" size="small" @click="handlePosition(scope.row)">标记位置</el-button> ></el-table-column>
</el-button-group> <el-table-column label="音量" prop="extra" min-width="100">
</template> <template #default="scope">
</el-table-column> <span v-if="scope.row.extra && scope.row.extra.player">{{
</scTable> scope.row.extra.player.EnvVolume
</el-main> }}</span>
</el-container> </template>
<channel-view v-if="dialogSave" ref="saveDialog" :channelType="50" :channelCode="channelCode" :channelName="channelName" @closed="dialogSave=false"></channel-view> </el-table-column>
<el-table-column
label="设备sn"
prop="sn"
min-width="90"
></el-table-column>
<el-table-column label="ip" prop="extra" min-width="90">
<template #default="scope">
<span v-if="scope.row.extra">{{ scope.row.extra.ip }}</span>
</template>
</el-table-column>
<el-table-column label="状态" prop="extra" min-width="90">
<template #default="scope">
<span v-if="scope.row.extra">{{ scope.row.extra.online }}</span>
</template>
</el-table-column>
<!--<el-table-column label="位置" prop="count_people" min-width="90"></el-table-column>-->
<el-table-column
label="所在区域"
prop="create_time"
min-width="180"
></el-table-column>
<el-table-column
label="覆盖区域"
prop="create_time"
width="160"
></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="160">
<template #default="scope">
<el-button-group>
<el-button
text
type="primary"
size="small"
@click="handlePosition(scope.row)"
>标记位置</el-button
>
</el-button-group>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
<channel-view
v-if="dialogSave"
ref="saveDialog"
:channelType="50"
:channelCode="channelCode"
:channelName="channelName"
@closed="dialogSave = false"
></channel-view>
</template> </template>
<script> <script>
import channelView from './vchannel_view' import channelView from "./vchannel_view";
export default { export default {
name: 'audioVue', name: "audioVue",
components: { components: {
channelView channelView,
}, },
data() { data() {
return { return {
apiObj: this.$API.am.tdevice.speaker, syncLoading: false,
dialogSave: false, apiObj: this.$API.am.tdevice.speaker,
limitedVisible: false, dialogSave: false,
query: {}, limitedVisible: false,
selection: [], query: {},
search: { selection: [],
keyword: null search: {
}, keyword: null,
channelCode:'', },
channelName:'', channelCode: "",
} channelName: "",
}, };
methods: { },
handlePosition(row){ methods: {
this.channelCode = row.sn; handlePosition(row) {
this.channelName = row.name; this.channelCode = row.sn;
this.dialogSave = true; this.channelName = row.name;
}, this.dialogSave = true;
// },
selectionChange(selection){ //
this.selection = selection; selectionChange(selection) {
}, this.selection = selection;
},
// //
upsearch(){ upsearch() {},
},
resetQuery(){ resetQuery() {
this.query = {} this.query = {};
} },
} async syncData() {
} this.syncLoading = true;
var res = await this.$API.third.tdevice.vchannelSync.req({});
this.syncLoading = false;
},
},
};
</script> </script>

View File

@ -1,148 +1,202 @@
<template> <template>
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-button type="primary" icon="el-icon-refresh" @click="updateData">同步</el-button> <el-button
</div> type="primary"
</div> icon="el-icon-refresh"
</el-header> @click="syncData"
<el-main class="nopadding"> :loading="syncLoading"
<scTable ref="table" :apiObj="apiObj" :params="query" row-key="id" @selection-change="selectionChange" stripe> >同步</el-button
<el-table-column type="selection" width="50"></el-table-column> >
<el-table-column label="序号" type="index" width="50"></el-table-column> </div>
<el-table-column label="id" prop="id" min-width="90"></el-table-column> </div>
<el-table-column label="mac" prop="code" min-width="90"></el-table-column> </el-header>
<el-table-column label="id" prop="id" min-width="90"></el-table-column> <el-main class="nopadding">
<el-table-column label="电量" prop="third_info" min-width="90"> <scTable
<template #default="scope"> ref="table"
<span v-if="scope.row.third_info">{{scope.row.third_info.battery}}%</span> :apiObj="apiObj"
</template> :params="apiParams"
</el-table-column> row-key="id"
<el-table-column label="状态" prop="third_info" min-width="90"> @selection-change="selectionChange"
<template #default="scope"> stripe
<span v-if="scope.row.third_info&&scope.row.third_info.workStatus===0">运动</span> >
<span v-else-if="scope.row.third_info&&scope.row.third_info.workStatus===2">静止</span> <el-table-column label="序号" type="index" width="50"></el-table-column>
<span v-else>静止</span> <el-table-column label="id" prop="id" min-width="90"></el-table-column>
</template> <el-table-column
</el-table-column> label="mac"
<el-table-column label="在线" prop="third_info" min-width="90"> prop="code"
<template #default="scope"> min-width="90"
<span v-if="scope.row.third_info.online">在线</span> ></el-table-column>
<span v-else>离线</span> <el-table-column label="电量" prop="third_info" min-width="90">
</template> <template #default="scope">
</el-table-column> <span v-if="scope.row.third_info"
<el-table-column label="操作" fixed="right" align="center" width="160"> >{{ scope.row.third_info.battery }}%</span
<template #default="scope"> >
<el-button-group> </template>
<el-button v-if="scope.row.employee!==null" text type="warning" size="small" @click="handleBindBlt(20, scope.row)">解绑</el-button> </el-table-column>
<el-button v-else text type="primary" size="small" @click="handleBindBlt(10, scope.row)">绑定</el-button> <el-table-column label="状态" prop="third_info" min-width="90">
</el-button-group> <template #default="scope">
</template> <span
</el-table-column> v-if="
</scTable> scope.row.third_info && scope.row.third_info.workStatus === 0
</el-main> "
</el-container> ><el-tag>运动</el-tag></span
<el-Dialog >
title="绑定定位卡" <span
v-model="showBindBlt" v-else-if="
destroy-on-close scope.row.third_info && scope.row.third_info.workStatus === 2
@closed="closeDrawer" "
> ><el-tag type="warning">静止</el-tag></span
<el-form >
ref="dialogForm" <span v-else><el-tag type="warning">静止</el-tag></span>
:model="form" </template>
label-width="120px" </el-table-column>
> <el-table-column label="在线" prop="third_info" min-width="90">
<el-form-item label="卡号"> <template #default="scope">
{{form.blt}} <span v-if="scope.row.third_info.online"><el-tag type="success">在线</el-tag></span>
</el-form-item> <span v-else><el-tag type="warning">离线</el-tag></span>
<el-form-item label="绑定员工"> </template>
<el-select v-model="form.employee" style="width: 100%" :disabled="dis"> </el-table-column>
<el-option <el-table-column label="绑定对象" prop="employee" min-width="90">
v-for="item in employeeList" <template #default="scope">
:key="item.id" <span v-if="scope.row.employee">{{scope.row.employee_.name}}</span>
:label="item.name" </template>
:value="item.id" </el-table-column>
/> <el-table-column label="操作" fixed="right" align="center" width="160">
</el-select> <template #default="scope">
</el-form-item> <el-button-group>
<el-button
</el-form> v-if="scope.row.employee !== null"
<template #footer> text
<el-button v-if="form.type===10" type="primary" @click="submitBindBlt">绑定</el-button> type="warning"
<el-button v-if="form.type===20" type="primary" @click="submitBindBlt">解绑</el-button> size="small"
<el-button @click="showBindBlt = false">取消</el-button> @click="handleBindBlt(20, scope.row)"
</template> >解绑</el-button
</el-Dialog> >
<el-button
v-else
text
type="primary"
size="small"
@click="handleBindBlt(10, scope.row)"
>绑定</el-button
>
</el-button-group>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
<el-Dialog
title="绑定定位卡"
v-model="showBindBlt"
destroy-on-close
@closed="closeDrawer"
>
<el-form ref="dialogForm" :model="form" label-width="120px">
<el-form-item label="卡号">
{{ form.blt }}
</el-form-item>
<el-form-item label="mac">
{{ bindBltMac }}
</el-form-item>
<el-form-item label="绑定员工">
<el-select v-model="form.employee" style="width: 100%" :disabled="dis">
<el-option
v-for="item in employeeList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-form>
<template #footer>
<el-button v-if="form.type === 10" type="primary" @click="submitBindBlt"
>绑定</el-button
>
<el-button v-if="form.type === 20" type="primary" @click="submitBindBlt"
>解绑</el-button
>
<el-button @click="showBindBlt = false">取消</el-button>
</template>
</el-Dialog>
</template> </template>
<script> <script>
import channelView from './vchannel_view' import channelView from "./vchannel_view";
export default { export default {
name: 'blt', name: "blt",
components: { components: {
channelView channelView,
}, },
data() { data() {
return { return {
apiObj: this.$API.third.tdevice.list, syncLoading: false,
query: { apiObj: this.$API.third.tdevice.list,
type:30, apiParams: {
}, type: 30,
selection: [], },
search: { selection: [],
keyword: null search: {
}, keyword: null,
dis: false, },
showBindBlt: false, dis: false,
employeeList: [], showBindBlt: false,
bindBltMac: '', employeeList: [],
form: { bindBltMac: "",
type: 10, form: {
blt: '', type: 10,
employee: '', blt: "",
}, employee: "",
} },
}, };
mounted(){ },
this.getEmployeeList(); mounted() {
}, this.getEmployeeList();
methods: { },
// methods: {
selectionChange(selection){ //
this.selection = selection; selectionChange(selection) {
}, this.selection = selection;
// },
updateData(){ //
this.$API.third.tdevice.list.req({}); async syncData() {
}, this.syncLoading = true;
getEmployeeList() { var res = await this.$API.third.tdevice.vchannelSync.req({});
let that = this; this.syncLoading = false;
that.$API.hrm.employee.list.req({job_state:10,page: 0}).then(res => { },
that.tdevice = res; getEmployeeList() {
that.employeeList = res; let that = this;
}) that.$API.hrm.employee.list
}, .req({ job_state: 10, page: 0 })
handleBindBlt(type, row) { .then((res) => {
this.dis = false; that.tdevice = res;
this.form.blt = row.id; that.employeeList = res;
this.bindBltMac = row.mac; });
this.form.type = type; },
if(type===20){ handleBindBlt(type, row) {
this.dis = true; this.dis = false;
this.form.employee = row.employee; this.form.blt = row.id;
} this.bindBltMac = row.code;
this.showBindBlt = true; this.form.type = type;
}, if (type === 20) {
submitBindBlt() { this.dis = true;
let that = this; this.form.employee = row.employee;
that.$API.third.tdevice.bltBind.req(this.form).then(res => { }
if(res.err_msg){}else{ this.showBindBlt = true;
that.showBindBlt = false; },
that.$refs.table.refresh(); submitBindBlt() {
} let that = this;
}) that.$API.third.tdevice.bltBind.req(this.form).then((res) => {
}, if (res.err_msg) {
} } else {
} that.showBindBlt = false;
that.$refs.table.refresh();
}
});
},
},
};
</script> </script>

View File

@ -1,104 +1,172 @@
<template> <template>
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<div class="right-panel-search"> <el-button
<el-input v-model="search.keyword" placeholder="编号" clearable @click="upsearch"></el-input> type="primary"
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button> icon="el-icon-refresh"
</div> @click="syncData"
</div> :loading="syncLoading"
</el-header> >同步</el-button
<el-main class="nopadding"> >
<scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" stripe @resetQuery="resetQuery" > </div>
<el-table-column type="selection" width="50"></el-table-column> <div class="right-panel">
<el-table-column label="序号" type="index" width="50"></el-table-column> <el-input
<el-table-column label="设备编号" prop="deviceCode" min-width="100"></el-table-column> v-model="search.keyword"
<el-table-column label="通道编号" prop="channelCode" min-width="100"></el-table-column> placeholder="编号"
<el-table-column label="通道名称" prop="channelName" min-width="150"></el-table-column> clearable
<el-table-column label="通道状态" prop="stat" min-width="150"></el-table-column> @click="upsearch"
<el-table-column label="通道类型" min-width="100"> ></el-input>
<template #default="scope">{{scope.row.channelType}}</template> <el-button
</el-table-column> type="primary"
<el-table-column label="设备类型" min-width="100"> icon="el-icon-search"
<template #default="scope">{{scope.row.cameraType}}</template> @click="upsearch"
</el-table-column> ></el-button>
<el-table-column label="是否在线" prop="isOnline" min-width="180"></el-table-column> </div>
<el-table-column label="创建时间" prop="createTime" width="160"></el-table-column> </el-header>
</scTable> <el-main class="nopadding">
</el-main> <scTable
</el-container> ref="table"
:apiObj="apiObj"
row-key="id"
:pageStr="pageStr"
:pageSizeStr="pageSizeStr"
:orderStr="orderStr"
:parseData="parseData"
@selection-change="selectionChange"
stripe
@resetQuery="resetQuery"
>
<el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column
label="设备编号"
prop="deviceCode"
min-width="100"
></el-table-column>
<el-table-column
label="通道编号"
prop="channelCode"
min-width="150"
></el-table-column>
<el-table-column
label="通道名称"
prop="channelName"
min-width="150"
></el-table-column>
<el-table-column
label="通道状态"
prop="stat"
min-width="150"
></el-table-column>
<el-table-column label="通道类型" min-width="100">
<template #default="scope">{{ scope.row.channelType }}</template>
</el-table-column>
<el-table-column label="设备类型" min-width="100">
<template #default="scope">{{ scope.row.cameraType }}</template>
</el-table-column>
<el-table-column
label="是否在线"
prop="isOnline"
min-width="180"
></el-table-column>
<el-table-column
label="创建时间"
prop="createTime"
width="160"
></el-table-column>
</scTable>
</el-main>
</el-container>
</template> </template>
<script> <script>
import videoChannelView from './vchannel_view' import videoChannelView from "./vchannel_view";
export default { export default {
name: 'monitor', name: "monitor",
components: { components: {
videoChannelView videoChannelView,
}, },
data() { data() {
return { return {
apiObj: this.$API.am.tdevice.dchannel, syncLoading: false,
dialogSave: false, apiObj: this.$API.am.tdevice.dchannel,
limitedVisible: false, pageStr: "pageNum",
query: {}, pageSizeStr: "pageSize",
selection: [], orderStr: "sort",
search: { parseData: (res)=>{
keyword: null return {
}, data: res, //
channelId:'', rows: res.pageData, //
} total: res.totalRows, //
},
methods: {
handlePosition(row){
this.channelCode = row.channelCode;
this.channelName = row.channelName;
this.dialogSave = true;
},
//
async handleDel(row){
await this.$API.am.area.delete.req(row.id).then(res=>{
if(res.err_msg){
this.$message.error(res.err_msg);
}else{
this.$refs.table.refresh();
this.$message.success("删除成功")
}
});
},
//
async batch_del(){
this.$confirm(`确定删除选中的 ${this.selection.length} 项吗?如果删除项中含有子集将会被一并删除`, '提示', {
type: 'warning'
}).then(() => {
const loading = this.$loading();
let params = {pk:{pks:this.selection}};
this.$API.am.area.deletes.req(params).then(res=>{
loading.close();
if(res.err_msg){
this.$message.error(res.err_msg);
}else{
this.$refs.table.refresh();
this.$message.success("删除成功")
}
});
}).catch(() => {
})
},
//
selectionChange(selection){
this.selection = selection;
},
//
upsearch(){
},
resetQuery(){
this.query = {}
}
} }
} },
dialogSave: false,
limitedVisible: false,
query: {},
selection: [],
search: {
keyword: null,
},
channelId: "",
};
},
methods: {
handlePosition(row) {
this.channelCode = row.channelCode;
this.channelName = row.channelName;
this.dialogSave = true;
},
//
async handleDel(row) {
await this.$API.am.area.delete.req(row.id).then((res) => {
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
this.$refs.table.refresh();
this.$message.success("删除成功");
}
});
},
//
async batch_del() {
this.$confirm(
`确定删除选中的 ${this.selection.length} 项吗?如果删除项中含有子集将会被一并删除`,
"提示",
{
type: "warning",
}
)
.then(() => {
const loading = this.$loading();
let params = { pk: { pks: this.selection } };
this.$API.am.area.deletes.req(params).then((res) => {
loading.close();
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
this.$refs.table.refresh();
this.$message.success("删除成功");
}
});
})
.catch(() => {});
},
//
selectionChange(selection) {
this.selection = selection;
},
//
upsearch() {},
resetQuery() {
this.query = {};
},
async syncData() {
this.syncLoading = true;
var res = await this.$API.third.tdevice.vchannelSync.req({});
this.syncLoading = false;
},
},
};
</script> </script>

View File

@ -1,183 +1,261 @@
<template> <template>
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<div class="right-panel-search"> <el-button
<el-input v-model="search.keyword" placeholder="编号" clearable @click="upsearch"></el-input> type="primary"
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button> icon="el-icon-refresh"
</div> @click="syncData"
</div> :loading="syncLoading"
</el-header> >同步</el-button
<el-main class="nopadding"> >
<scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" stripe </div>
@resetQuery="resetQuery"> <div class="right-panel">
<el-table-column type="selection" width="50"></el-table-column> <el-input
<el-table-column label="序号" type="index" width="50"></el-table-column> v-model="search.keyword"
<el-table-column label="设备编号" prop="deviceCode" min-width="100"></el-table-column> placeholder="编号"
<el-table-column label="通道编号" prop="channelCode" min-width="100"></el-table-column> clearable
<el-table-column label="通道名称" prop="channelName" min-width="150"></el-table-column> @click="upsearch"
<el-table-column label="通道状态" prop="stat" min-width="150"> ></el-input>
<template #default="scope"> <el-button
<span v-if="scope.row.stat===0">不启用</span> type="primary"
<span v-else>启用</span> icon="el-icon-search"
</template> @click="upsearch"
</el-table-column> ></el-button>
<el-table-column label="摄像头类型" min-width="100"> </div>
<template #default="scope">{{deviceTypes[scope.row.cameraType]}}</template> </el-header>
</el-table-column> <el-main class="nopadding">
<el-table-column label="是否在线" prop="isOnline" min-width="180"> <scTable
<template #default="scope"> ref="table"
<span v-if="scope.row.isOnline===0">离线</span> :apiObj="apiObj"
<span v-else>在线</span> row-key="id"
</template> :params="apiParams"
</el-table-column> :pageStr="pageStr"
<el-table-column label="创建时间" prop="createTime" min-width="160"></el-table-column> :pageSizeStr="pageSizeStr"
<el-table-column label="操作" fixed="right" align="center" width="260"> :orderStr="orderStr"
<template #default="scope"> :parseData="parseData"
<el-button-group> @selection-change="selectionChange"
<el-button text type="primary" size="small" @click="handlePosition(scope.row)">标记位置 stripe
</el-button> @resetQuery="resetQuery"
<el-button text type="primary" size="small" @click="handleView(scope.row)">实时监控</el-button> >
<el-popconfirm title="确定删除吗?" @confirm="handleDel(scope.row, scope.$index)"> <el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column
label="设备编号"
prop="deviceCode"
min-width="100"
></el-table-column>
<el-table-column
label="通道编号"
prop="channelCode"
min-width="150"
></el-table-column>
<el-table-column
label="通道名称"
prop="channelName"
min-width="150"
></el-table-column>
<el-table-column label="通道状态" prop="stat" min-width="150">
<template #default="scope">
<span v-if="scope.row.stat === 0">不启用</span>
<span v-else>启用</span>
</template>
</el-table-column>
<el-table-column label="摄像头类型" min-width="100">
<template #default="scope">{{
deviceTypes[scope.row.cameraType]
}}</template>
</el-table-column>
<el-table-column label="是否在线" prop="isOnline" min-width="180">
<template #default="scope">
<span v-if="scope.row.isOnline === 0"><el-tag type="warning">离线</el-tag></span>
<span v-else><el-tag type="success">在线</el-tag></span>
</template>
</el-table-column>
<el-table-column
label="创建时间"
prop="createTime"
min-width="160"
></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="260">
<template #default="scope">
<el-button-group>
<el-button
text
type="primary"
size="small"
@click="handlePosition(scope.row)"
>标记位置
</el-button>
<el-button
text
type="primary"
size="small"
@click="handleView(scope.row)"
>实时监控</el-button
>
<!-- <el-popconfirm title="确定删除吗?" @confirm="handleDel(scope.row, scope.$index)">
<template #reference> <template #reference>
<el-button text type="danger" size="small">删除</el-button> <el-button text type="danger" size="small">删除</el-button>
</template> </template>
</el-popconfirm> </el-popconfirm> -->
</el-button-group> </el-button-group>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
</el-main> </el-main>
</el-container> </el-container>
<el-dialog <el-dialog :title="channelName" v-model="limitedVisible" :width="745">
:title="channelName" <div style="height: 560px">
v-model="limitedVisible" <video id="videoElement" muted="muted"></video>
:width="745" </div>
>
<div style="height: 560px;">
<video id="videoElement" muted="muted"></video>
</div>
<template #footer> <template #footer>
<el-button @click="limitedVisible = false">关闭</el-button> <el-button @click="limitedVisible = false">关闭</el-button>
</template> </template>
</el-dialog> </el-dialog>
<channel-view v-if="dialogSave" ref="saveDialog" :channelType="60" :channelCode="channelCode" <channel-view
:channelName="channelName" @closed="dialogSave=false"></channel-view> v-if="dialogSave"
ref="saveDialog"
:channelType="60"
:channelCode="channelCode"
:channelName="channelName"
@closed="dialogSave = false"
></channel-view>
</template> </template>
<script> <script>
import channelView from './vchannel_view' import channelView from "./vchannel_view";
export default { export default {
name: 'monitor', name: "monitor",
components: { components: {
channelView channelView,
}, },
data() { data() {
return { return {
apiObj: this.$API.am.video.list, apiObj: this.$API.am.video.list,
dialogSave: false, apiParams: {
limitedVisible: false, "channelTypeList": ["1"]
query: {}, },
selection: [], pageStr: "pageNum",
search: { pageSizeStr: "pageSize",
keyword: null orderStr: "sort",
}, parseData: (res)=>{
channelId: '', return {
params: { data: res, //
json: { rows: res.pageData, //
data: { total: res.totalRows, //
channelId: "",
streamType: "2",
type: "flv"
}
},
code: 'video_realtime'
},
deviceTypes: {
'1': '枪机',
'2': '球机',
'3': '半球'
}
}
},
created() {
const scriptInfo = document.createElement("script");
scriptInfo.setAttribute("data-callType", "callScript");
scriptInfo.src = "https://cdn.bootcdn.net/ajax/libs/flv.js/1.6.2/flv.js";
document.head.appendChild(scriptInfo)
},
methods: {
handleView(row) {
this.params.json.data.channelId = row.channelCode;
this.channelName = row.channelName;
this.limitedVisible = true;
this.$API.am.video.item.req(this.params).then(res => {
debugger;
console.log(res);
this.url = res.url;
if (flvjs.isSupported()) {
let videoElement = document.getElementById('videoElement');
let flvPlayer = flvjs.createPlayer({
type: 'flv',
url: res.url
});
flvPlayer.attachMediaElement(videoElement);
flvPlayer.load();
flvPlayer.play();
}
})
},
handlePosition(row) {
this.channelCode = row.channelCode;
this.channelName = row.channelName;
this.dialogSave = true;
},
//
async handleDel(row) {
await this.$API.am.area.delete.req(row.id).then(res => {
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
this.$refs.table.refresh();
this.$message.success("删除成功")
}
});
},
//
async batch_del() {
this.$confirm(`确定删除选中的 ${this.selection.length} 项吗?如果删除项中含有子集将会被一并删除`, '提示', {
type: 'warning'
}).then(() => {
const loading = this.$loading();
let params = {pk: {pks: this.selection}};
this.$API.am.area.deletes.req(params).then(res => {
loading.close();
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
this.$refs.table.refresh();
this.$message.success("删除成功")
}
});
}).catch(() => {
})
},
//
selectionChange(selection) {
this.selection = selection;
},
//
upsearch() {
},
resetQuery() {
this.query = {}
}
} }
} },
dialogSave: false,
limitedVisible: false,
syncLoading: false,
query: {},
selection: [],
search: {
keyword: null,
},
channelId: "",
params: {
json: {
data: {
channelId: "",
streamType: "2",
type: "flv",
},
},
code: "video_realtime",
},
deviceTypes: {
1: "枪机",
2: "球机",
3: "半球",
},
};
},
created() {
const scriptInfo = document.createElement("script");
scriptInfo.setAttribute("data-callType", "callScript");
scriptInfo.src = "https://cdn.bootcdn.net/ajax/libs/flv.js/1.6.2/flv.js";
document.head.appendChild(scriptInfo);
},
methods: {
handleView(row) {
this.params.json.data.channelId = row.channelCode;
this.channelName = row.channelName;
this.limitedVisible = true;
this.$API.am.video.item.req(this.params).then((res) => {
debugger;
console.log(res);
this.url = res.url;
if (flvjs.isSupported()) {
let videoElement = document.getElementById("videoElement");
let flvPlayer = flvjs.createPlayer({
type: "flv",
url: res.url,
});
flvPlayer.attachMediaElement(videoElement);
flvPlayer.load();
flvPlayer.play();
}
});
},
handlePosition(row) {
this.channelCode = row.channelCode;
this.channelName = row.channelName;
this.dialogSave = true;
},
//
async handleDel(row) {
await this.$API.am.area.delete.req(row.id).then((res) => {
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
this.$refs.table.refresh();
this.$message.success("删除成功");
}
});
},
//
async batch_del() {
this.$confirm(
`确定删除选中的 ${this.selection.length} 项吗?如果删除项中含有子集将会被一并删除`,
"提示",
{
type: "warning",
}
)
.then(() => {
const loading = this.$loading();
let params = { pk: { pks: this.selection } };
this.$API.am.area.deletes.req(params).then((res) => {
loading.close();
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
this.$refs.table.refresh();
this.$message.success("删除成功");
}
});
})
.catch(() => {});
},
//
selectionChange(selection) {
this.selection = selection;
},
//
upsearch() {},
resetQuery() {
this.query = {};
},
async syncData() {
this.syncLoading = true;
var res = await this.$API.third.tdevice.vchannelSync.req({});
this.syncLoading = false;
},
},
};
</script> </script>

View File

@ -25,7 +25,7 @@
<el-col :md="10" :sm="24" style="padding-left: 7.5px;padding-right: 7.5px; <el-col :md="10" :sm="24" style="padding-left: 7.5px;padding-right: 7.5px;
"> ">
<el-card shadow="hover" header="今日事件"> <el-card shadow="hover" header="今日事件">
<el-button style="float: right; padding: 3px;margin-top: -44px;" type="text" @click="moreEvent">更多</el-button> <el-button style="float: right; padding: 3px;margin-top: -44px;" link @click="moreEvent">更多</el-button>
<div class="welcome"> <div class="welcome">
<scTable <scTable
ref="table" ref="table"

View File

@ -0,0 +1,94 @@
<template>
<el-container>
<el-header>
<div class="left-panel"></div>
<div class="right-panel">
<div class="right-panel-search">
<el-input
v-model="query.name"
placeholder="日志名称"
clearable
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:apiObj="apiObj"
row-key="id"
stripe
highlightCurrentRow
hidePagination
@row-click="rowClick"
@resetQuery="resetQuery"
>
<el-table-column label="#" type="index" width="50"></el-table-column>
<el-table-column
label="名称"
prop="name"
min-width="80"
></el-table-column>
<el-table-column
label="大小(KB)"
prop="size"
min-width="150"
></el-table-column>
</scTable>
</el-main>
<el-drawer
v-model="infoDrawer"
title="日志详情"
:size="'50%'"
destroy-on-close
>
<div v-html="logText" style="white-space: pre-wrap; font-size: 14px"></div>
</el-drawer>
</el-container>
</template>
<script>
export default {
name: "file_logs",
data() {
return {
apiObj: this.$API.ops.file_logs.list,
query: {},
logLists: [],
infoDrawer: false,
logDetailVisible: false,
logText:null
};
},
mounted() {},
methods: {
handleQuery() {
this.$refs.table.queryData(this.query);
},
resetQuery() {
this.query = {};
},
rowClick(row) {
this.$API.ops.file_logs.detail.req(row.name).then((res) => {
this.logText = res
});
this.infoDrawer = true;
// this.$nextTick(() => {
// this.$refs.logInfo.setData(row);
// });
},
},
};
</script>
<style scoped>
.treeMain {
height: 280px;
overflow: auto;
border: 1px solid #dcdfe6;
margin-bottom: 10px;
}
</style>

View File

@ -1,71 +0,0 @@
<template>
<el-container>
<el-header>
<div class="left-panel">
<div class="right-panel-search">
<el-input v-model="search.id" placeholder="logId" clearable></el-input>
<el-button type="primary" icon="el-icon-search" @click="getSearch"></el-button>
</div>
</div>
</el-header>
<el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe highlightCurrentRow @row-click="rowClick">
<el-table-column label="#" type="index" width="50"></el-table-column>
<el-table-column label="名称" prop="name" min-width="80"></el-table-column>
<el-table-column label="id" prop="id" min-width="200"></el-table-column>
<el-table-column label="路径" prop="path" min-width="150"></el-table-column>
<el-table-column label="类型" prop="type" min-width="80">
<template #default="scope">
<el-tag class="ml-2" type="success" v-if="scope.row.type===1">成功</el-tag>
<el-tag class="ml-2" type="warning" v-if="scope.row.type===2">报错</el-tag>
<el-tag class="ml-2" type="danger" v-if="scope.row.type===40">图片</el-tag>
</template>
</el-table-column>
<el-table-column label="操作时间" prop="requested_at" min-width="150"></el-table-column>
<el-table-column label="操作" align="center" width="100">
<el-button type="text" size="small">查看详情</el-button>
</el-table-column>
</scTable>
</el-main>
<el-drawer v-model="infoDrawer" title="日志详情" :size="'50%'" destroy-on-close>
<logInfo ref="logInfo"></logInfo>
</el-drawer>
</el-container>
</template>
<script>
import logInfo from './logInfo'
export default {
name: 'files',
components: {
logInfo
},
data() {
return {
apiObj: this.$API.common.file.list,
search:{
id:null,
},
logLists:[],
infoDrawer:false,
logDetailVisible:false,
}
},
mounted() {
},
methods: {
getSearch(){
this.$refs.table.reload(this.search);
},
rowClick(row){
this.infoDrawer = true;
this.$nextTick(() => {
this.$refs.logInfo.setData(row)
})
}
}
}
</script>
<style scoped>
.treeMain {height:280px;overflow: auto;border: 1px solid #dcdfe6;margin-bottom: 10px;}
</style>

View File

@ -1,74 +1,130 @@
<template> <template>
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel"></div>
<div class="right-panel-search"> <div class="right-panel">
<el-input v-model="search.id" placeholder="logId" clearable></el-input> <div class="right-panel-search">
<el-button type="primary" icon="el-icon-search" @click="getSearch"></el-button> <el-input
</div> v-model="query.id"
</div> placeholder="logId"
</el-header> clearable
<el-main class="nopadding"> ></el-input>
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe highlightCurrentRow @row-click="rowClick"> <el-button
<el-table-column label="#" type="index" width="50"></el-table-column> type="primary"
<el-table-column label="日志id" prop="id" min-width="200"></el-table-column> icon="el-icon-search"
<el-table-column label="路径" prop="path" min-width="150"></el-table-column> @click="handleQuery"
<el-table-column label="method" prop="method" min-width="80"> ></el-button>
</div>
</el-table-column> </div>
<el-table-column label="view" prop="view" min-width="150"></el-table-column> </el-header>
<el-table-column label="状态码" prop="status_code" min-width="80"> <el-main class="nopadding">
<template #default="scope"> <scTable
<el-tag class="ml-2" type="success" v-if="scope.row.status_code>=200&&scope.row.status_code<300">{{scope.row.status_code}}</el-tag> ref="table"
<el-tag class="ml-2" type="warning" v-if="scope.row.status_code>=400&&scope.row.status_code<500">{{scope.row.status_code}}</el-tag> :apiObj="apiObj"
<el-tag class="ml-2" type="danger" v-if="scope.row.status_code>=500">{{scope.row.status_code}}</el-tag> row-key="id"
</template> stripe
</el-table-column> highlightCurrentRow
<el-table-column label="操作时间" prop="requested_at" min-width="150"></el-table-column> @row-click="rowClick"
<el-table-column label="操作" align="center" width="100"> @resetQuery="resetQuery"
<el-button type="text" size="small">查看详情</el-button> >
</el-table-column> <el-table-column label="#" type="index" width="50"></el-table-column>
</scTable> <el-table-column
</el-main> label="日志id"
<el-drawer v-model="infoDrawer" title="日志详情" :size="'50%'" destroy-on-close> prop="id"
<logInfo ref="logInfo"></logInfo> min-width="200"
</el-drawer> ></el-table-column>
<el-table-column
</el-container> label="地址"
prop="path"
min-width="220"
></el-table-column>
<el-table-column label="method" prop="method" min-width="80">
</el-table-column>
<el-table-column
label="view"
prop="view"
min-width="150"
></el-table-column>
<el-table-column label="状态码" prop="status_code" min-width="50">
<template #default="scope">
<el-tag
class="ml-2"
type="success"
v-if="scope.row.status_code >= 200 && scope.row.status_code < 300"
>{{ scope.row.status_code }}</el-tag
>
<el-tag
class="ml-2"
type="warning"
v-if="scope.row.status_code >= 400 && scope.row.status_code < 500"
>{{ scope.row.status_code }}</el-tag
>
<el-tag
class="ml-2"
type="danger"
v-if="scope.row.status_code >= 500"
>{{ scope.row.status_code }}</el-tag
>
</template>
</el-table-column>
<el-table-column
label="操作时间"
prop="requested_at"
min-width="100"
></el-table-column>
<el-table-column label="操作" align="center" width="80">
<el-button type="text" size="small">查看</el-button>
</el-table-column>
</scTable>
</el-main>
<el-drawer
v-model="infoDrawer"
title="日志详情"
:size="'50%'"
destroy-on-close
>
<logInfo ref="logInfo"></logInfo>
</el-drawer>
</el-container>
</template> </template>
<script> <script>
import logInfo from './logInfo' import logInfo from "./logInfo";
export default { export default {
name: 'logs', name: "logs",
components: { components: {
logInfo logInfo,
}, },
data() { data() {
return { return {
apiObj: this.$API.ops.logs.list, apiObj: this.$API.ops.logs.list,
search:{ query: {},
id:null, logLists: [],
}, infoDrawer: false,
logLists:[], logDetailVisible: false,
infoDrawer:false, };
logDetailVisible:false, },
} mounted() {},
}, methods: {
mounted() { handleQuery() {
}, this.$refs.table.queryData(this.query);
methods: { },
getSearch(){ resetQuery() {
this.$refs.table.reload(this.search); this.query = {};
}, },
rowClick(row){ rowClick(row) {
this.infoDrawer = true; this.infoDrawer = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.logInfo.setData(row) this.$refs.logInfo.setData(row);
}) });
} },
} },
} };
</script> </script>
<style scoped> <style scoped>
.treeMain {height:280px;overflow: auto;border: 1px solid #dcdfe6;margin-bottom: 10px;} .treeMain {
height: 280px;
overflow: auto;
border: 1px solid #dcdfe6;
margin-bottom: 10px;
}
</style> </style>

View File

@ -1,285 +1,328 @@
<template> <template>
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<el-button type="primary" icon="el-icon-plus" @click="addDept"></el-button> <el-button
<el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button> type="primary"
</div> icon="el-icon-plus"
<div class="right-panel"> @click="addMenu"
<div class="right-panel-search"> ></el-button>
<el-input v-model="search.keyword" placeholder="部门名称" clearable></el-input> </div>
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button> </el-header>
</div> <el-main class="nopadding">
</div> <scTable
</el-header> ref="table"
<el-main class="nopadding"> :isTree="true"
<scTable ref="table" :apiObj="apiObj" :params="params" row-key="id" @selection-change="selectionChange" :apiObj="apiObj"
hidePagination> :params="params"
<el-table-column type="selection" width="50"></el-table-column> row-key="id"
<el-table-column label="#" type="index" width="50"></el-table-column> @selection-change="selectionChange"
<el-table-column label="菜单名称" prop="name" min-width="200"></el-table-column> hidePagination
<el-table-column label="类型" prop="type" min-width="200"> >
<template #default="scope"> <!-- <el-table-column type="selection" width="50"></el-table-column> -->
<span>{{types[scope.row.type]}}</span> <el-table-column label="#" type="index" width="50"></el-table-column>
</template> <el-table-column
</el-table-column> label="菜单名称"
<el-table-column label="代号" prop="codes" min-width="200"></el-table-column> prop="name"
<el-table-column label="排序" prop="sort" min-width="200"></el-table-column> min-width="200"
<el-table-column label="操作" fixed="right" align="center" width="200"> ></el-table-column>
<template #default="scope"> <el-table-column label="类型" prop="type" min-width="200">
<el-button text type="primary" size="small" @click="editMenu(scope.row, scope.$index)">编辑</el-button> <template #default="scope">
<el-divider direction="vertical"></el-divider> <span>{{ types[scope.row.type] }}</span>
<el-button text type="danger" size="small" @click="delMenu(scope.row.id)">删除</el-button> </template>
<!--<el-popconfirm title="确定删除吗?" @confirm="delMenu(scope.row, scope.$index)"> </el-table-column>
<el-table-column label="标识" prop="codes" min-width="200">
<template #default="scope">
<el-tag v-for="i in scope.row.codes" v-bind:key="i">{{ i }}</el-tag>
</template>
</el-table-column>
<el-table-column
label="排序"
prop="sort"
min-width="200"
></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="200">
<template #default="scope">
<el-button
text
type="primary"
size="small"
@click="editMenu(scope.row, scope.$index)"
>编辑</el-button
>
<el-divider direction="vertical"></el-divider>
<el-button
text
type="danger"
size="small"
@click="delMenu(scope.row.id)"
>删除</el-button
>
<!--<el-popconfirm title="确定删除吗?" @confirm="delMenu(scope.row, scope.$index)">
<template #reference> <template #reference>
<el-button type="text" size="small">删除</el-button> <el-button link size="small">删除</el-button>
</template> </template>
</el-popconfirm>--> </el-popconfirm>-->
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
</el-main> </el-main>
</el-container> </el-container>
<el-dialog :title="titleMap[type]" v-model="limitedVisible" :width="600"> <el-dialog :title="titleMap[type]" v-model="limitedVisible" :width="600">
<el-form :model="addForm" :rules="rules" ref="addForm" label-width="100px" label-position="right"> <el-form
<el-form-item label="类型" prop="type"> :model="addForm"
<el-radio-group v-model="addForm.type"> :rules="rules"
<el-radio :label="10">目录</el-radio> ref="addForm"
<el-radio :label="20">菜单</el-radio> label-width="100px"
<el-radio :label="30">按钮</el-radio> label-position="right"
</el-radio-group> >
</el-form-item> <el-form-item label="类型" prop="type">
<el-form-item label="名称" prop="name"> <el-radio-group v-model="addForm.type">
<el-input v-model="addForm.name" clearable></el-input> <el-radio :label="10">目录</el-radio>
</el-form-item> <el-radio :label="20">菜单</el-radio>
<el-form-item label="标识"> <el-radio :label="30">按钮</el-radio>
<el-input v-model="codes" clearable style="width: 90%;"></el-input> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="父级"> <el-form-item label="名称" prop="name">
<el-cascader <el-input v-model="addForm.name" clearable></el-input>
v-model="addForm.parent" </el-form-item>
:options="group" <el-form-item label="标识">
:props="groupsProps" <!-- <el-input v-model="codes" clearable style="width: 90%;"></el-input> -->
:show-all-levels="false" <el-select
clearable v-model="addForm.codes"
style="width: 100%" multiple
@change="handleChange" filterable
></el-cascader> allow-create
</el-form-item> default-first-option
<el-form-item label="排序"> :reserve-keyword="false"
<el-input-number v-model="addForm.sort" controls-position="right" :min="1" style="width: 100%;"></el-input-number> placeholder="权限标识(回车添加多个)"
</el-form-item> style="width: 100%"
</el-form> >
<template #footer> <el-option
<el-button @click="limitedVisible=false"> </el-button> v-for="item in permCodes"
<el-button type="primary" :loading="isSaving" @click="submitHandle()"> </el-button> :key="item"
</template> :label="item"
</el-dialog> :value="item"
/>
</el-select>
</el-form-item>
<el-form-item label="父级">
<el-cascader
v-model="addForm.parent"
:options="group"
:props="groupsProps"
:show-all-levels="false"
clearable
style="width: 100%"
@change="handleChange"
></el-cascader>
</el-form-item>
<el-form-item label="排序">
<el-input-number
v-model="addForm.sort"
controls-position="right"
:min="1"
style="width: 100%"
></el-input-number>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="limitedVisible = false"> </el-button>
<el-button type="primary" :loading="isSaving" @click="submitHandle()"
> </el-button
>
</template>
</el-dialog>
</template> </template>
<script> <script>
import {genTree} from "@/utils/verificate"; import { genTree } from "@/utils/verificate";
export default { export default {
name: 'dept', name: "dept",
data() { data() {
return { return {
dialog: { dialog: {
save: false, save: false,
permission: false permission: false,
}, },
apiObj: this.$API.system.permission.list, apiObj: this.$API.system.permission.list,
selection: [], selection: [],
search: { search: {
keyword: null keyword: null,
}, },
params: { params: {
page: 0 page: 0,
}, },
isSaving: false, isSaving: false,
codesLimited: false, limitedVisible: false,
limitedVisible: false, type: "add",
type: "add", titleMap: {
codes:'', add: "新增",
titleMap: { edit: "编辑",
add: '新增', },
edit: '编辑',
},
// //
addForm: { addForm: {
id: "", id: "",
name: "", name: "",
codes:[], codes: [],
type: 10, type: 10,
sort: 1, sort: 1,
parent: null, parent: null,
}, },
// //
rules: { rules: {
name: [ name: [{ required: true, message: "请输入名称" }],
{required: true, message: '请输入名称'} type: [{ required: true, message: "请选择类型" }],
], },
type: [ types: {
{required: true, message: '请选择类型'} 10: "目录",
], 20: "菜单",
}, 30: "按钮",
types:{ },
10:'目录', groupsProps: {
20:'菜单', // value: "id",
30:'按钮', multiple: false,
}, emitPath: false,
groupsProps: { checkStrictly: true,
// value: "id", },
multiple: false, group: [],
emitPath: false, permList: [],
checkStrictly: true, permCodes: [],
}, };
group: [], },
permList: [],
permCodes: [],
}
},
mounted() { mounted() {
this.getGroup(); this.getGroup();
this.getPermCodes(); this.getPermCodes();
}, },
methods: { methods: {
getPermCodes(){ getPermCodes() {
this.permCodes = this.$API.system.permission.codes.req(); this.permCodes = this.$API.system.permission.codes.req();
}, },
handleChange(value) { handleChange(value) {
// this.menu.checked = check.checkedKeys; // this.menu.checked = check.checkedKeys;
// debugger; // debugger;
console.log(value); console.log(value);
console.log(this.addForm.parent); console.log(this.addForm.parent);
}, },
// //
async getGroup() { async getGroup() {
var res = await this.$API.system.permission.list.req({page: 0}); var res = await this.$API.system.permission.list.req({ page: 0 });
this.group =genTree(res); this.group = genTree(res);
}, },
// //
addDept() { addMenu() {
this.type = 'add'; this.type = "add";
this.limitedVisible = true; this.limitedVisible = true;
}, this.$nextTick(() => {
addCodes(){ this.$refs.addForm.resetFields();
this.codesLimited = true; });
}, },
saveCodes(){ //
// debugger;console.log(this.addForm.codes); editMenu(row) {
this.addForm.codes.push(this.codes); this.type = "edit";
this.codes = '' this.addForm = row;
}, this.limitedVisible = true;
delCodes(){ },
this.codesLimited = false;
this.codes = ''
},
//
editMenu(row) {
this.type = 'edit';
this.addForm.id = row.id;
this.addForm.name = row.name;
this.codes = row.codes.join(',');
this.addForm.parent = row.parent;
this.addForm.type = row.type ;
this.addForm.sort = row.sort;
this.limitedVisible = true;
},
// //
delMenu(id) { delMenu(id) {
this.$confirm(`确定删除吗?`, '提示', { this.$confirm(`确定删除吗?`, "提示", {
type: 'warning', type: "warning",
confirmButtonText: '删除', confirmButtonText: "删除",
confirmButtonClass: 'el-button--danger' confirmButtonClass: "el-button--danger",
}).then(() => { }).then(() => {
this.$API.system.permission.delete.req(id).then(res=>{ this.$API.system.permission.delete.req(id).then((res) => {
if(res.err_msg){ if (res.err_msg) {
this.$message.error(res.err_msg); this.$message.error(res.err_msg);
this.$refs.table.refresh() this.$refs.table.refresh();
}else{ } else {
this.$message.success("操作成功"); this.$message.success("操作成功");
} }
}); });
}) });
}, },
submitHandle() { submitHandle() {
let that = this; let that = this;
if(this.codes.indexOf(','>-1)){ this.$refs.addForm.validate((valid) => {
this.addForm.codes = this.codes.split(','); // debugger;
}else{ if (valid) {
this.addForm.codes.push(this.codes) this.isSaveing = true;
} var res;
this.$refs.addForm.validate((valid) => { if (this.type === "add") {
// debugger; this.$API.system.permission.create
if (valid) { .req(that.addForm)
this.isSaveing = true; .then((res) => {
var res; this.isSaveing = false;
if (this.type === 'add') { this.limitedVisible = false;
res = this.$API.system.permission.create.req(that.addForm); this.$refs.table.refresh();
} else { })
res = this.$API.system.permission.update.req(that.addForm.id, that.addForm); .catch((e) => {
} this.isSaveing = false;
console.log(res); });
debugger; } else {
if(res.err_msg){ this.$API.system.permission.update
this.$message.error(res.err_msg) .req(that.addForm.id, that.addForm)
}else{ .then((res) => {
this.isSaveing = false; this.isSaveing = false;
this.limitedVisible = false; this.limitedVisible = false;
this.$refs.table.refresh(); this.$refs.table.refresh();
} })
} .catch((e) => {
}) this.isSaveing = false;
}, });
// }
selectionChange(selection) { }
this.selection = selection; });
}, },
// //
upsearch() { selectionChange(selection) {
let params = {search:this.search.keyword}; this.selection = selection;
this.$refs.table.queryData(params); },
}, //
// upsearch() {
handleSaveSuccess(data, mode) { let params = { search: this.search.keyword };
if (mode == 'add') { this.$refs.table.queryData(params);
this.$refs.table.refresh() },
} else if (mode == 'edit') { //
this.$refs.table.refresh() handleSaveSuccess(data, mode) {
} if (mode == "add") {
} this.$refs.table.refresh();
} } else if (mode == "edit") {
} this.$refs.table.refresh();
}
},
},
};
</script> </script>
<style> <style>
.formAddButton{ .formAddButton {
width: 32px; width: 32px;
height: 32px; height: 32px;
padding: 0; padding: 0;
text-align: center; text-align: center;
line-height: 32px; line-height: 32px;
border-radius: 16px; border-radius: 16px;
position: absolute; position: absolute;
right: 0; right: 0;
top : 0 top: 0;
} }
.formSaveButton,.formDelButton{ .formSaveButton,
padding: 0; .formDelButton {
width: 30px; padding: 0;
height: 30px; width: 30px;
text-align: center; height: 30px;
line-height: 30px; text-align: center;
border-radius: 15px; line-height: 30px;
position: absolute; border-radius: 15px;
left: 20px; position: absolute;
top : 0 left: 20px;
} top: 0;
.formDelButton{ }
left: 60px; .formDelButton {
} left: 60px;
}
</style> </style>

View File

@ -1,72 +1,148 @@
<template> <template>
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<div class="right-panel-search"> <el-select v-model="query.result" clearable placeholder="请求结果" @change="handleQuery">
<el-input v-model="search.id" placeholder="logId" clearable></el-input> <el-option
<el-button type="primary" icon="el-icon-search" @click="getSearch"></el-button> v-for="item in resultOptions"
</div> :key="item.value"
</div> :label="item.label"
</el-header> :value="item.value"
<el-main class="nopadding"> />
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe highlightCurrentRow @row-click="rowClick"> </el-select>
<el-table-column label="#" type="index" width="50"></el-table-column> </div>
<el-table-column label="method" prop="method" min-width="80"></el-table-column> <div class="left-panel">
<el-table-column label="id" prop="id" min-width="200"></el-table-column> <div class="right-panel-search">
<el-table-column label="路径" prop="path" min-width="150"></el-table-column> <el-input v-model="query.id" placeholder="logId" clearable></el-input>
<el-table-column label="target" prop="target" min-width="80"></el-table-column> <el-button
<el-table-column label="状态" prop="status_code" min-width="80"> type="primary"
<template #default="scope"> icon="el-icon-search"
<el-tag class="ml-2" type="success" v-if="scope.row.result==='success'">成功</el-tag> @click="handleQuery"
<el-tag class="ml-2" type="warning" v-if="scope.row.result==='fail'">报错</el-tag> ></el-button>
<el-tag class="ml-2" type="danger" v-if="scope.row.result==='error'">失败</el-tag> </div>
</template> </div>
</el-table-column> </el-header>
<el-table-column label="操作时间" prop="requested_at" min-width="150"></el-table-column> <el-main class="nopadding">
<el-table-column label="操作" align="center" width="100"> <scTable
<el-button type="text" size="small">查看详情</el-button> ref="table"
</el-table-column> :apiObj="apiObj"
</scTable> row-key="id"
</el-main> stripe
<el-drawer v-model="infoDrawer" title="日志详情" :size="'50%'" destroy-on-close> highlightCurrentRow
<logInfo ref="logInfo"></logInfo> @row-click="rowClick"
</el-drawer> @resetQuery="resetQuery"
>
</el-container> <el-table-column label="#" type="index" width="50"></el-table-column>
<el-table-column label="id" prop="id" min-width="150"></el-table-column>
<el-table-column
label="target"
prop="target"
min-width="50"
></el-table-column>
<el-table-column
label="method"
prop="method"
min-width="50"
></el-table-column>
<el-table-column
label="地址"
prop="path"
min-width="220"
></el-table-column>
<el-table-column label="状态" prop="status_code" min-width="50">
<template #default="scope">
<el-tag
class="ml-2"
type="success"
v-if="scope.row.result === 'success'"
>成功</el-tag
>
<el-tag
class="ml-2"
type="warning"
v-if="scope.row.result === 'fail'"
>失败</el-tag
>
<el-tag
class="ml-2"
type="danger"
v-if="scope.row.result === 'error'"
>错误</el-tag
>
</template>
</el-table-column>
<el-table-column
label="操作时间"
prop="requested_at"
min-width="100"
></el-table-column>
<el-table-column label="操作" align="center" width="80">
<el-button link size="small">查看</el-button>
</el-table-column>
</scTable>
</el-main>
<el-drawer
v-model="infoDrawer"
title="日志详情"
:size="'50%'"
destroy-on-close
>
<logInfo ref="logInfo"></logInfo>
</el-drawer>
</el-container>
</template> </template>
<script> <script>
import logInfo from './logInfo' import logInfo from "./logInfo";
export default { export default {
name: 'thirdLogs', name: "thirdLogs",
components: { components: {
logInfo logInfo,
}, },
data() { data() {
return { return {
apiObj: this.$API.third.thirdLog, apiObj: this.$API.third.thirdLog,
search:{ query: {},
id:null, logLists: [],
}, infoDrawer: false,
logLists:[], logDetailVisible: false,
infoDrawer:false, resultOptions: [
logDetailVisible:false, {
} value: "success",
}, label: "成功",
mounted() { },
}, {
methods: { value: "fail",
getSearch(){ label: "失败",
this.$refs.table.reload(this.search); },
}, {
rowClick(row){ value: "error",
this.infoDrawer = true; label: "错误",
this.$nextTick(() => { },
this.$refs.logInfo.setData(row) ],
}) };
} },
} mounted() {},
} methods: {
handleQuery() {
this.$refs.table.queryData(this.query);
},
resetQuery() {
this.query = {}
},
rowClick(row) {
this.infoDrawer = true;
this.$nextTick(() => {
this.$refs.logInfo.setData(row);
});
},
},
};
</script> </script>
<style scoped> <style scoped>
.treeMain {height:280px;overflow: auto;border: 1px solid #dcdfe6;margin-bottom: 10px;} .treeMain {
height: 280px;
overflow: auto;
border: 1px solid #dcdfe6;
margin-bottom: 10px;
}
</style> </style>

View File

@ -20,7 +20,7 @@
</el-table-column> </el-table-column>
<el-table-column label="执行日志" prop="logs" width="100" fixed="right"> <el-table-column label="执行日志" prop="logs" width="100" fixed="right">
<template #default="scope"> <template #default="scope">
<el-button size="small" @click="show(scope.row)" type="text">日志</el-button> <el-button size="small" @click="show(scope.row)" link>日志</el-button>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>

View File

@ -13,19 +13,19 @@
</div> </div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" stripe @resetQuery="resetQuery" > <scTable ref="table" :isTree="true" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" stripe default-expand-all hidePagination>
<el-table-column type="selection" width="50"></el-table-column> <!-- <el-table-column type="selection" width="50"></el-table-column> -->
<el-table-column label="#" type="index" width="50"></el-table-column> <el-table-column label="#" type="index" width="50"></el-table-column>
<el-table-column label="部门名称" prop="name" min-width="200"></el-table-column> <el-table-column label="部门名称" prop="name" min-width="200"></el-table-column>
<el-table-column label="部门类型" prop="type" min-width="200"></el-table-column> <el-table-column label="部门类型" prop="type" min-width="200"></el-table-column>
<el-table-column label="创建日期" prop="create_time" min-width="200"></el-table-column> <el-table-column label="创建日期" prop="create_time" min-width="200"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="200"> <el-table-column label="操作" fixed="right" align="center" width="200">
<template #default="scope"> <template #default="scope">
<el-button type="text" size="small" @click="editDept(scope.row, scope.$index)">编辑</el-button> <el-button link type="primary" size="small" @click="editDept(scope.row, scope.$index)">编辑</el-button>
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<el-popconfirm title="确定删除吗?" @confirm="delDept(scope.row, scope.$index)"> <el-popconfirm title="确定删除吗?" @confirm="delDept(scope.row, scope.$index)">
<template #reference> <template #reference>
<el-button text type="danger" size="small">删除</el-button> <el-button link type="danger" size="small">删除</el-button>
</template> </template>
</el-popconfirm> </el-popconfirm>
</template> </template>
@ -82,9 +82,7 @@
search: { search: {
keyword: null keyword: null
}, },
params:{ params:{},
page:0
},
isSaving: false, isSaving: false,
limitedVisible : false, limitedVisible : false,
type: "add", type: "add",

View File

@ -49,11 +49,11 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="140"> <el-table-column label="操作" fixed="right" align="center" width="140">
<template #default="scope"> <template #default="scope">
<el-button type="text" size="small" @click="editDic(scope.row)">编辑</el-button> <el-button link size="small" @click="editDic(scope.row)">编辑</el-button>
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<el-popconfirm title="确定删除吗?" @confirm="delDic(scope.row,scope.$index)"> <el-popconfirm title="确定删除吗?" @confirm="delDic(scope.row,scope.$index)">
<template #reference> <template #reference>
<el-button type="text" size="small">删除</el-button> <el-button link size="small">删除</el-button>
</template> </template>
</el-popconfirm> </el-popconfirm>
</template> </template>

View File

@ -11,7 +11,7 @@
<el-main class="nopadding"> <el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe highlightCurrentRow @row-click="rowClick" <scTable ref="table" :apiObj="apiObj" row-key="id" stripe highlightCurrentRow @row-click="rowClick"
:hidePagination="true"> :hidePagination="true">
<el-table-column type="selection" width="50"></el-table-column> <!-- <el-table-column type="selection" width="50"></el-table-column> -->
<el-table-column label="" type="index"></el-table-column> <el-table-column label="" type="index"></el-table-column>
<el-table-column label="名称" prop="name" width="120"></el-table-column> <el-table-column label="名称" prop="name" width="120"></el-table-column>
<el-table-column label="标识" prop="code" width="60"></el-table-column> <el-table-column label="标识" prop="code" width="60"></el-table-column>
@ -30,26 +30,23 @@
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<div style="margin-right: 20px">岗位关系</div> <div style="margin-right: 20px">岗位权限</div>
<el-button type="primary" icon="el-icon-plus" @click="addPostRole"></el-button> <el-button type="primary" icon="el-icon-plus" @click="addPostRole"></el-button>
<el-button type="danger" plain icon="el-icon-delete" @click="delPostRole"></el-button> <el-button type="danger" plain icon="el-icon-delete" @click="delPostRole"></el-button>
</div> </div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<scTable ref="table2" :apiObj="apiObj2" row-key="id" stripe :hidePagination="true"> <scTable ref="table2" :apiObj="apiObj2" row-key="id" stripe :hidePagination="true">
<el-table-column type="selection" width="50"></el-table-column> <!-- <el-table-column type="selection" width="50"></el-table-column> -->
<el-table-column label="" type="index"></el-table-column> <el-table-column label="" type="index"></el-table-column>
<el-table-column label="权限范围" prop="data_range" min-width="80"> <el-table-column label="所属岗位" prop="post" min-width="80">
<template #default="scope">{{options[scope.row.data_range]}}</template>
</el-table-column>
<el-table-column label="关联岗位" prop="post" min-width="80">
<template #default="scope">{{scope.row.post_.name}}</template> <template #default="scope">{{scope.row.post_.name}}</template>
</el-table-column> </el-table-column>
<el-table-column label="关联角色" prop="role" min-width="80"> <el-table-column label="拥有角色" prop="role" min-width="80">
<template #default="scope">{{scope.row.role_.name}}</template> <template #default="scope">{{scope.row.role_.name}}</template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="create_time" min-width="80"> <el-table-column label="权限范围" prop="data_range" min-width="80">
<template #default="scope">{{scope.row.create_time}}</template> <template #default="scope">{{options[scope.row.data_range]}}</template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="right"> <el-table-column label="操作" fixed="right" align="right">
<template #default="scope"> <template #default="scope">

View File

@ -22,11 +22,11 @@
<el-table-column label="角色描述" prop="description" width="150"></el-table-column> <el-table-column label="角色描述" prop="description" width="150"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="140"> <el-table-column label="操作" fixed="right" align="center" width="140">
<template #default="scope"> <template #default="scope">
<el-button type="text" size="small" @click="roleEdit(scope.row, scope.$index)">编辑</el-button> <el-button link size="small" @click="roleEdit(scope.row, scope.$index)">编辑</el-button>
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<el-popconfirm title="确定删除吗?" @confirm="roleDel(scope.row, scope.$index)"> <el-popconfirm title="确定删除吗?" @confirm="roleDel(scope.row, scope.$index)">
<template #reference> <template #reference>
<el-button type="text" size="small">删除</el-button> <el-button link size="small">删除</el-button>
</template> </template>
</el-popconfirm> </el-popconfirm>
</template> </template>

View File

@ -3,21 +3,21 @@
<el-row :gutter="15"> <el-row :gutter="15">
<el-col :xl="6" :lg="6" :md="8" :sm="12" :xs="24" v-for="item in list" :key="item.id"> <el-col :xl="6" :lg="6" :md="8" :sm="12" :xs="24" v-for="item in list" :key="item.id">
<el-card class="task task-item" shadow="hover"> <el-card class="task task-item" shadow="hover">
<h2>{{item.title}}</h2> <h2>{{item.name}}</h2>
<ul> <ul>
<li> <li>
<h4>执行</h4> <h4>执行方法</h4>
<p>{{item.handler}}</p> <p>{{item.task}}</p>
</li> </li>
<li> <li>
<h4>定时规则</h4> <h4>时间策略</h4>
<p>{{item.cron}}</p> <p>{{item.timetype}}-{{item.schedule}}</p>
</li> </li>
</ul> </ul>
<div class="bottom"> <div class="bottom">
<div class="state"> <div class="state">
<el-tag v-if="item.state=='1'" size="mini">准备就绪</el-tag> <el-tag v-if="item.enabled" size="mini">启用</el-tag>
<el-tag v-if="item.state=='-1'" size="mini" type="info">停用</el-tag> <el-tag v-if="!item.enabled" size="mini" type="danger">停用</el-tag>
</div> </div>
<div class="handler"> <div class="handler">
<el-popconfirm title="确定立即执行吗?" @confirm="run(item)"> <el-popconfirm title="确定立即执行吗?" @confirm="run(item)">
@ -92,15 +92,7 @@
}, },
data() { data() {
return { return {
list: [ list: [],
{
id: "1",
title: "清理服务器缓存",
handler: "cleanUpCacheHandler",
cron: "59 59 23 * * ? *",
state: "1"
}
],
mode: "add", mode: "add",
editId:null, editId:null,
titleMap: { titleMap: {
@ -133,13 +125,8 @@
}, },
methods: { methods: {
getList(){ getList(){
this.$API.system.task.list.req().then(res=>{ this.$API.system.task.list.req({page:0}).then(res=>{
if(res.err_msg){ this.list = res
this.message.error(res.err_msg)
}else{
debugger;
this.list.concat(res.results)
}
}) })
}, },
addTask(){ addTask(){

View File

@ -11,7 +11,7 @@
</el-table-column> </el-table-column>
<el-table-column label="执行日志" prop="logs" width="100" fixed="right"> <el-table-column label="执行日志" prop="logs" width="100" fixed="right">
<template #default="scope"> <template #default="scope">
<el-button size="mini" @click="show(scope.row)" type="text">日志</el-button> <el-button size="mini" @click="show(scope.row)" link>日志</el-button>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>

View File

@ -1,6 +1,6 @@
<template> <template>
<el-container> <el-container>
<el-aside width="200px" v-loading="showGrouploading"> <el-aside width="300px" v-loading="showGrouploading">
<el-container> <el-container>
<el-header style="border-bottom: none"> <el-header style="border-bottom: none">
<el-input <el-input
@ -16,6 +16,7 @@
node-key="id" node-key="id"
:data="group" :data="group"
:current-node-key="''" :current-node-key="''"
default-expand-all
:highlight-current="true" :highlight-current="true"
:expand-on-click-node="false" :expand-on-click-node="false"
:filter-node-method="groupFilterNode" :filter-node-method="groupFilterNode"
@ -32,19 +33,19 @@
icon="el-icon-plus" icon="el-icon-plus"
@click="add" @click="add"
></el-button> ></el-button>
<el-button <!-- <el-button
type="danger" type="danger"
plain plain
icon="el-icon-delete" icon="el-icon-delete"
:disabled="selection.length == 0" :disabled="selection.length == 0"
@click="batch_del" @click="batch_del"
></el-button> ></el-button> -->
<el-button <!-- <el-button
type="primary" type="primary"
plain plain
:disabled="selection.length == 0" :disabled="selection.length == 0"
>密码重置 >密码重置
</el-button> </el-button> -->
</div> </div>
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
@ -90,18 +91,19 @@
<el-table-column <el-table-column
label="加入时间" label="加入时间"
prop="create_time" prop="create_time"
min-width="150" min-width="100"
sortable="custom" sortable="custom"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="操作" label="操作"
fixed="right" fixed="right"
align="center" align="center"
width="160" width="200"
> >
<template #default="scope"> <template #default="scope">
<el-button <el-button
type="text" type="success"
link
size="small" size="small"
@click="formSetting(scope.row)" @click="formSetting(scope.row)"
> >
@ -110,7 +112,7 @@
<el-button <el-button
type="text" link
size="small" size="small"
@click="formEdit(scope.row, '2')" @click="formEdit(scope.row, '2')"
> >
@ -122,7 +124,7 @@
@confirm="table_del(scope.row, scope.$index)" @confirm="table_del(scope.row, scope.$index)"
> >
<template #reference> <template #reference>
<el-button text type="danger" size="small"> <el-button link type="danger" size="small">
删除 删除
</el-button> </el-button>
</template> </template>

View File

@ -32,7 +32,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="是否在职"> <el-form-item label="是否启用">
<span>{{job_states[form.is_active]}}</span> <span>{{job_states[form.is_active]}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -40,11 +40,17 @@
</el-form> </el-form>
<!--drag-sort --> <!--drag-sort -->
<sc-form-table v-model="userPostForm.list" :addTemplate="addTemplate" placeholder="暂无数据"> <sc-form-table v-model="userPostForm.list" :addTemplate="addTemplate" placeholder="暂无数据">
<el-table-column prop="val" label="名称" min-width="150"> <!-- <el-table-column prop="val" label="名称" min-width="150">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.id">{{scope.row.name}}</span> <span v-if="scope.row.id">{{scope.row.name}}</span>
<el-input v-else v-model="scope.row.name" placeholder="名称"></el-input> <el-input v-else v-model="scope.row.name" placeholder="名称"></el-input>
</template> </template>
</el-table-column> -->
<el-table-column prop="val" label="排序" min-width="80">
<template #default="scope">
<span v-if="scope.row.id">{{scope.row.sort}}</span>
<el-input v-else v-model="scope.row.sort" placeholder="请输入内容"></el-input>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="time" label="部门" min-width="150"> <el-table-column prop="time" label="部门" min-width="150">
<template #default="scope"> <template #default="scope">
@ -69,12 +75,6 @@
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="val" label="排序" min-width="80">
<template #default="scope">
<span v-if="scope.row.id">{{scope.row.sort}}</span>
<el-input v-else v-model="scope.row.sort" placeholder="请输入内容"></el-input>
</template>
</el-table-column>
<el-table-column prop="open" label="操作" width="80" align="center"> <el-table-column prop="open" label="操作" width="80" align="center">
<template #default="scope"> <template #default="scope">
<el-button v-if="scope.row.id" text type="danger" size="small" @click="userPostDel(scope.row.id)">删除</el-button> <el-button v-if="scope.row.id" text type="danger" size="small" @click="userPostDel(scope.row.id)">删除</el-button>
@ -105,7 +105,7 @@
list: [] list: []
}, },
loading: false, loading: false,
job_states: { true: "在职",false: "离职"}, job_states: { true: "启用",false: "禁用"},
visible: false, visible: false,
isSaveing: false, isSaveing: false,
form: {}, form: {},

View File

@ -112,7 +112,6 @@
:value="item.id" :value="item.id"
/> />
</el-select> </el-select>
<select-user <select-user
ref="form.receptionist" ref="form.receptionist"
:user="form.receptionist" :user="form.receptionist"

View File

@ -35,7 +35,7 @@
<el-table-column label="创建时间" prop="create_time"></el-table-column> <el-table-column label="创建时间" prop="create_time"></el-table-column>
<el-table-column label="操作" fixed="right" align="right" width="120"> <el-table-column label="操作" fixed="right" align="right" width="120">
<template #default="scope"> <template #default="scope">
<el-button type="text" size="small" @click="handleShow(scope.row)">查看详情</el-button> <el-button link size="small" @click="handleShow(scope.row)">查看详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>

View File

@ -16,10 +16,10 @@
<el-table-column label="创建时间" prop="create_time"></el-table-column> <el-table-column label="创建时间" prop="create_time"></el-table-column>
<el-table-column label="操作" fixed="right" align="right" width="120"> <el-table-column label="操作" fixed="right" align="right" width="120">
<template #default="scope"> <template #default="scope">
<el-button type="text" size="small" @click="handleEdit(scope.row)">编辑</el-button> <el-button link size="small" @click="handleEdit(scope.row)">编辑</el-button>
<el-popconfirm title="确定删除吗?"> <el-popconfirm title="确定删除吗?">
<template #reference> <template #reference>
<el-button type="text" size="small">删除</el-button> <el-button link size="small">删除</el-button>
</template> </template>
</el-popconfirm> </el-popconfirm>
</template> </template>

View File

@ -35,7 +35,7 @@
<el-table-column label="创建时间" prop="create_time"></el-table-column> <el-table-column label="创建时间" prop="create_time"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="160"> <el-table-column label="操作" fixed="right" align="center" width="160">
<template #default="scope"> <template #default="scope">
<el-button type="text" size="small" @click="handleShow(scope.row)">查看详情</el-button> <el-button link size="small" @click="handleShow(scope.row)">查看详情</el-button>
<!--创建人在初始状态--> <!--创建人在初始状态-->
<el-link <el-link
v-if="scope.row.state_.type===1&&userId===scope.row.create_by" v-if="scope.row.state_.type===1&&userId===scope.row.create_by"

View File

@ -53,12 +53,12 @@
<el-table-column label="创建时间" prop="create_time"></el-table-column> <el-table-column label="创建时间" prop="create_time"></el-table-column>
<el-table-column label="操作" fixed="right" align="right" width="120"> <el-table-column label="操作" fixed="right" align="right" width="120">
<template #default="scope"> <template #default="scope">
<el-button type="text" size="small" @click="handleEdit(scope.row)" <el-button link size="small" @click="handleEdit(scope.row)"
>编辑</el-button >编辑</el-button
> >
<el-popconfirm title="确定删除吗?"> <el-popconfirm title="确定删除吗?">
<template #reference> <template #reference>
<el-button type="text" size="small">删除</el-button> <el-button link size="small">删除</el-button>
</template> </template>
</el-popconfirm> </el-popconfirm>
</template> </template>

View File

@ -46,10 +46,10 @@
<el-card style="margin-left: 10px; margin-bottom: 10px" v-if="cateType==='rparty'"> <el-card style="margin-left: 10px; margin-bottom: 10px" v-if="cateType==='rparty'">
<el-descriptions title="来访信息" :column="3"> <el-descriptions title="来访信息" :column="3">
<el-descriptions-item label="工单流水号:"> <el-descriptions-item label="工单流水号:">
<!--{{ticketDetail.sn }}--> {{ticketDetail.sn }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="相关方:"> <el-descriptions-item label="相关方:">
<!--{{rpjDetail.name }}--> {{rpjDetail.name }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="入厂项目:"> <el-descriptions-item label="入厂项目:">
<!--{{rpjDetail.company }}--> <!--{{rpjDetail.company }}-->
@ -194,9 +194,16 @@
this.ticketId = this.$route.query.id; this.ticketId = this.$route.query.id;
this.type = this.$route.query.type; this.type = this.$route.query.type;
this.projectId = this.$route.query.projectId; this.projectId = this.$route.query.projectId;
this.cateType = this.$route.query.catetype;
if(this.cateType==='visit'){
this.getVisit();
}else if(this.cateType==='rparty'){
this.getVisit();
}
this.getticketItem(); this.getticketItem();
this.getVisit();
this.getBtns(); this.getBtns();
this.getRpj();
}, },
methods: { methods: {
@ -222,7 +229,9 @@
// //
getRpj(){ getRpj(){
this.$API.rpmrpj.item.req(this.projectId).then((res) => {
this.rpjDetail = res;
});
}, },
//-start //-start
addNode(){ addNode(){

View File

@ -35,7 +35,7 @@
<el-table-column label="创建时间" prop="create_time"></el-table-column> <el-table-column label="创建时间" prop="create_time"></el-table-column>
<el-table-column label="操作" fixed="right" align="right" width="120"> <el-table-column label="操作" fixed="right" align="right" width="120">
<template #default="scope"> <template #default="scope">
<el-button type="text" size="small" @click="handleShow(scope.row)">查看详情</el-button> <el-button link size="small" @click="handleShow(scope.row)">查看详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>

View File

@ -28,13 +28,13 @@
<el-table-column label="创建时间" prop="create_time" min-width="150"></el-table-column> <el-table-column label="创建时间" prop="create_time" min-width="150"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="220"> <el-table-column label="操作" fixed="right" align="center" width="220">
<template #default="scope"> <template #default="scope">
<el-button type="text" size="small" @click="workflowShow(scope.row)">配置</el-button> <el-button link size="small" @click="workflowShow(scope.row)">配置</el-button>
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<el-button type="text" size="small" @click="workflowEdit(scope.row)">编辑</el-button> <el-button link size="small" @click="workflowEdit(scope.row)">编辑</el-button>
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<el-popconfirm title="确定删除吗?" @confirm="workflowDel(scope.row)"> <el-popconfirm title="确定删除吗?" @confirm="workflowDel(scope.row)">
<template #reference> <template #reference>
<el-button type="text" size="small">删除</el-button> <el-button link size="small">删除</el-button>
</template> </template>
</el-popconfirm> </el-popconfirm>
</template> </template>