增加回车检索

This commit is contained in:
曹前明 2022-09-07 10:17:12 +08:00
parent 8fca5caaa8
commit 38a3d10117
23 changed files with 742 additions and 431 deletions

View File

@ -62,7 +62,7 @@
v-model="query.search"
placeholder="姓名"
clearable
@click="handleQuery"
@keyup.enter="handleQuery"
></el-input>
<el-button
type="primary"

View File

@ -180,6 +180,7 @@ export default {
handleBindBlt(type, row) {
this.dis = false;
this.form.blt = row.id;
this.form.code = row.code;
this.bindBltMac = row.code;
this.form.type = type;
if (type === 20) {
@ -189,13 +190,15 @@ export default {
this.showBindBlt = true;
},
submitBindBlt() {
let that = this;
that.$API.third.tdevice.bltBind.req(this.form).then((res) => {
if (res.err_msg) {
} else {
that.showBindBlt = false;
let that = this
let form = {
code: this.form.code,
type: this.form.type,
employee: this.form.employee
}
that.$API.third.tdevice.bltBind.req(form).then((res) => {
this.showBindBlt = false;
that.$refs.table.refresh();
}
});
},
},

View File

@ -15,7 +15,7 @@
v-model="query.search"
placeholder="编号"
clearable
@click="handleQuery"
@keyup.enter="handleQuery"
></el-input>
<el-button
type="primary"

View File

@ -1,6 +1,6 @@
<template>
<el-container>
<el-header>
<!-- <el-header>
<div class="left-panel">
<el-select
v-model="query.cates"
@ -42,7 +42,7 @@
/>
</div>
<div class="right-panel"></div>
</el-header>
</el-header> -->
<el-main class="nopadding">
<scTable
ref="table"
@ -148,8 +148,8 @@ export default {
};
},
created() {
this.getCateOptions();
this.getAreaOptions();
// this.getCateOptions();
// this.getAreaOptions();
},
methods: {
getCateOptions() {

View File

@ -124,6 +124,7 @@ export default {
dutyAgg: [],
//
ep_count_type: "2",
countIndex: "2",
userCount: {
total: 0,
count_employee: 0, //

View File

@ -18,12 +18,12 @@
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>

View File

@ -18,12 +18,12 @@
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>

View File

@ -7,12 +7,12 @@
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>

View File

@ -18,7 +18,7 @@
v-model="query.search"
placeholder="姓名/手机号"
clearable
@click="handleQuery"
@keyup.enter="handleQuery"
></el-input>
<el-button
type="primary"

View File

@ -1,224 +1,355 @@
<template>
<el-container>
<el-header>
<div class="left-panel">
<el-button type="primary" icon="el-icon-plus" @click="add" v-auth="'operation.create'"></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> -->
</div>
<div class="right-panel">
<div class="right-panel-search">
<el-select v-model="query.create_by">
<el-option label="全部" value="000" />
<el-option label="我的" :value="userId" />
</el-select>
<el-input v-model="query.search" placeholder="名称" clearable @click="handleQuery"></el-input>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
</div>
</div>
</el-header>
<el-main class="nopadding">
<scTable ref="tableoperation" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" stripe
@resetQuery="resetQuery">
<!-- <el-table-column
<el-container>
<el-header>
<div class="left-panel">
<el-button
type="primary"
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 class="right-panel">
<el-select @change="handleFilterTypeChange" v-model="filterType">
<el-option
v-for="item in filterOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<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>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="tableoperation"
:apiObj="apiObj"
row-key="id"
@selection-change="selectionChange"
stripe
@resetQuery="resetQuery"
>
<!-- <el-table-column
label="#"
type="index"
width="50"
></el-table-column> -->
<el-table-column label="许可证" prop="opls" width="160">
<template #default="scope">
<el-tag v-for="item in scope.row.cates_" :key="item.id" style="margin-right:2px">{{ item.name }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="作业简介" prop="name" width="200"></el-table-column>
<el-table-column label="作业状态" prop="state">
<template #default="scope">{{ stateoptions[scope.row.state] }}</template>
</el-table-column>
<el-table-column label="生产状态" prop="state_work"></el-table-column>
<el-table-column label="作业区域"><template #default="scope">
{{ scope.row.area_.name }}
</template>
</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="dept_ter"><template #default="scope">
{{ scope.row.dept_ter_.name }}
</template></el-table-column>
<el-table-column label="业务部门" prop="dept_bus"><template #default="scope">
{{ scope.row.dept_bus_.name }}
</template></el-table-column>
<el-table-column label="创建人" prop="create_by"><template #default="scope">
{{ scope.row.create_by_.name }}
</template></el-table-column>
<el-table-column label="创建时间" prop="create_time"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="180">
<template #default="scope">
<el-button link type="primary" size="small" v-auth="'operation.update'"
@click="creatopl(scope.row)">许可证
</el-button>
<el-button link type="primary" size="small" @click="table_show(scope.row, scope.$index)">查看
</el-button>
<el-button 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 link type="danger" size="small" v-if="scope.row.state === 10"
v-auth="'operation.delete'" @click="table_del(scope.row)">删除
</el-button>
</template>
</el-table-column>
</scTable>
</el-main>
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" @closed="dialog.save = false">
</save-dialog>
</el-container>
<el-table-column label="许可证" prop="opls" width="160">
<template #default="scope">
<el-tag
v-for="item in scope.row.cates_"
:key="item.id"
style="margin-right: 2px"
>{{ item.name }}
</el-tag>
</template>
</el-table-column>
<el-table-column
label="作业简介"
prop="name"
width="200"
></el-table-column>
<el-table-column label="作业状态" prop="state">
<template #default="scope">{{
stateoptions[scope.row.state]
}}</template>
</el-table-column>
<el-table-column label="生产状态" prop="state_work"></el-table-column>
<el-table-column label="作业区域"
><template #default="scope">
{{ scope.row.area_.name }}
</template>
</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="dept_ter"
><template #default="scope">
{{ scope.row.dept_ter_.name }}
</template></el-table-column
>
<el-table-column label="业务部门" prop="dept_bus"
><template #default="scope">
{{ scope.row.dept_bus_.name }}
</template></el-table-column
>
<el-table-column label="创建人" prop="create_by"
><template #default="scope">
{{ scope.row.create_by_.name }}
</template></el-table-column
>
<el-table-column label="创建时间" prop="create_time"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="180">
<template #default="scope">
<el-button
link
type="primary"
size="small"
v-auth="'operation.update'"
@click="creatopl(scope.row)"
>许可证
</el-button>
<el-button
link
type="primary"
size="small"
@click="table_show(scope.row, scope.$index)"
>查看
</el-button>
<el-button
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
link
type="danger"
size="small"
v-if="scope.row.state === 10"
v-auth="'operation.delete'"
@click="table_del(scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</scTable>
</el-main>
<save-dialog
v-if="dialog.save"
ref="saveDialog"
@success="handleSaveSuccess"
@closed="dialog.save = false"
>
</save-dialog>
</el-container>
</template>
<script>
import saveDialog from "./operation_form.vue";
export default {
name: "operation",
components: {
saveDialog,
},
data() {
return {
dialog: {
save: false,
permission: false,
},
apiObj: this.$API.opm.operation.list,
query: {
search: '',
create_by: '000',
},
selection: [],
search: {
keyword: null,
},
stateoptions: {
10: "创建中",
20: "审批中",
30: "待作业",
40: "作业中",
50: "已结束",
},
userId: '',
};
},
mounted() {
let userInfo = this.$TOOL.data.get("USER_INFO");
this.userId = userInfo.id;
},
methods: {
name: "operation",
components: {
saveDialog,
},
data() {
return {
dialog: {
save: false,
permission: false,
},
apiObj: this.$API.opm.operation.list,
query: {},
filterType: "all",
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: [],
search: {
keyword: null,
},
stateoptions: {
10: "创建中",
20: "审批中",
30: "待作业",
40: "作业中",
50: "已结束",
},
userId: "",
};
},
mounted() {
let userInfo = this.$TOOL.data.get("USER_INFO");
this.userId = userInfo.id;
},
methods: {
//
add() {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("add");
});
},
//
add() {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("add");
});
},
//
table_edit(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("edit").setData(row);
});
},
//
table_show(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("show").setData(row);
});
},
//
creatopl(row) {
this.$router.push({
name: "opl",
query: {
id: row.id,
},
});
},
//
permission() {
this.dialog.permission = true;
this.$nextTick(() => {
this.$refs.permissionDialog.open();
});
},
//
table_edit(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("edit").setData(row);
});
},
//
table_show(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("show").setData(row);
});
},
//
creatopl(row) {
this.$router.push({
name: "opl",
query: {
id: row.id,
},
});
},
//
permission() {
this.dialog.permission = true;
this.$nextTick(() => {
this.$refs.permissionDialog.open();
});
},
//
table_del(row) {
this.$API.opm.operation.delete
.req(row.id)
.then((res) => {
this.$message.success("删除成功");
this.$refs.tableoperation.refresh();
return res;
})
.catch((err) => {
return err;
});
},
//
table_del(row) {
this.$API.opm.operation.delete
.req(row.id)
.then((res) => {
this.$message.success("删除成功");
this.$refs.tableoperation.refresh();
return res;
})
.catch((err) => {
return err;
});
},
//
selectionChange(selection) {
this.selection = selection;
},
//
changeSwitch(val, row) {
row.status = row.status == "1" ? "0" : "1";
row.$switch_status = true;
setTimeout(() => {
delete row.$switch_status;
row.status = val;
this.$message.success("操作成功");
}, 500);
},
//
handleQuery() {
let obj = {};
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;
}
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
filterTree(id) {
var target = null;
function filter(tree) {
tree.forEach((item) => {
if (item.id == id) {
target = item;
}
if (item.children) {
filter(item.children);
}
});
}
//
selectionChange(selection) {
this.selection = selection;
},
//
changeSwitch(val, row) {
row.status = row.status == "1" ? "0" : "1";
row.$switch_status = true;
setTimeout(() => {
delete row.$switch_status;
row.status = val;
this.$message.success("操作成功");
}, 500);
},
//
handleQuery() {
let obj = {};
obj.search = this.query.search;
if (this.query.create_by == '000') {
obj.create_by = '';
} else {
obj.create_by = this.query.create_by;
}
this.$refs.tableoperation.queryData(obj);
},
//ID
filterTree(id) {
var target = null;
function filter(tree) {
tree.forEach((item) => {
if (item.id == id) {
target = item;
}
if (item.children) {
filter(item.children);
}
});
}
filter(this.$refs.tableoperation.tableData);
return target;
},
//
handleSaveSuccess(data, mode) {
if (mode == "add") {
this.$refs.tableoperation.refresh();
} else if (mode == "edit") {
this.$refs.tableoperation.refresh();
}
},
resetQuery() {
this.query = {};
},
},
filter(this.$refs.tableoperation.tableData);
return target;
},
//
handleSaveSuccess(data, mode) {
if (mode == "add") {
this.$refs.tableoperation.refresh();
} else if (mode == "edit") {
this.$refs.tableoperation.refresh();
}
},
resetQuery() {
this.query = {};
},
},
};
</script>

