fire页面采用选人组件

This commit is contained in:
曹前明 2022-09-02 17:14:55 +08:00
parent 50a17fbd1d
commit 188f3ab2e7
13 changed files with 94 additions and 117 deletions

View File

@ -7,7 +7,8 @@ VUE_APP_TITLE = '曲阳金隅安全智能管控平台'
# 接口地址
#VUE_APP_API_BASEURL = http://1.203.161.103:2800/api
#VUE_APP_WS_API = 'ws://localhost:8000'
VUE_APP_API_BASEURL = http://127.0.0.1:8000/api
#VUE_APP_API_BASEURL = http://127.0.0.1:8000/api
VUE_APP_API_BASEURL = http://10.99.5.79:20309/api
#VUE_APP_BASEURL = http://127.0.0.1:8000
# 本地端口

View File

@ -28,19 +28,19 @@
<el-col :md="multiple?18:24" :sm="24">
<el-card header="账号列表" shadow="never">
<el-row >
<!-- <el-col :md="6" :sm="24">
<el-select v-model="query.type" placeholder="人员类型" @change="handleTypeChange">
<el-col :md="6" :sm="24">
<el-select v-model="userTypeChecked" placeholder="人员类型" @change="handleQuery" :multiple="true">
<el-option v-for="item in choseTypeOptions" :key="item" :label="item.label"
:value="item.value"></el-option>
</el-select>
</el-col> -->
<el-col :md="8" :sm="24">
</el-col>
<el-col :md="6" :sm="24">
<el-cascader style="width:90%" v-model="query.depts" :options="deptdata" clearable placeholder="部门/单位" @change="handleQuery" :show-all-levels="false" :props="{emitPath:false}"/>
</el-col>
<el-col :md="8" :sm="24">
<el-col :md="6" :sm="24">
<el-cascader style="width:90%" v-model="query.posts" :options="postdata" clearable placeholder="岗位" @change="handleQuery" :show-all-levels="false" :props="{emitPath:false}"/>
</el-col>
<el-col :md="8" :sm="24">
<el-col :md="6" :sm="24">
<div style="display:flex">
<el-input
v-model="query.search"
@ -229,17 +229,25 @@ export default {
dialoguser: false,
dataValue: this.value,
choseData: {},
// choseType: 'employee',
// choseTypeOptions: [
// {
// value: 'employee',
// label: ''
// },
// {
// value: 'remployee',
// label: ''
// }
// ]
userTypeChecked: [],
choseTypeOptions: [
{
value: 'employee',
label: '企业员工'
},
{
value: 'remployee',
label: '相关方'
},
{
value: 'visitor',
label: '访客'
},
{
value: 'driver',
label: '货车司机'
}
],
userTypeOptions :{
'employee': '企业员工',
'remployee': '相关方',
@ -281,6 +289,10 @@ export default {
},
//
handleQuery() {
this.query.type__in = null;
if(this.userTypeChecked){
this.query.type__in = this.userTypeChecked.join(',')
}
this.$refs.table.queryData(this.query)
},
//

View File

@ -360,8 +360,6 @@
that.oplId = that.id; //ID
this.$nextTick(()=>{
that.getOplData();
// that.getDept();
// that.getUser();
that.getworkerList();
that.getgasList();
})
@ -407,11 +405,6 @@
// });
// },
// //
// getUser() {
// this.$API.system.user.list.req({page: 0}).then((res) => {
// this.useroptions = res;
// });
// },
//
getworkerList() {
this.$API.opm.worker.list.req({opl: this.oplId, page: 0}).then((res) => {

View File

@ -191,7 +191,6 @@
},
mounted() {
this.getGroup();
// this.getUser();
},
methods: {
//
@ -199,12 +198,6 @@
let res = await this.$API.system.dept.list.req({page: 0});
this.group = genTree(res);
},
//
// getUser() {
// this.$API.system.user.list.req({page: 0}).then((res) => {
// this.useroptions = res;
// });
// },
getManager(data){
this.form.manager=data.id;
this.form.manager_name=data.name

View File

@ -73,7 +73,16 @@
<sc-title title="音响配置"></sc-title>
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="事件优先级" prop="priority" placeholder="数字越小级别越高">
<el-form-item label="喇叭开启" prop="speaker_on">
<el-switch v-model="form.speaker_on"></el-switch>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item
label="事件优先级"
prop="priority"
placeholder="数字越小级别越高"
>
<el-input-number
v-model="form.priority"
:min="1"
@ -130,13 +139,7 @@
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="喇叭开启" prop="speaker_on">
<el-switch v-model="form.speaker_on"></el-switch>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<!-- <el-col :md="12" :sm="24">
<el-form-item label="开启区域" prop="filter_area_level">
<el-select v-model="form.filter_area_level">
<el-option
@ -147,7 +150,7 @@
/>
</el-select>
</el-form-item>
</el-col>
</el-col> -->
</el-row>
</el-form>
<template #footer>

View File

@ -230,7 +230,6 @@ export default {
},
mounted() {
this.getPostOptions();
// this.getUserOptions();
this.getEventCate();
},
methods: {

View File

@ -39,6 +39,11 @@
<template #default="scope">{{trigger_[scope.row.trigger]}}
</template>
</el-table-column>
<el-table-column label="其他信息">
<template #default="scope">
<span v-if="scope.row.detail">{{scope.row.detail.deviceName}}</span>
</template>
</el-table-column>
<el-table-column label="打卡时间" prop="create_time"></el-table-column>
</scTable>
</el-main>

View File

@ -89,6 +89,7 @@
label: 'label', //
value: 'value', //
emitPath: false, // false
checkStrictly: true
}"
clearable
/>
@ -96,26 +97,30 @@
</el-col>
<el-col :md="12" :sm="12" :xs="24">
<el-form-item label="作业负责人">
<el-select v-model="form.charger" placeholder="选择作业负责人">
<el-input
v-model="form.charger_name"
style="width:200px"
disabled
></el-input>
<!-- <el-select v-model="form.charger_name" placeholder="选择作业负责人">
<el-option
v-for="item in useroptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-select> -->
<ehsUserSelect :multiple="false" @submit="getCharger"/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="12" :xs="24">
<el-form-item label="作业监护人">
<el-select v-model="form.monitor" placeholder="选择作业监护人">
<el-option
v-for="item in useroptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
<el-input
v-model="form.monitor_name"
style="width:200px"
disabled
></el-input>
<ehsUserSelect :multiple="false" @submit="getMonitor"/>
</el-form-item>
</el-col>
<el-col :md="24" :sm="12" :xs="24">
@ -154,10 +159,7 @@
</el-form-item>
</el-col>
<el-col :md="24" :sm="12" :xs="24">
<el-card class="box-card">
<div class="clearfix">
<span>应急处置</span>
</div>
<el-card header="应急处置">
<div class="content">
<p>1发生火灾时立即使用消防器材边灭火边报告</p>
<p>2预判火势无法控制时应立即疏散人群并拨打110或119求救</p>
@ -246,7 +248,7 @@
</template>
</el-table-column>
</scTable>
<sc-dialog v-model="workerdialog" draggable title="选择作业人员">
<el-dialog v-model="workerdialog" draggable title="选择作业人员">
<el-form
ref="workerForm"
:model="formworker"
@ -259,18 +261,12 @@
<el-row>
<el-col :md="24" :sm="12" :xs="24">
<el-form-item label="作业人员">
<el-select
v-model="formworker.worker"
@change="selectWorker"
placeholder="选择作业人员"
>
<el-option
v-for="item in useroptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
<el-input
v-model="formworker.worker_name"
style="width:200px"
disabled
></el-input>
<ehsUserSelect :multiple="false" @submit="getWorker"/>
</el-form-item>
</el-col>
<el-col :md="24" :sm="12" :xs="24">
@ -313,7 +309,7 @@
<el-button @click="dialogcart = false"> </el-button>
<el-button type="primary" @click="submitWorker"> </el-button>
</template>
</sc-dialog>
</el-dialog>
<div style="margin-top:20px;text-align:center">
<el-button style="margin-right: 4px" @click="handleLastStep"
>上一步
@ -600,9 +596,22 @@
this.getoplData();
this.getInit();
this.getDept();
this.getUser();
// this.getUser();
},
methods: {
getCharger(data) {
this.form.charger=data.id;
this.form.charger_name=data.name
},
getMonitor(data) {
this.form.monitor=data.id;
this.form.monitor_name=data.name
},
getWorker(data) {
this.formworker.worker=data.id,
this.formworker.worker_name=data.name
this.selectWorker()
},
getoplData() {
if (this.oplId == "") {
this.getOperation();
@ -641,11 +650,6 @@
},
//
getUser() {
this.$API.system.user.list.req({page: 0}).then((res) => {
this.useroptions = res;
});
},
//
//ID===>

View File

@ -101,7 +101,7 @@ export default {
20: "审批中",
30: "待作业",
40: "作业中",
50: "已关闭",
50: "已结束",
},
userId: '',
};

View File

@ -194,7 +194,6 @@ export default {
mounted() {
this.getDept();
this.getArea();
// this.getUser();
},
methods: {
//,
@ -224,13 +223,6 @@ export default {
this.vchannelOptions = res;
});
},
//
// getUser() {
// this.$API.system.user.list.req({ page: 0 }).then((res) => {
// this.coordinatoroptions = res;
// });
// },
//
open(mode = "add") {

View File

@ -184,13 +184,9 @@
getUserPostList(){
debugger;
console.log(this.form.id);
let obj = {user:this.form.id};
let obj = {user:this.form.id, page:0};
this.$API.system.userPost.list.req(obj).then(res=>{
if(res.err_msg){
this.$message.error(res.err_msg)
}else{
this.userPostForm.list=res.results;
}
this.userPostForm.list=res;
})
},
//
@ -200,13 +196,8 @@
this.isSaveing = true;
row.user = this.form.id;
this.$API.system.userPost.create.req(row).then(res=>{
if(res.err_msg){
this.$message.error(res.err_msg)
}else{
this.getUserPostList();
this.$message.success("操作成功");
// this.userPostForm.list=res.results;
}
this.getUserPostList();
this.$message.success("操作成功");
})
},
//
@ -217,12 +208,9 @@
confirmButtonClass: 'el-button--danger'
}).then(() => {
this.$API.system.userPost.delete.req(id).then(res=>{
if(res.err_msg){
this.$message.error(res.err_msg)
}else{
this.getUserPostList();
this.$message.success("操作成功");
}
this.getUserPostList();
this.$message.success("操作成功");
})
})
},

View File

@ -144,16 +144,9 @@ export default {
};
},
mounted() {
// this.getUser();
},
methods: {
//访
// getUser() {
// this.$API.system.user.list.req({ page: 0 }).then((res) => {
// this.receptionistoptions = res;
// });
// },
//
open(mode = "add") {
this.mode = mode;

View File

@ -291,7 +291,6 @@ export default {
mounted() {
this.visitid = this.$route.query.visitid; //ID
this.getRpj();
// this.getUser();
this.getpeoplelistlist();
this.getvisitorlist();
},
@ -308,11 +307,6 @@ export default {
this.form.receptionist_name=data.name
},
//
// getUser() {
// this.$API.system.user.list.req({ page: 0 }).then((res) => {
// this.receptionistoptions = res;
// });
// },
//
getInit(){
this.$API.wf.workflow.initkey.req('visit').then((res) => {