增加筛选条件

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>
</template>
</el-table-column>
<el-table-column label="音响" prop="speaker_on" width="50">
<el-table-column label="喇叭" prop="speaker_on" width="50">
<template #default="scope">
<el-switch
v-model="scope.row.speaker_on"

View File

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

View File

@ -25,7 +25,7 @@
</el-form-item>
<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
v-for="item in vchanneloptions"
:key="item.id"

View File

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

View File

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

View File

@ -1,6 +1,19 @@
<template>
<el-container>
<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-search">
<el-input
@ -55,6 +68,7 @@ export default {
components: {},
data() {
return {
timeRange: [],
apiObj: this.$API.hrm.clock_record.list,
query: {},
selection: [],
@ -72,6 +86,13 @@ export default {
},
methods: {
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)
},

View File

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

View File

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

View File

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

View File

@ -1,104 +1,176 @@
<template>
<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-header>
<div class="left-panel">
<el-select
v-model="query.workflow"
placeholder="审批流"
@change="handleQuery"
clearable
style="margin-left: 2px"
>
<el-option
v-for="item in wfOptions"
:key="item.id"
: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">
<template #default="scope">
{{ scope.row.workflow_.name }}
</template>
</el-table-column>
<el-table-column label="所在节点">
<template #default="scope">
{{ scope.row.state_.name }}
</template>
</el-table-column>
<el-table-column label="进行状态" prop="sort">
<template #default="scope">
<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':''"
>{{act_states[scope.row.act_state]}}</el-tag>
</template>
</el-table-column>
<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>
<el-table-column label="工作流" prop="title">
<template #default="scope">
{{ scope.row.workflow_.name }}
</template>
</el-table-column>
<el-table-column label="所在节点">
<template #default="scope">
{{ scope.row.state_.name }}
</template>
</el-table-column>
<el-table-column label="进行状态" prop="sort">
<template #default="scope">
<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'
: ''
"
>{{ act_states[scope.row.act_state] }}</el-tag
>
</template>
</el-table-column>
<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>
<script>
export default {
name: "state",
data() {
return {
list: [],
apiObj: this.$API.wf.ticket.list,
params: {"category": "all"},
act_states: {
0: "草稿中",
1: "进行中",
2: "被退回",
3: "被撤回",
4: "已完成",
5: "已关闭",
},
participant_: {
0: "无处理人",
1: "单人",
2: "多人",
},
};
},
mounted() {
},
methods: {
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
},
});
},
},
};
export default {
name: "state",
data() {
return {
query: {},
timeRange: [],
list: [],
apiObj: this.$API.wf.ticket.list,
params: { category: "all" },
act_states: {
0: "草稿中",
1: "进行中",
2: "被退回",
3: "被撤回",
4: "已完成",
5: "已关闭",
},
participant_: {
0: "无处理人",
1: "单人",
2: "多人",
},
wfOptions: [],
};
},
mounted() {
this.getWfOptions();
},
methods: {
getWfOptions() {
this.$API.wf.workflow.list.req({ page: 0 }).then((res) => {
this.wfOptions = res;
});
},
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);
},
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>
<style scoped>