增加筛选条件

This commit is contained in:
曹前明 2022-09-07 16:46:08 +08:00
parent d81a6c77c8
commit b29f3cc295
10 changed files with 251 additions and 115 deletions

View File

@ -39,7 +39,7 @@
<span v-if="scope.row.trigger == 20">定位</span> <span v-if="scope.row.trigger == 20">定位</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="音响" prop="speaker_on" width="50"> <el-table-column label="喇叭" prop="speaker_on" width="50">
<template #default="scope"> <template #default="scope">
<el-switch <el-switch
v-model="scope.row.speaker_on" v-model="scope.row.speaker_on"

View File

@ -25,7 +25,7 @@
</el-form-item> </el-form-item>
<el-form-item label="视频" prop="vchannel"> <el-form-item label="视频" prop="vchannel">
<el-select v-model="form.vchannel"> <el-select v-model="form.vchannel" filterable>
<el-option <el-option
v-for="item in vchanneloptions" v-for="item in vchanneloptions"
:key="item.id" :key="item.id"

View File

@ -25,7 +25,7 @@
</el-form-item> </el-form-item>
<el-form-item label="视频" prop="vchannels"> <el-form-item label="视频" prop="vchannels">
<el-select v-model="form.vchannels" multiple="true"> <el-select v-model="form.vchannels" multiple="true" filterable>
<el-option <el-option
v-for="item in vchanneloptions" v-for="item in vchanneloptions"
:key="item.id" :key="item.id"

View File

@ -70,7 +70,7 @@
</el-col> </el-col>
</el-row> </el-row>
<sc-title title="音响配置"></sc-title> <sc-title title="喇叭配置"></sc-title>
<el-row> <el-row>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="喇叭开启" prop="speaker_on"> <el-form-item label="喇叭开启" prop="speaker_on">

View File

