This commit is contained in:
shijing 2022-09-08 10:50:57 +07:00
commit 1ed6787310
31 changed files with 1753 additions and 1098 deletions

View File

@ -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"

View File

@ -164,7 +164,7 @@ export default {
// //
async syncData() { async syncData() {
this.syncLoading = true; this.syncLoading = true;
var res = await this.$API.third.tdevice.vchannelSync.req({}); var res = await this.$API.third.tdevice.bltSync.req({});
this.$refs.table.refresh(); this.$refs.table.refresh();
this.syncLoading = false; this.syncLoading = false;
}, },
@ -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();
}); });
}, },
}, },

View File

@ -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"

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

@ -2,13 +2,46 @@
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<el-select v-model="query.cates" placeholder="事件种类" @change="handleQuery"> <el-select
<el-option v-for="item in cateOptions" :key="item.id">{{item.name}}</el-option> v-model="query.cates"
placeholder="事件种类"
@change="handleQuery"
clearable
>
<el-option
v-for="item in cateOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select> </el-select>
<el-select
v-model="query.area"
placeholder="发生区域"
@change="handleQuery"
style="margin-left:2px"
clearable
>
<el-option
v-for="item in areaOptions"
: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> </div>
<div class="right-panel"> <div class="right-panel"></div>
</div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<scTable <scTable
@ -22,8 +55,12 @@
<el-table-column label="#" type="index" width="50"></el-table-column> <el-table-column label="#" type="index" width="50"></el-table-column>
<el-table-column label="事件种类" width="200"> <el-table-column label="事件种类" width="200">
<template #default="scope"> <template #default="scope">
<el-tag v-for="item in scope.row.cates_" <el-tag
:key="item.id" type="warning">{{item.name}}</el-tag> v-for="item in scope.row.cates_"
:key="item.id"
type="warning"
>{{ item.name }}</el-tag
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="发生区域" prop="area_.name"></el-table-column> <el-table-column label="发生区域" prop="area_.name"></el-table-column>
@ -63,7 +100,11 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="发生时间" prop="create_time" width="150"></el-table-column> <el-table-column
label="发生时间"
prop="create_time"
width="150"
></el-table-column>
<el-table-column <el-table-column
label="处理人" label="处理人"
@ -91,14 +132,16 @@
type="info" type="info"
size="small" size="small"
@click="table_show(scope.row, scope.$index)" @click="table_show(scope.row, scope.$index)"
>查看</el-button> >查看</el-button
>
<el-button <el-button
link link
type="primary" type="primary"
size="small" size="small"
v-if="scope.row.handle_user == null" v-if="scope.row.handle_user == null"
@click="table_handle(scope.row, scope.$index)" @click="table_handle(scope.row, scope.$index)"
>处理</el-button> >处理</el-button
>
<!-- <el-button text type="warning" size="small" @click="table_edit(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)"> <!-- <el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
<template #reference> <template #reference>
@ -110,7 +153,6 @@
</scTable> </scTable>
</el-main> </el-main>
</el-container> </el-container>
</template> </template>
<script> <script>
import { CircleCheckFilled, CircleCloseFilled } from "@element-plus/icons-vue"; import { CircleCheckFilled, CircleCloseFilled } from "@element-plus/icons-vue";
@ -119,10 +161,13 @@ export default {
components: { components: {
CircleCheckFilled, CircleCheckFilled,
CircleCloseFilled, CircleCloseFilled,
}, },
data() { data() {
return { return {
defaultTime: ['00:00:00', '23:59:59'],
timeRange: [],
cateOptions: [],
areaOptions: [],
dialog: { dialog: {
save: false, save: false,
permission: false, permission: false,
@ -135,6 +180,10 @@ export default {
}, },
}; };
}, },
created() {
this.getCateOptions();
this.getAreaOptions();
},
methods: { methods: {
// //
table_show(row) { table_show(row) {
@ -145,20 +194,40 @@ export default {
}, },
}); });
}, },
getCateOptions() {
this.$API.ecm.event_cate.list.req({ page: 0 }).then((res) => {
this.cateOptions = res;
});
},
getAreaOptions() {
this.$API.am.area.list.req({page: 0}).then(res=>{
this.areaOptions = res;
})
},
// //
table_handle(row) { table_handle(row) {
this.$router.push({ this.$router.push({
name: "eventhandlefrom", name: "eventhandlefrom",
query: { query: {
id: row.id, id: row.id,
}, },
}); });
}, },
// //
handleQuery() { handleQuery() {
this.$refs.table.queryData(this.query) 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.table.queryData(this.query);
}, },
// //

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