View File

@ -8,7 +8,7 @@
</div>
<div class="right-panel">
<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>
</div>
</div>

View File

@ -18,7 +18,7 @@
v-model="query.search"
placeholder="编号/名称"
clearable
@click="handleQuery"
@keyup.enter="handleQuery"
></el-input>
<el-button
type="primary"

View File

@ -12,7 +12,7 @@
v-model="query.search"
placeholder="姓名"
clearable
@keyup.enter="handleQuery"
></el-input>
<el-button
type="primary"

View File

@ -12,12 +12,12 @@
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>

View File

@ -1,213 +1,385 @@
<template>
<el-container>
<el-header>
<div class="left-panel">
<el-button type="primary" icon="el-icon-plus" @click="add" v-auth="'rpj.create'"></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> -->
</div>
<div class="right-panel">
<div class="right-panel-search">
<el-select v-model="query.create_by">
<el-option label="全部" value="000" />
<el-option label="我的" :value="userId" />
</el-select>
<el-input v-model="query.search" 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 @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">
<template #default="scope">{{ type_[scope.row.type] }}
</template>
</el-table-column>
<el-table-column label="合同编号" 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">
<template #default="scope">{{ state_[scope.row.state] }}</template>
</el-table-column>
<el-table-column label="审批状态" width="200">
<template #default="scope">
<span v-if="scope.row.ticket_ && scope.row.ticket_.state_"
style="margin-right: 5px;">{{ 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] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="所属部门" prop="belong_dept_name" width="180"></el-table-column>
<el-table-column label="相关方" prop="rparty_name" width="180"></el-table-column>
<el-table-column label="创建人" prop="create_by" 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">
<template #default="scope">
<el-button 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-container>
<el-header>
<div class="left-panel">
<el-button
type="primary"
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 class="right-panel">
<div class="right-panel-search">
<el-select @change="handleFilterTypeChange" v-model="filterType">
<el-option
v-for="item in filterOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<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>
</div>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
: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">
<template #default="scope">{{ type_[scope.row.type] }} </template>
</el-table-column>
<el-table-column
label="合同编号"
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">
<template #default="scope">{{ state_[scope.row.state] }}</template>
</el-table-column>
<el-table-column label="审批状态" width="200">
<template #default="scope">
<span
v-if="scope.row.ticket_ && scope.row.ticket_.state_"
style="margin-right: 5px"
>{{ 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] }}
</el-tag>
</template>
</el-table-column>
<el-table-column
label="所属部门"
prop="belong_dept_name"
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">
<template #default="scope">
<el-button
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 link type="primary" size="small" @click="table_show(scope.row, scope.$index)">查看
</el-button>
<!--<el-button
<el-button
link
type="primary"
size="small"
@click="table_show(scope.row, scope.$index)"
>查看
</el-button>
<!--<el-button
text
type="warning"
size="small"
@click="table_edit(scope.row, scope.$index)"
>编辑
</el-button>-->
<el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
<template #reference>
<el-button link type="danger" size="small" v-auth="'rpj.delete'">删除</el-button>
</template>
</el-popconfirm>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
<el-popconfirm
title="确定删除吗?"
@confirm="table_del(scope.row, scope.$index)"
>
<template #reference>
<el-button link type="danger" size="small" v-auth="'rpj.delete'"
>删除</el-button
>
</template>
</el-popconfirm>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" @closed="dialog.save = false">
</save-dialog>
<show-dialog v-if="dialog.show" ref="showDialog" @closed="dialog.show = false"></show-dialog>
<save-dialog
v-if="dialog.save"
ref="saveDialog"
@success="handleSaveSuccess"
@closed="dialog.save = false"
>
</save-dialog>
<show-dialog
v-if="dialog.show"
ref="showDialog"
@closed="dialog.show = false"
></show-dialog>
</template>
<script>
import saveDialog from "./rpj_form.vue";
import showDialog from "./rpj_show.vue";
export default {
name: "remployee",
components: {
saveDialog,
showDialog,
},
data() {
return {
dialog: {
save: false,
show: false,
permission: false,
},
adminform: {
username: "",
},
apiObj: this.$API.rpm.rpj.list,
query: {
search: '',
create_by: '000'
},
userId: '',
selection: [],
search: {
search: '',
keyword: null,
},
type_: {
10: "建筑施工",
20: "设备设施检维修",
30: "保安保洁服务",
40: "其他",
},
state_: {
10: "创建中",
20: "审批中",
30: "待入厂",
40: "进行中",
50: "已完成",
},
act_states: {
0: "草稿中",
1: "进行中",
2: "被退回",
3: "被撤回",
4: "已完成",
5: "已关闭",
},
};
},
mounted() {
let userInfo = this.$TOOL.data.get("USER_INFO");
this.userId = userInfo.id;
},
methods: {
//
add() {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("add");
});
},
//
table_edit(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("edit").setData(row);
});
},
//
table_show(row) {
// debugger;
this.dialog.show = true;
this.$nextTick(() => {
this.$refs.showDialog.open().setData(row);
});
},
name: "remployee",
components: {
saveDialog,
showDialog,
},
data() {
return {
dialog: {
save: false,
show: false,
permission: false,
},
adminform: {
username: "",
},
apiObj: this.$API.rpm.rpj.list,
query: {},
userId: "",
selection: [],
search: {
search: "",
keyword: null,
},
type_: {
10: "建筑施工",
20: "设备设施检维修",
30: "保安保洁服务",
40: "其他",
},
timeRange: [],
filteType: "all",
stateOptions: [
{
label: "创建中",
value: 10,
},
{
label: "审批中",
value: 20,
},
{
label: "待入厂",
value: 30,
},
{
label: "进行中",
value: 40,
},
{
label: "已完成",
value: 50,
},
{
label: "已关闭",
value: 60,
},
],
state_: {
10: "创建中",
20: "审批中",
30: "待入厂",
40: "进行中",
50: "已完成",
},
act_states: {
0: "草稿中",
1: "进行中",
2: "被退回",
3: "被撤回",
4: "已完成",
5: "已关闭",
},
filterType: "all",
filterOptions: [
{
label: "全部",
value: "all",
},
{
label: "我创建的",
value: "my",
},
],
};
},
mounted() {
let userInfo = this.$TOOL.data.get("USER_INFO");
this.userId = userInfo.id;
},
methods: {
//
add() {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("add");
});
},
//
table_edit(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("edit").setData(row);
});
},
//
table_show(row) {
// debugger;
this.dialog.show = true;
this.$nextTick(() => {
this.$refs.showDialog.open().setData(row);
});
},
//
permission() {
this.dialog.permission = true;
this.$nextTick(() => {
this.$refs.permissionDialog.open();
});
},
//
async table_del(row) {
this.$API.rpm.rpj.delete
.req(row.id)
.then((res) => {
this.$message.success("删除成功");
//
permission() {
this.dialog.permission = true;
this.$nextTick(() => {
this.$refs.permissionDialog.open();
});
},
//
async table_del(row) {
this.$API.rpm.rpj.delete
.req(row.id)
.then((res) => {
this.$message.success("删除成功");
return res;
})
.catch((err) => {
return err;
});
},
next_add(row) {
this.$router.push({
name: "rpjadd",
query: {
rpjid: row.id, //id
},
});
},
return res;
})
.catch((err) => {
return err;
});
},
next_add(row) {
this.$router.push({
name: "rpjadd",
query: {
rpjid: row.id, //id
},
});
},
//
handleSaveSuccess(data, mode) {
if (mode == "add") {
this.$refs.table.refresh();
} else if (mode == "edit") {
this.$refs.table.refresh();
}
},
resetQuery() {
this.query = {};
},
//
handleQuery() {
let obj = {};
obj.search = this.query.search;
if (this.query.create_by == '000') {
obj.create_by = '';
} else {
obj.create_by = this.query.create_by;
}
this.$refs.table.queryData(obj);
},
},
//
handleSaveSuccess(data, mode) {
if (mode == "add") {
this.$refs.table.refresh();
} else if (mode == "edit") {
this.$refs.table.refresh();
}
},
resetQuery() {
this.query = {};
},
//
handleQuery() {
if (this.timeRange) {
this.query.start_come = this.timeRange[0];
this.query.end_come = this.timeRange[1];
} else {
this.query.end_come = null;
this.query.start_come = null;
}
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);
},
},
};
</script>

View File

@ -7,7 +7,7 @@
</div>
<div class="right-panel">
<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>
</div>
</div>

View File

@ -8,7 +8,7 @@
</div>
<div class="right-panel">
<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>
</div>
</div>

View File

@ -20,7 +20,7 @@
</div>
<div class="right-panel">
<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>
</div>
</div>

View File

@ -19,7 +19,7 @@
</div>
<div class="right-panel">
<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
type="primary"
icon="el-icon-search"

View File

@ -8,7 +8,7 @@
</div>
<div class="right-panel">
<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>
</div>
</div>

View File

@ -10,10 +10,12 @@
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>

View File

@ -18,8 +18,9 @@
v-model="query.search"
placeholder="姓名/手机号"
clearable
@keyup.enter="handleQuery"
></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>
</el-header>

View File

@ -17,6 +17,7 @@
v-model="query.search"
placeholder="工作流名称"
clearable
@keyup.enter="handleQuery"
></el-input>
<el-button
type="primary"