@ -8,9 +8,34 @@
v-auth="'certificate.create'" v-auth="'certificate.create'"
@click="handleForm('add')" @click="handleForm('add')"
></el-button> ></el-button>
<!-- <el-select
<el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button> v-model="query.type"
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button> --> placeholder="证书类型"
@change="handleQuery"
clearable
style="margin-left: 2px"
>
<el-option
v-for="item in typeoptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
<el-select
v-model="query.employee__type"
placeholder="人员类型"
@change="handleQuery"
clearable
style="margin-left: 2px"
>
<el-option
v-for="item in eptypeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div> </div>
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
@ -177,6 +202,12 @@ export default {
{ id: 20, name: "特种设备操作证书" }, { id: 20, name: "特种设备操作证书" },
{ id: 30, name: "安全管理人员证书" }, { id: 30, name: "安全管理人员证书" },
], ],
eptypeOptions: [
{label:"正式员工", value:"employee"},
{label:"相关方", value:"remployee"},
{label:"访客", value:"visitor"},
{label:"货车司机", value:"driver"}
],
type_: { type_: {
10: "特种作业证书", 10: "特种作业证书",
20: "特种设备操作证书", 20: "特种设备操作证书",

View File

@ -1,6 +1,19 @@
<template> <template>
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel">
<el-date-picker
v-model="timeRange"
type="datetimerange"
range-separator="至"
start-placeholder="打卡时间始"
end-placeholder="打卡时间止"
style="margin-left: 2px"
value-format="YYYY-MM-DD HH:mm:ss"
@change="handleQuery"
clearable
/>
</div>
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input <el-input
@ -55,6 +68,7 @@ export default {
components: {}, components: {},
data() { data() {
return { return {
timeRange: [],
apiObj: this.$API.hrm.clock_record.list, apiObj: this.$API.hrm.clock_record.list,
query: {}, query: {},
selection: [], selection: [],
@ -72,6 +86,13 @@ export default {
}, },
methods: { methods: {
handleQuery(){ handleQuery(){
if (this.timeRange) {
this.query.start_create = this.timeRange[0];
this.query.end_create = this.timeRange[1];
} else {
this.query.end_create = null;
this.query.start_create = null;
}
this.$refs.table.queryData(this.query) this.$refs.table.queryData(this.query)
}, },

View File

@ -2,15 +2,20 @@
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<!-- <el-button <el-select
type="primary" v-model="query.type"
icon="el-icon-plus" placeholder="人员类型"
v-auth="'employee.create'" @change="handleQuery"
@click="handleForm('add')" clearable
></el-button> --> style="margin-left: 2px"
<!-- >
<el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button> <el-option
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button> --> v-for="item in typeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div> </div>
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
@ -202,7 +207,14 @@ export default {
employee: "正式员工", employee: "正式员工",
remployee: "相关方", remployee: "相关方",
visitor: "访客", visitor: "访客",
driver: "货车司机"
}, },
typeOptions: [
{label:"正式员工", value:"employee"},
{label:"相关方", value:"remployee"},
{label:"访客", value:"visitor"},
{label:"货车司机", value:"driver"}
]
}; };
}, },
mounted() { mounted() {

View File

@ -8,14 +8,14 @@
@click="addDept" @click="addDept"
v-auth="'dept.create'" v-auth="'dept.create'"
></el-button> ></el-button>
<el-button <!-- <el-button
type="danger" type="danger"
plain plain
icon="el-icon-delete" icon="el-icon-delete"
v-auth="'dept.delete'" v-auth="'dept.delete'"
:disabled="selection.length == 0" :disabled="selection.length == 0"
@click="batch_del" @click="batch_del"
></el-button> ></el-button> -->
</div> </div>
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">

View File

@ -91,7 +91,7 @@
<el-table-column label="项目状态" prop="state" min-width="180"> <el-table-column label="项目状态" prop="state" min-width="180">
<template #default="scope">{{ state_[scope.row.state] }}</template> <template #default="scope">{{ state_[scope.row.state] }}</template>
</el-table-column> </el-table-column>
<el-table-column label="审批状态" prop="state" min-width="150"> <el-table-column label="审批状态" min-width="150">
<template #default="scope"> <template #default="scope">
<span <span
v-if="scope.row.ticket_ && scope.row.ticket_.state_" v-if="scope.row.ticket_ && scope.row.ticket_.state_"

View File

@ -1,104 +1,176 @@
<template> <template>
<el-container> <el-header>
<el-main class="nopadding"> <div class="left-panel">
<scTable <el-select
ref="table" v-model="query.workflow"
:apiObj = "apiObj" placeholder="审批流"
:params = "params" @change="handleQuery"
row-key="id" clearable
stripe style="margin-left: 2px"
highlightCurrentRow >
> <el-option
<el-table-column label="ID" prop="id" width="180"></el-table-column> v-for="item in wfOptions"
<el-table-column label="流水号" prop="sn" width="180"></el-table-column> :key="item.id"
<el-table-column label="工单标题" prop="title" width="180"></el-table-column> :label="item.name"
:value="item.id"
></el-option>
</el-select>
<el-date-picker
v-model="timeRange"
type="datetimerange"
range-separator="至"
start-placeholder="创建时间始"
end-placeholder="创建时间止"
style="margin-left: 2px"
value-format="YYYY-MM-DD HH:mm:ss"
@change="handleQuery"
clearable
/>
</div>
</el-header>
<el-container>
<el-main class="nopadding">
<scTable
ref="table"
:apiObj="apiObj"
:params="params"
row-key="id"
stripe
highlightCurrentRow
>
<el-table-column label="ID" prop="id" width="180"></el-table-column>
<el-table-column label="流水号" prop="sn" width="180"></el-table-column>
<el-table-column
label="工单标题"
prop="title"
width="180"
></el-table-column>
<el-table-column label="工作流" prop="title"> <el-table-column label="工作流" prop="title">
<template #default="scope"> <template #default="scope">
{{ scope.row.workflow_.name }} {{ scope.row.workflow_.name }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="所在节点"> <el-table-column label="所在节点">
<template #default="scope"> <template #default="scope">
{{ scope.row.state_.name }} {{ scope.row.state_.name }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="进行状态" prop="sort"> <el-table-column label="进行状态" prop="sort">
<template #default="scope"> <template #default="scope">
<el-tag <el-tag
:type="scope.row.act_state===0?'':scope.row.act_state===1?'':scope.row.act_state===2?'danger':scope.row.act_state===3?'danger':scope.row.act_state===5?'danger':scope.row.act_state===4?'success':''" :type="
>{{act_states[scope.row.act_state]}}</el-tag> scope.row.act_state === 0
</template> ? ''
</el-table-column> : scope.row.act_state === 1
<el-table-column label="处理人类型"> ? ''
<template #default="scope"> : scope.row.act_state === 2
{{ participant_[scope.row.participant_type] }} ? 'danger'
</template> : scope.row.act_state === 3
</el-table-column> ? 'danger'
<el-table-column label="创建时间" prop="create_time" width="150"></el-table-column> : scope.row.act_state === 5
<el-table-column label="操作" fixed="right" align="center"> ? 'danger'
<template #default="scope"> : scope.row.act_state === 4
<el-button type="text" size="small" @click="handleShow(scope.row)">查看</el-button> ? 'success'
<!--多人且主动接单--> : ''
"
</template> >{{ act_states[scope.row.act_state] }}</el-tag
</el-table-column> >
</scTable> </template>
</el-main> </el-table-column>
</el-container> <el-table-column label="处理人类型">
<template #default="scope">
{{ participant_[scope.row.participant_type] }}
</template>
</el-table-column>
<el-table-column
label="创建时间"
prop="create_time"
width="150"
></el-table-column>
<el-table-column label="操作" fixed="right" align="center">
<template #default="scope">
<el-button type="text" size="small" @click="handleShow(scope.row)"
>查看</el-button
>
<!--多人且主动接单-->
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
</template> </template>
<script> <script>
export default { export default {
name: "state", name: "state",
data() { data() {
return { return {
list: [], query: {},
apiObj: this.$API.wf.ticket.list, timeRange: [],
params: {"category": "all"}, list: [],
act_states: { apiObj: this.$API.wf.ticket.list,
0: "草稿中", params: { category: "all" },
1: "进行中", act_states: {
2: "被退回", 0: "草稿中",
3: "被撤回", 1: "进行中",
4: "已完成", 2: "被退回",
5: "已关闭", 3: "被撤回",
}, 4: "已完成",
participant_: { 5: "已关闭",
0: "无处理人", },
1: "单人", participant_: {
2: "多人", 0: "无处理人",
}, 1: "单人",
}; 2: "多人",
}, },
mounted() { wfOptions: [],
}, };
methods: { },
handleShow(row) { mounted() {
let cateType = row.workflow_.key; this.getWfOptions();
let projectId = null; },
if (cateType === 'visit') { methods: {
projectId = row.ticket_data.visit; getWfOptions() {
} else if (cateType === 'rpj') { this.$API.wf.workflow.list.req({ page: 0 }).then((res) => {
projectId = row.ticket_data.rpj; this.wfOptions = res;
} else if(cateType.indexOf('opl_')!=-1){ });
// operation = row.ticket_data.operation ? row.ticket_data.operation : null; },
projectId = row.ticket_data.opl; handleQuery() {
cateType = 'opl' if (this.timeRange) {
} this.query.start_create = this.timeRange[0];
this.$router.push({ this.query.end_create = this.timeRange[1];
path: "ticketdetail", } else {
query: { this.query.end_create = null;
id: row.id, this.query.start_create = null;
type: 'show', }
projectId: projectId, this.$refs.table.queryData(this.query);
catetype: cateType, },
// operation: operation handleShow(row) {
}, let cateType = row.workflow_.key;
}); let projectId = null;
}, if (cateType === "visit") {
}, projectId = row.ticket_data.visit;
}; } else if (cateType === "rpj") {
projectId = row.ticket_data.rpj;
} else if (cateType.indexOf("opl_") != -1) {
// operation = row.ticket_data.operation ? row.ticket_data.operation : null;
projectId = row.ticket_data.opl;
cateType = "opl";
}
this.$router.push({
path: "ticketdetail",
query: {
id: row.id,
type: "show",
projectId: projectId,
catetype: cateType,
// operation: operation
},
});
},
},
};
</script> </script>
<style scoped> <style scoped>