@ -2,16 +2,46 @@
<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"></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.cates"
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button> placeholder="事件种类"
</div> @change="handleQuery"
<div class="right-panel"> clearable
<div class="right-panel-search"> >
<el-input v-model="search.keyword" placeholder="姓名/手机号" clearable @click="handleQuery"></el-input> <el-option
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button> v-for="item in cateOptions"
</div> :key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
<el-select
v-model="query.area"
placeholder="发生区域"
@change="handleQuery"
style="margin-left:2px"
clearable
>
<el-option
v-for="item in areaOptions"
: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> </div>
<div class="right-panel"></div>
</el-header> --> </el-header> -->
<el-main class="nopadding"> <el-main class="nopadding">
<scTable <scTable
@ -102,6 +132,9 @@ export default {
}, },
data() { data() {
return { return {
timeRange: [],
cateOptions: [],
areaOptions: [],
dialog: { dialog: {
save: false, save: false,
permission: false, permission: false,
@ -114,8 +147,21 @@ export default {
}, },
}; };
}, },
created() {
// this.getCateOptions();
// this.getAreaOptions();
},
methods: { methods: {
getCateOptions() {
this.$API.ecm.event_cate.list.req({ page: 0 }).then((res) => {
this.cateOptions = res;
});
},
getAreaOptions() {
this.$API.am.area.list.req({page: 0}).then(res=>{
this.areaOptions = res;
})
},
// //
table_show(row) { table_show(row) {
this.$router.push({ this.$router.push({

View File

@ -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, //

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

@ -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>

View File

@ -1,18 +1,31 @@
<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
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>
@ -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">
@ -18,7 +23,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"
@ -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

@ -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) {

View File

@ -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>

View File

@ -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"

View File

@ -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"

View File

@ -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>

View File

@ -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);
}, },
}, },
}; };

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

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

View File

@ -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>

View File

@ -34,19 +34,20 @@
v-auth="'user.create'" v-auth="'user.create'"
@click="add" @click="add"
></el-button> ></el-button>
<!-- <el-button <el-select
type="danger" v-model="query.type"
plain placeholder="账号类型"
icon="el-icon-delete" @change="handleQuery"
:disabled="selection.length == 0" clearable
@click="batch_del" style="margin-left: 2px"
></el-button> --> >
<!-- <el-button <el-option
type="primary" v-for="item in userTypeOptions2"
plain :key="item.value"
:disabled="selection.length == 0" :label="item.label"
>密码重置 :value="item.value"
</el-button> --> ></el-option>
</el-select>
</div> </div>
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
@ -73,32 +74,36 @@
remoteFilter remoteFilter
@selection-change="selectionChange" @selection-change="selectionChange"
> >
<!-- <el-table-column <el-table-column
type="selection" type="index"
width="50" width="50"
></el-table-column> --> ></el-table-column>
<el-table-column label="ID" prop="id" width="160"></el-table-column> <!-- <el-table-column label="ID" prop="id" width="160"></el-table-column> -->
<el-table-column label="姓名" prop="name"></el-table-column> <el-table-column label="姓名" prop="name"></el-table-column>
<el-table-column label="登录账号" prop="username"></el-table-column> <el-table-column label="登录账号" prop="username" width="140"></el-table-column>
<el-table-column label="是否启用" prop="is_active"> <el-table-column label="是否启用" prop="is_active">
<template #default="scope"> <template #default="scope">
<el-tag type="success" v-if="scope.row.is_active">启用</el-tag> <el-tag type="success" v-if="scope.row.is_active">启用</el-tag>
<el-tag v-else type="danger">禁用</el-tag> <el-tag v-else type="danger">禁用</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="微信通知" width="80"> <!-- <el-table-column label="微信通知" width="80">
<template #default="scope"> <template #default="scope">
<el-icon v-if="scope.row.wx_openid" color="green" <el-icon v-if="scope.row.wx_openid" color="green"
><CircleCheckFilled ><CircleCheckFilled
/></el-icon> /></el-icon>
<el-icon v-else color="red"><CircleCloseFilled /></el-icon> <el-icon v-else color="red"><CircleCloseFilled /></el-icon>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column label="账号类型" prop="type"> <el-table-column label="账号类型" prop="type">
<template #default="scope"> <template #default="scope">
<span>{{userTypeOptions[scope.row.type]}}</span> <span>{{userTypeOptions[scope.row.type]}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="部门" prop="belong_dept_name">
</el-table-column>
<el-table-column label="岗位" prop="post_name">
</el-table-column>
<!-- <el-table-column label="小程序" width="80"> <!-- <el-table-column label="小程序" width="80">
<template #default="scope"> <template #default="scope">
<el-icon v-if="scope.row.wxmp_openid" color="green" <el-icon v-if="scope.row.wxmp_openid" color="green"
@ -168,6 +173,16 @@
label-width="100px" label-width="100px"
label-position="left" label-position="left"
> >
<el-form-item label="账户类型:" prop="type">
<el-select v-model="addForm.type" placeholder="账号类型">
<el-option
v-for="item in userTypeOptions2"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="登录账号" prop="username"> <el-form-item label="登录账号" prop="username">
<el-input <el-input
v-model="addForm.username" v-model="addForm.username"
@ -240,19 +255,19 @@ export default {
}, },
// //
addForm: { addForm: {
id: "",
username: "", username: "",
name: "", name: "",
// email: "", // email: "",
phone: "", phone: null,
// belong_dept: [], // belong_dept: [],
is_active: true, is_active: true,
type: "employee"
}, },
// //
rules: { rules: {
username: [{ required: true, message: "请输入登录账号" }], username: [{ required: true, message: "请输入登录账号" }],
name: [{ required: true, message: "请输入真实姓名" }], name: [{ required: true, message: "请输入真实姓名" }],
group: [{ required: true, message: "请选择所属角色" }], type: [{ required: true, message: "请选择所属账号类型" }],
}, },
// //
groups: [], groups: [],
@ -283,6 +298,12 @@ export default {
'visitor': '访客', 'visitor': '访客',
'driver':'司机' 'driver':'司机'
}, },
userTypeOptions2: [
{label:"正式员工", value:"employee"},
{label:"相关方", value:"remployee"},
{label:"访客", value:"visitor"},
{label:"货车司机", value:"driver"}
],
idArr: [] idArr: []
}; };
}, },
@ -326,6 +347,7 @@ export default {
this.addForm.username = row.username; this.addForm.username = row.username;
this.addForm.phone = row.phone; this.addForm.phone = row.phone;
this.addForm.is_active = row.is_active; this.addForm.is_active = row.is_active;
this.addForm.type = row.type;
}, },
formSetting(row) { formSetting(row) {
this.dialog.save = true; this.dialog.save = true;

View File

@ -39,7 +39,11 @@
</el-row> </el-row>
</el-form> </el-form>
<!--drag-sort --> <!--drag-sort -->
<sc-form-table v-model="userPostForm.list" :addTemplate="addTemplate" placeholder="暂无数据"> <sc-form-table
v-model="userPostForm.list"
:addTemplate="addTemplate"
placeholder="暂无数据"
>
<!-- <el-table-column prop="val" label="名称" min-width="150"> <!-- <el-table-column prop="val" label="名称" min-width="150">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.id">{{scope.row.name}}</span> <span v-if="scope.row.id">{{scope.row.name}}</span>
@ -49,12 +53,18 @@
<el-table-column prop="val" label="排序" min-width="80"> <el-table-column prop="val" label="排序" min-width="80">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.id">{{ scope.row.sort }}</span> <span v-if="scope.row.id">{{ scope.row.sort }}</span>
<el-input v-else v-model="scope.row.sort" placeholder="请输入内容"></el-input> <el-input
v-else
v-model="scope.row.sort"
placeholder="请输入内容"
></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="time" label="部门" min-width="150"> <el-table-column prop="time" label="部门" min-width="150">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.id&&scope.row.dept_">{{scope.row.dept_.name}}</span> <span v-if="scope.row.id && scope.row.dept_">{{
scope.row.dept_.name
}}</span>
<el-cascader <el-cascader
v-else v-else
v-model="scope.row.dept" v-model="scope.row.dept"
@ -70,15 +80,39 @@
<el-table-column prop="type" label="岗位" min-width="150"> <el-table-column prop="type" label="岗位" min-width="150">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.id">{{ scope.row.post_.name }}</span> <span v-if="scope.row.id">{{ scope.row.post_.name }}</span>
<el-select v-else v-model="scope.row.post" filterable placeholder="请选择所在岗位"> <el-select
<el-option v-for="item in postOptions" :key="item.id" :label="item.name" :value="item.id"></el-option> v-else
v-model="scope.row.post"
filterable
placeholder="请选择所在岗位"
>
<el-option
v-for="item in postOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="open" label="操作" width="80" align="center"> <el-table-column prop="open" label="操作" width="80" align="center">
<template #default="scope"> <template #default="scope">
<el-button v-if="scope.row.id" text type="danger" size="small" @click="userPostDel(scope.row.id)">删除</el-button> <el-button
<el-button v-else text type="primary" size="small" @click="createUserPost(scope.row)">添加</el-button> v-if="scope.row.id"
text
type="danger"
size="small"
@click="userPostDel(scope.row.id)"
>删除</el-button
>
<el-button
v-else
text
type="primary"
size="small"
@click="createUserPost(scope.row)"
>添加</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</sc-form-table> </sc-form-table>
@ -94,15 +128,15 @@
data() { data() {
return { return {
addTemplate: { addTemplate: {
name: '', name: "",
sort: '', sort: "",
user: '', user: "",
post: "", post: "",
dept: "", dept: "",
}, },
userPostForm: { userPostForm: {
title: "用户/岗位关系", title: "用户/岗位关系",
list: [] list: [],
}, },
loading: false, loading: false,
job_states: { true: "启用", false: "禁用" }, job_states: { true: "启用", false: "禁用" },
@ -135,17 +169,16 @@
mounted() { mounted() {
this.getPosts(); this.getPosts();
this.getGroup(); this.getGroup();
}, },
methods: { methods: {
getPosts() { getPosts() {
this.$API.system.post.list.req({page:0}).then(res=>{ this.$API.system.post.list.req({ page: 0 }).then((res) => {
if (res.err_msg) { if (res.err_msg) {
this.$message.error(res.err_msg) this.$message.error(res.err_msg);
} else { } else {
this.postOptions = res; this.postOptions = res;
} }
}) });
}, },
// //
async getGroup() { async getGroup() {
@ -166,7 +199,7 @@
}, },
closeDrawer() { closeDrawer() {
this.visible = false; this.visible = false;
this.$emit('closed'); this.$emit("closed");
}, },
handleChange(value) { handleChange(value) {
debugger; debugger;
@ -185,9 +218,9 @@
debugger; debugger;
console.log(this.form.id); console.log(this.form.id);
let obj = { user: this.form.id, page: 0 }; let obj = { user: this.form.id, page: 0 };
this.$API.system.userPost.list.req(obj).then(res=>{ this.$API.system.userPost.list.req(obj).then((res) => {
this.userPostForm.list = res; this.userPostForm.list = res;
}) });
}, },
// //
createUserPost(row) { createUserPost(row) {
@ -195,26 +228,24 @@
console.log(row); console.log(row);
this.isSaveing = true; this.isSaveing = true;
row.user = this.form.id; row.user = this.form.id;
this.$API.system.userPost.create.req(row).then(res=>{ this.$API.system.userPost.create.req(row).then((res) => {
this.getUserPostList(); this.getUserPostList();
this.$message.success("操作成功"); this.$message.success("操作成功");
}) });
}, },
// //
userPostDel(id) { userPostDel(id) {
this.$confirm(`确定删除该岗位关系吗?`, '提示', { this.$confirm(`确定删除该岗位关系吗?`, "提示", {
type: 'warning', type: "warning",
confirmButtonText: '删除', confirmButtonText: "删除",
confirmButtonClass: 'el-button--danger' confirmButtonClass: "el-button--danger",
}).then(() => { }).then(() => {
this.$API.system.userPost.delete.req(id).then(res=>{ this.$API.system.userPost.delete.req(id).then((res) => {
this.getUserPostList(); this.getUserPostList();
this.$message.success("操作成功"); this.$message.success("操作成功");
});
}) });
})
}, },
}, },
}; };
</script> </script>

View File

@ -2,7 +2,37 @@
<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="'visit.create'"></el-button> <el-button
type="primary"
icon="el-icon-plus"
@click="add"
v-auth="'visit.create'"
></el-button>
<el-select
v-model="query.purpose"
placeholder="来访事由"
@change="handleQuery"
clearable
style="margin-left: 2px"
>
<el-option
v-for="item in purposeOptions"
: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">
@ -10,10 +40,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>
@ -35,7 +67,9 @@
></el-table-column> ></el-table-column>
<el-table-column label="来访事由" prop="state" width="180" fixed="left"> <el-table-column label="来访事由" prop="state" width="180" fixed="left">
<template #default="scope">{{purpose_[scope.row.purpose] }}</template> <template #default="scope">{{
purpose_[scope.row.purpose]
}}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="访问级别" label="访问级别"
@ -54,38 +88,44 @@
min-width="180" min-width="180"
fixed="left" fixed="left"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column label="项目状态" prop="state" min-width="180">
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 <el-table-column label="审批状态" min-width="150">
label="审批状态"
prop="state"
min-width="150"
>
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.ticket_&&scope.row.ticket_.state_" style="margin-right: 5px;">{{scope.row.ticket_.state_.name }}</span> <span
v-if="scope.row.ticket_ && scope.row.ticket_.state_"
style="margin-right: 5px"
>{{ scope.row.ticket_.state_.name }}</span
>
<el-tag <el-tag
v-if="scope.row.ticket_ && scope.row.ticket_.act_state" v-if="scope.row.ticket_ && scope.row.ticket_.act_state"
class="mx-1" class="mx-1"
size="small" size="small"
: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':''" :type="
>{{act_states[scope.row.ticket_.act_state]}}</el-tag> 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> </template>
</el-table-column> </el-table-column>
<el-table-column <!-- <el-table-column
label="来访概述" label="来访概述"
prop="name" prop="name"
min-width="180" min-width="180"
></el-table-column> ></el-table-column> -->
<el-table-column
label="来访详述"
prop="description"
min-width="180"
></el-table-column>
<el-table-column <el-table-column
label="来访时间" label="来访时间"
prop="visit_time" prop="visit_time"
@ -101,18 +141,11 @@
prop="count_people" prop="count_people"
min-width="80" min-width="80"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column label="接待人" prop="receptionist_name" min-width="80">
label="属地部门"
prop="belong_dept"
min-width="150"
></el-table-column>
<el-table-column
label="接待人"
prop="receptionist_name"
min-width="80"
>
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.receptionist_">{{scope.row.receptionist_.name}}</span> <span v-if="scope.row.receptionist_">{{
scope.row.receptionist_.name
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -156,10 +189,7 @@
@success="handleSaveSuccess" @success="handleSaveSuccess"
@closed="dialog.save = false" @closed="dialog.save = false"
></save-dialog> ></save-dialog>
<detial-dialog <detial-dialog v-if="dialog.save" ref="detialDialog"></detial-dialog>
v-if="dialog.save"
ref="detialDialog"
></detial-dialog>
</el-container> </el-container>
</template> </template>
<script> <script>
@ -170,10 +200,11 @@
name: "visit", name: "visit",
components: { components: {
saveDialog, saveDialog,
detialDialog detialDialog,
}, },
data() { data() {
return { return {
timeRange: [],
dialog: { dialog: {
save: false, save: false,
permission: false, permission: false,
@ -184,12 +215,19 @@
search: { search: {
keyword: null, keyword: null,
}, },
purposeOptions: [
{ label: "参观", value: 10 },
{ label: "拜访", value: 20 },
{ label: "面试", value: 30 },
{ label: "开会", value: 40 },
{ label: "拉送货", value: 50 },
],
purpose_: { purpose_: {
10: "参观", 10: "参观",
20: "拜访", 20: "拜访",
30: "面试", 30: "面试",
40: "开会" 40: "开会",
50: "拉送货",
}, },
state_: { state_: {
10: "创建中", 10: "创建中",
@ -197,7 +235,7 @@
30: "待入厂", 30: "待入厂",
40: "进行中", 40: "进行中",
50: "已完成", 50: "已完成",
60: "已关闭" 60: "已关闭",
}, },
act_states: { act_states: {
0: "草稿中", //p 0: "草稿中", //p
@ -228,7 +266,6 @@
}); });
}, },
// //
table_show(row) { table_show(row) {
this.dialog.save = true; this.dialog.save = true;
@ -256,7 +293,6 @@
.catch((err) => { .catch((err) => {
return err; return err;
}); });
}, },
// //
@ -264,7 +300,6 @@
this.selection = selection; this.selection = selection;
}, },
// //
handleSaveSuccess(data, mode) { handleSaveSuccess(data, mode) {
if (mode == "add") { if (mode == "add") {
@ -277,7 +312,14 @@
this.query = {}; this.query = {};
}, },
handleQuery() { handleQuery() {
this.$refs.table.queryData(this.query) 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);
}, },
}, },
}; };

View File

@ -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>

View File

@ -1,4 +1,33 @@
<template> <template>
<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-container>
<el-main class="nopadding"> <el-main class="nopadding">
<scTable <scTable
@ -11,7 +40,11 @@
> >
<el-table-column label="ID" prop="id" width="180"></el-table-column> <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="sn" width="180"></el-table-column>
<el-table-column label="工单标题" prop="title" 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">
@ -26,8 +59,23 @@
<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
? ''
: 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> </template>
</el-table-column> </el-table-column>
<el-table-column label="处理人类型"> <el-table-column label="处理人类型">
@ -35,12 +83,17 @@
{{ participant_[scope.row.participant_type] }} {{ participant_[scope.row.participant_type] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="create_time" width="150"></el-table-column> <el-table-column
label="创建时间"
prop="create_time"
width="150"
></el-table-column>
<el-table-column label="操作" fixed="right" align="center"> <el-table-column label="操作" fixed="right" align="center">
<template #default="scope"> <template #default="scope">
<el-button type="text" size="small" @click="handleShow(scope.row)">查看</el-button> <el-button type="text" size="small" @click="handleShow(scope.row)"
>查看</el-button
>
<!--多人且主动接单--> <!--多人且主动接单-->
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
@ -53,9 +106,11 @@
name: "state", name: "state",
data() { data() {
return { return {
query: {},
timeRange: [],
list: [], list: [],
apiObj: this.$API.wf.ticket.list, apiObj: this.$API.wf.ticket.list,
params: {"category": "all"}, params: { category: "all" },
act_states: { act_states: {
0: "草稿中", 0: "草稿中",
1: "进行中", 1: "进行中",
@ -69,28 +124,45 @@
1: "单人", 1: "单人",
2: "多人", 2: "多人",
}, },
wfOptions: [],
}; };
}, },
mounted() { mounted() {
this.getWfOptions();
}, },
methods: { 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) { handleShow(row) {
let cateType = row.workflow_.key; let cateType = row.workflow_.key;
let projectId = null; let projectId = null;
if (cateType === 'visit') { if (cateType === "visit") {
projectId = row.ticket_data.visit; projectId = row.ticket_data.visit;
} else if (cateType === 'rpj') { } else if (cateType === "rpj") {
projectId = row.ticket_data.rpj; projectId = row.ticket_data.rpj;
} else if(cateType.indexOf('opl_')!=-1){ } else if (cateType.indexOf("opl_") != -1) {
// operation = row.ticket_data.operation ? row.ticket_data.operation : null; // operation = row.ticket_data.operation ? row.ticket_data.operation : null;
projectId = row.ticket_data.opl; projectId = row.ticket_data.opl;
cateType = 'opl' cateType = "opl";
} }
this.$router.push({ this.$router.push({
path: "ticketdetail", path: "ticketdetail",
query: { query: {
id: row.id, id: row.id,
type: 'show', type: "show",
projectId: projectId, projectId: projectId,
catetype: cateType, catetype: cateType,
// operation: operation // operation: operation

View File

@ -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"