增加回车检索
This commit is contained in:
parent
8fca5caaa8
commit
38a3d10117
|
|
@ -62,7 +62,7 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="姓名"
|
placeholder="姓名"
|
||||||
clearable
|
clearable
|
||||||
@click="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
|
||||||
|
|
@ -180,6 +180,7 @@ export default {
|
||||||
handleBindBlt(type, row) {
|
handleBindBlt(type, row) {
|
||||||
this.dis = false;
|
this.dis = false;
|
||||||
this.form.blt = row.id;
|
this.form.blt = row.id;
|
||||||
|
this.form.code = row.code;
|
||||||
this.bindBltMac = row.code;
|
this.bindBltMac = row.code;
|
||||||
this.form.type = type;
|
this.form.type = type;
|
||||||
if (type === 20) {
|
if (type === 20) {
|
||||||
|
|
@ -189,13 +190,15 @@ export default {
|
||||||
this.showBindBlt = true;
|
this.showBindBlt = true;
|
||||||
},
|
},
|
||||||
submitBindBlt() {
|
submitBindBlt() {
|
||||||
let that = this;
|
let that = this
|
||||||
that.$API.third.tdevice.bltBind.req(this.form).then((res) => {
|
let form = {
|
||||||
if (res.err_msg) {
|
code: this.form.code,
|
||||||
} else {
|
type: this.form.type,
|
||||||
that.showBindBlt = false;
|
employee: this.form.employee
|
||||||
that.$refs.table.refresh();
|
|
||||||
}
|
}
|
||||||
|
that.$API.third.tdevice.bltBind.req(form).then((res) => {
|
||||||
|
this.showBindBlt = false;
|
||||||
|
that.$refs.table.refresh();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="编号"
|
placeholder="编号"
|
||||||
clearable
|
clearable
|
||||||
@click="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<!-- <el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.cates"
|
v-model="query.cates"
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel"></div>
|
<div class="right-panel"></div>
|
||||||
</el-header>
|
</el-header> -->
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable
|
<scTable
|
||||||
ref="table"
|
ref="table"
|
||||||
|
|
@ -148,8 +148,8 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getCateOptions();
|
// this.getCateOptions();
|
||||||
this.getAreaOptions();
|
// this.getAreaOptions();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCateOptions() {
|
getCateOptions() {
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,7 @@ export default {
|
||||||
dutyAgg: [],
|
dutyAgg: [],
|
||||||
//数据统计
|
//数据统计
|
||||||
ep_count_type: "2",
|
ep_count_type: "2",
|
||||||
|
countIndex: "2",
|
||||||
userCount: {
|
userCount: {
|
||||||
total: 0,
|
total: 0,
|
||||||
count_employee: 0, //正式员工
|
count_employee: 0, //正式员工
|
||||||
|
|
|
||||||
|
|
@ -18,12 +18,12 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="证书名称/编号"
|
placeholder="证书名称/编号"
|
||||||
clearable
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -18,12 +18,12 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="证书名称/编号"
|
placeholder="证书名称/编号"
|
||||||
clearable
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,12 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="员工姓名/编号"
|
placeholder="员工姓名/编号"
|
||||||
clearable
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="姓名/手机号"
|
placeholder="姓名/手机号"
|
||||||
clearable
|
clearable
|
||||||
@click="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
|
||||||
|
|
@ -2,24 +2,69 @@
|
||||||
<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="add" v-auth="'operation.create'"></el-button>
|
<el-button
|
||||||
<!-- <el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
type="primary"
|
||||||
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button> -->
|
icon="el-icon-plus"
|
||||||
|
@click="add"
|
||||||
|
v-auth="'operation.create'"
|
||||||
|
></el-button>
|
||||||
|
<el-select
|
||||||
|
v-model="query.state"
|
||||||
|
placeholder="作业状态"
|
||||||
|
@change="handleQuery"
|
||||||
|
style="margin-left: 2px"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in stateOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></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>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<el-select @change="handleFilterTypeChange" v-model="filterType">
|
||||||
<el-select v-model="query.create_by">
|
<el-option
|
||||||
<el-option label="全部" value="000" />
|
v-for="item in filterOptions"
|
||||||
<el-option label="我的" :value="userId" />
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input v-model="query.search" placeholder="名称" clearable @click="handleQuery"></el-input>
|
<el-input
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
v-model="query.search"
|
||||||
</div>
|
placeholder="名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable ref="tableoperation" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" stripe
|
<scTable
|
||||||
@resetQuery="resetQuery">
|
ref="tableoperation"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
@selection-change="selectionChange"
|
||||||
|
stripe
|
||||||
|
@resetQuery="resetQuery"
|
||||||
|
>
|
||||||
<!-- <el-table-column
|
<!-- <el-table-column
|
||||||
label="#"
|
label="#"
|
||||||
type="index"
|
type="index"
|
||||||
|
|
@ -27,49 +72,93 @@
|
||||||
></el-table-column> -->
|
></el-table-column> -->
|
||||||
<el-table-column label="许可证" prop="opls" width="160">
|
<el-table-column label="许可证" prop="opls" width="160">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag v-for="item in scope.row.cates_" :key="item.id" style="margin-right:2px">{{ item.name }}
|
<el-tag
|
||||||
|
v-for="item in scope.row.cates_"
|
||||||
|
:key="item.id"
|
||||||
|
style="margin-right: 2px"
|
||||||
|
>{{ item.name }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="作业简介" prop="name" width="200"></el-table-column>
|
<el-table-column
|
||||||
|
label="作业简介"
|
||||||
|
prop="name"
|
||||||
|
width="200"
|
||||||
|
></el-table-column>
|
||||||
<el-table-column label="作业状态" prop="state">
|
<el-table-column label="作业状态" prop="state">
|
||||||
<template #default="scope">{{ stateoptions[scope.row.state] }}</template>
|
<template #default="scope">{{
|
||||||
|
stateoptions[scope.row.state]
|
||||||
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="生产状态" prop="state_work"></el-table-column>
|
<el-table-column label="生产状态" prop="state_work"></el-table-column>
|
||||||
<el-table-column label="作业区域"><template #default="scope">
|
<el-table-column label="作业区域"
|
||||||
|
><template #default="scope">
|
||||||
{{ scope.row.area_.name }}
|
{{ scope.row.area_.name }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="预计开始" prop="start_time"></el-table-column>
|
<el-table-column label="预计开始" prop="start_time"></el-table-column>
|
||||||
<el-table-column label="预计结束" prop="end_time"></el-table-column>
|
<el-table-column label="预计结束" prop="end_time"></el-table-column>
|
||||||
<el-table-column label="属地部门" prop="dept_ter"><template #default="scope">
|
<el-table-column label="属地部门" prop="dept_ter"
|
||||||
|
><template #default="scope">
|
||||||
{{ scope.row.dept_ter_.name }}
|
{{ scope.row.dept_ter_.name }}
|
||||||
</template></el-table-column>
|
</template></el-table-column
|
||||||
<el-table-column label="业务部门" prop="dept_bus"><template #default="scope">
|
>
|
||||||
|
<el-table-column label="业务部门" prop="dept_bus"
|
||||||
|
><template #default="scope">
|
||||||
{{ scope.row.dept_bus_.name }}
|
{{ scope.row.dept_bus_.name }}
|
||||||
</template></el-table-column>
|
</template></el-table-column
|
||||||
<el-table-column label="创建人" prop="create_by"><template #default="scope">
|
>
|
||||||
|
<el-table-column label="创建人" prop="create_by"
|
||||||
|
><template #default="scope">
|
||||||
{{ scope.row.create_by_.name }}
|
{{ scope.row.create_by_.name }}
|
||||||
</template></el-table-column>
|
</template></el-table-column
|
||||||
|
>
|
||||||
<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="180">
|
<el-table-column label="操作" fixed="right" align="center" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" size="small" v-auth="'operation.update'"
|
<el-button
|
||||||
@click="creatopl(scope.row)">许可证
|
link
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
v-auth="'operation.update'"
|
||||||
|
@click="creatopl(scope.row)"
|
||||||
|
>许可证
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button link type="primary" size="small" @click="table_show(scope.row, scope.$index)">查看
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="table_show(scope.row, scope.$index)"
|
||||||
|
>查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="scope.row.state === 10" link type="warning" size="small"
|
<el-button
|
||||||
v-auth="'operation.update'" @click="table_edit(scope.row, scope.$index)">编辑
|
v-if="scope.row.state === 10"
|
||||||
|
link
|
||||||
|
type="warning"
|
||||||
|
size="small"
|
||||||
|
v-auth="'operation.update'"
|
||||||
|
@click="table_edit(scope.row, scope.$index)"
|
||||||
|
>编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button link type="danger" size="small" v-if="scope.row.state === 10"
|
<el-button
|
||||||
v-auth="'operation.delete'" @click="table_del(scope.row)">删除
|
link
|
||||||
|
type="danger"
|
||||||
|
size="small"
|
||||||
|
v-if="scope.row.state === 10"
|
||||||
|
v-auth="'operation.delete'"
|
||||||
|
@click="table_del(scope.row)"
|
||||||
|
>删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" @closed="dialog.save = false">
|
<save-dialog
|
||||||
|
v-if="dialog.save"
|
||||||
|
ref="saveDialog"
|
||||||
|
@success="handleSaveSuccess"
|
||||||
|
@closed="dialog.save = false"
|
||||||
|
>
|
||||||
</save-dialog>
|
</save-dialog>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -88,10 +177,41 @@ export default {
|
||||||
permission: false,
|
permission: false,
|
||||||
},
|
},
|
||||||
apiObj: this.$API.opm.operation.list,
|
apiObj: this.$API.opm.operation.list,
|
||||||
query: {
|
query: {},
|
||||||
search: '',
|
filterType: "all",
|
||||||
create_by: '000',
|
filterOptions: [
|
||||||
|
{
|
||||||
|
label: "全部",
|
||||||
|
value: "all",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "我创建的",
|
||||||
|
value: "my",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
timeRange: [],
|
||||||
|
stateOptions: [
|
||||||
|
{
|
||||||
|
label: "创建中",
|
||||||
|
value: 10,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "审批中",
|
||||||
|
value: 20,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "待作业",
|
||||||
|
value: 30,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "进行中",
|
||||||
|
value: 40,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "已结束",
|
||||||
|
value: 50,
|
||||||
|
},
|
||||||
|
],
|
||||||
selection: [],
|
selection: [],
|
||||||
search: {
|
search: {
|
||||||
keyword: null,
|
keyword: null,
|
||||||
|
|
@ -103,7 +223,7 @@ export default {
|
||||||
40: "作业中",
|
40: "作业中",
|
||||||
50: "已结束",
|
50: "已结束",
|
||||||
},
|
},
|
||||||
userId: '',
|
userId: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -111,7 +231,6 @@ export default {
|
||||||
this.userId = userInfo.id;
|
this.userId = userInfo.id;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
//添加
|
//添加
|
||||||
add() {
|
add() {
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
|
|
@ -165,7 +284,6 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
//表格选择后回调事件
|
//表格选择后回调事件
|
||||||
selectionChange(selection) {
|
selectionChange(selection) {
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
|
|
@ -183,13 +301,26 @@ export default {
|
||||||
//搜索
|
//搜索
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.search = this.query.search;
|
if (this.timeRange) {
|
||||||
if (this.query.create_by == '000') {
|
this.query.start_create = this.timeRange[0];
|
||||||
obj.create_by = '';
|
this.query.end_create = this.timeRange[1];
|
||||||
} else {
|
} else {
|
||||||
obj.create_by = this.query.create_by;
|
this.query.end_create = null;
|
||||||
|
this.query.start_create = null;
|
||||||
}
|
}
|
||||||
this.$refs.tableoperation.queryData(obj);
|
if (this.query.cates) {
|
||||||
|
} else {
|
||||||
|
this.query.cates = null;
|
||||||
|
}
|
||||||
|
this.$refs.tableoperation.queryData(this.query);
|
||||||
|
},
|
||||||
|
handleFilterTypeChange(val) {
|
||||||
|
if (val == "all") {
|
||||||
|
this.query.create_by = null;
|
||||||
|
} else if (val == "my") {
|
||||||
|
this.query.create_by = this.userId;
|
||||||
|
}
|
||||||
|
this.$refs.tableoperation.queryData(this.query);
|
||||||
},
|
},
|
||||||
//根据ID获取树结构
|
//根据ID获取树结构
|
||||||
filterTree(id) {
|
filterTree(id) {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
<el-input v-model="query.search" placeholder="名称" clearable @click="handleQuery"></el-input>
|
<el-input v-model="query.search" placeholder="名称" clearable @keyup.enter="handleQuery"></el-input>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="编号/名称"
|
placeholder="编号/名称"
|
||||||
clearable
|
clearable
|
||||||
@click="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="姓名"
|
placeholder="姓名"
|
||||||
clearable
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,12 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="名称"
|
placeholder="名称"
|
||||||
clearable
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -2,56 +2,170 @@
|
||||||
<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="add" v-auth="'rpj.create'"></el-button>
|
<el-button
|
||||||
<!-- <el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
type="primary"
|
||||||
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button> -->
|
icon="el-icon-plus"
|
||||||
|
@click="add"
|
||||||
|
v-auth="'rpj.create'"
|
||||||
|
></el-button>
|
||||||
|
<el-select
|
||||||
|
v-model="query.state"
|
||||||
|
placeholder="项目状态"
|
||||||
|
@change="handleQuery"
|
||||||
|
style="margin-left: 2px"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in stateOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></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>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
<el-select v-model="query.create_by">
|
<el-select @change="handleFilterTypeChange" v-model="filterType">
|
||||||
<el-option label="全部" value="000" />
|
<el-option
|
||||||
<el-option label="我的" :value="userId" />
|
v-for="item in filterOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input v-model="query.search" placeholder="名称" clearable></el-input>
|
<el-input
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
v-model="query.search"
|
||||||
|
placeholder="名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe @resetQuery="resetQuery">
|
<scTable
|
||||||
<el-table-column label="#" type="index" fixed="left" width="50"></el-table-column>
|
ref="table"
|
||||||
<el-table-column label="名称" prop="name" fixed="left" width="180"></el-table-column>
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
@resetQuery="resetQuery"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
label="#"
|
||||||
|
type="index"
|
||||||
|
fixed="left"
|
||||||
|
width="50"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="名称"
|
||||||
|
prop="name"
|
||||||
|
fixed="left"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
<el-table-column label="项目类型" prop="type" width="180">
|
<el-table-column label="项目类型" prop="type" width="180">
|
||||||
<template #default="scope">{{ type_[scope.row.type] }}
|
<template #default="scope">{{ type_[scope.row.type] }} </template>
|
||||||
</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合同编号" prop="contract_number" width="180"></el-table-column>
|
<el-table-column
|
||||||
<el-table-column label="进厂时间" prop="come_time" width="180"></el-table-column>
|
label="合同编号"
|
||||||
<el-table-column label="离厂时间" prop="leave_time" width="180"></el-table-column>
|
prop="contract_number"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="进厂时间"
|
||||||
|
prop="come_time"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="离厂时间"
|
||||||
|
prop="leave_time"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
<el-table-column label="状态" prop="state" width="100">
|
<el-table-column label="状态" prop="state" width="100">
|
||||||
<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="审批状态" width="200">
|
<el-table-column label="审批状态" width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.ticket_ && scope.row.ticket_.state_"
|
<span
|
||||||
style="margin-right: 5px;">{{ scope.row.ticket_.state_.name }}</span>
|
v-if="scope.row.ticket_ && scope.row.ticket_.state_"
|
||||||
<el-tag v-if="scope.row.ticket_ && scope.row.ticket_.act_state"
|
style="margin-right: 5px"
|
||||||
:type="scope.row.ticket_.act_state === 0 ? '' : scope.row.ticket_.act_state === 1 ? '' : scope.row.ticket_.act_state === 2 ? 'danger' : scope.row.ticket_.act_state === 3 ? 'danger' : scope.row.ticket_.act_state === 5 ? 'danger' : scope.row.ticket_.act_state === 4 ? 'success' : ''">
|
>{{ scope.row.ticket_.state_.name }}</span
|
||||||
|
>
|
||||||
|
<el-tag
|
||||||
|
v-if="scope.row.ticket_ && scope.row.ticket_.act_state"
|
||||||
|
:type="
|
||||||
|
scope.row.ticket_.act_state === 0
|
||||||
|
? ''
|
||||||
|
: scope.row.ticket_.act_state === 1
|
||||||
|
? ''
|
||||||
|
: scope.row.ticket_.act_state === 2
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.ticket_.act_state === 3
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.ticket_.act_state === 5
|
||||||
|
? 'danger'
|
||||||
|
: scope.row.ticket_.act_state === 4
|
||||||
|
? 'success'
|
||||||
|
: ''
|
||||||
|
"
|
||||||
|
>
|
||||||
{{ act_states[scope.row.ticket_.act_state] }}
|
{{ act_states[scope.row.ticket_.act_state] }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="所属部门" prop="belong_dept_name" width="180"></el-table-column>
|
<el-table-column
|
||||||
<el-table-column label="相关方" prop="rparty_name" width="180"></el-table-column>
|
label="所属部门"
|
||||||
<el-table-column label="创建人" prop="create_by" width="180"></el-table-column>
|
prop="belong_dept_name"
|
||||||
<el-table-column label="创建时间" prop="create_time" width="180"></el-table-column>
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="相关方"
|
||||||
|
prop="rparty_name"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="创建人"
|
||||||
|
prop="create_by_name"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="创建时间"
|
||||||
|
prop="create_time"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="180">
|
<el-table-column label="操作" fixed="right" align="center" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button v-if="scope.row.state === 10" link type="primary" size="small"
|
<el-button
|
||||||
@click="next_add(scope.row, scope.$index)" v-auth="'rpj.update'">继续编辑
|
v-if="scope.row.state === 10"
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="next_add(scope.row, scope.$index)"
|
||||||
|
v-auth="'rpj.update'"
|
||||||
|
>继续编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button link type="primary" size="small" @click="table_show(scope.row, scope.$index)">查看
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="table_show(scope.row, scope.$index)"
|
||||||
|
>查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<!--<el-button
|
<!--<el-button
|
||||||
text
|
text
|
||||||
|
|
@ -60,9 +174,14 @@
|
||||||
@click="table_edit(scope.row, scope.$index)"
|
@click="table_edit(scope.row, scope.$index)"
|
||||||
>编辑
|
>编辑
|
||||||
</el-button>-->
|
</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 link type="danger" size="small" v-auth="'rpj.delete'">删除</el-button>
|
<el-button link type="danger" size="small" v-auth="'rpj.delete'"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-popconfirm>
|
</el-popconfirm>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -71,9 +190,18 @@
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
|
||||||
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" @closed="dialog.save = false">
|
<save-dialog
|
||||||
|
v-if="dialog.save"
|
||||||
|
ref="saveDialog"
|
||||||
|
@success="handleSaveSuccess"
|
||||||
|
@closed="dialog.save = false"
|
||||||
|
>
|
||||||
</save-dialog>
|
</save-dialog>
|
||||||
<show-dialog v-if="dialog.show" ref="showDialog" @closed="dialog.show = false"></show-dialog>
|
<show-dialog
|
||||||
|
v-if="dialog.show"
|
||||||
|
ref="showDialog"
|
||||||
|
@closed="dialog.show = false"
|
||||||
|
></show-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./rpj_form.vue";
|
import saveDialog from "./rpj_form.vue";
|
||||||
|
|
@ -96,14 +224,11 @@ export default {
|
||||||
username: "",
|
username: "",
|
||||||
},
|
},
|
||||||
apiObj: this.$API.rpm.rpj.list,
|
apiObj: this.$API.rpm.rpj.list,
|
||||||
query: {
|
query: {},
|
||||||
search: '',
|
userId: "",
|
||||||
create_by: '000'
|
|
||||||
},
|
|
||||||
userId: '',
|
|
||||||
selection: [],
|
selection: [],
|
||||||
search: {
|
search: {
|
||||||
search: '',
|
search: "",
|
||||||
keyword: null,
|
keyword: null,
|
||||||
},
|
},
|
||||||
type_: {
|
type_: {
|
||||||
|
|
@ -112,6 +237,34 @@ export default {
|
||||||
30: "保安保洁服务",
|
30: "保安保洁服务",
|
||||||
40: "其他",
|
40: "其他",
|
||||||
},
|
},
|
||||||
|
timeRange: [],
|
||||||
|
filteType: "all",
|
||||||
|
stateOptions: [
|
||||||
|
{
|
||||||
|
label: "创建中",
|
||||||
|
value: 10,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "审批中",
|
||||||
|
value: 20,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "待入厂",
|
||||||
|
value: 30,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "进行中",
|
||||||
|
value: 40,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "已完成",
|
||||||
|
value: 50,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "已关闭",
|
||||||
|
value: 60,
|
||||||
|
},
|
||||||
|
],
|
||||||
state_: {
|
state_: {
|
||||||
10: "创建中",
|
10: "创建中",
|
||||||
20: "审批中",
|
20: "审批中",
|
||||||
|
|
@ -127,6 +280,17 @@ export default {
|
||||||
4: "已完成",
|
4: "已完成",
|
||||||
5: "已关闭",
|
5: "已关闭",
|
||||||
},
|
},
|
||||||
|
filterType: "all",
|
||||||
|
filterOptions: [
|
||||||
|
{
|
||||||
|
label: "全部",
|
||||||
|
value: "all",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "我创建的",
|
||||||
|
value: "my",
|
||||||
|
},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -199,14 +363,22 @@ export default {
|
||||||
},
|
},
|
||||||
//搜索
|
//搜索
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
let obj = {};
|
if (this.timeRange) {
|
||||||
obj.search = this.query.search;
|
this.query.start_come = this.timeRange[0];
|
||||||
if (this.query.create_by == '000') {
|
this.query.end_come = this.timeRange[1];
|
||||||
obj.create_by = '';
|
|
||||||
} else {
|
} else {
|
||||||
obj.create_by = this.query.create_by;
|
this.query.end_come = null;
|
||||||
|
this.query.start_come = null;
|
||||||
}
|
}
|
||||||
this.$refs.table.queryData(obj);
|
this.$refs.table.queryData(this.query);
|
||||||
|
},
|
||||||
|
handleFilterTypeChange(val) {
|
||||||
|
if (val == "all") {
|
||||||
|
this.query.create_by = null;
|
||||||
|
} else if (val == "my") {
|
||||||
|
this.query.create_by = this.userId;
|
||||||
|
}
|
||||||
|
this.$refs.table.queryData(this.query);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
<el-input v-model="query.search" placeholder="部门名称" clearable></el-input>
|
<el-input v-model="query.search" placeholder="部门名称" clearable @keyup.enter="handleQuery"></el-input>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
<el-input v-model="query.search" placeholder="角色名称" clearable></el-input>
|
<el-input v-model="query.search" placeholder="角色名称" clearable @keyup.enter="handleQuery"></el-input>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
<el-input v-model="query.search" placeholder="登录账号 / 姓名" clearable></el-input>
|
<el-input v-model="query.search" placeholder="登录账号/姓名" clearable @keyup.enter="handleQuery"></el-input>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
<el-input v-model="query.search" placeholder="部门名称"></el-input>
|
<el-input v-model="query.search" placeholder="部门名称" @keyup.enter="handleQuery"></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
<el-input v-model="query.search" placeholder="角色名称" clearable></el-input>
|
<el-input v-model="query.search" placeholder="角色名称" clearable @keyup.enter="handleQuery"></el-input>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,12 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="名称"
|
placeholder="名称"
|
||||||
clearable
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,9 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="姓名/手机号"
|
placeholder="姓名/手机号"
|
||||||
clearable
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button type="primary" icon="el-icon-search"></el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="工作流名称"
|
placeholder="工作流名称"
|
||||||
clearable
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue