任务管理新增

lijinlong
李劲龙 2 months ago
parent 4ec322322e
commit 243be80361

@ -0,0 +1,9 @@
import request from '@/utils/request'
export function addassetTaskadd(data) {
return request({
url: '/unit/assetTask/add',
method: "post",
data,
})
}

@ -4,11 +4,13 @@
display: flex;
flex-direction: column;
background-color: #F2F4F6;
.content-search {
padding-top: 20px;
margin-bottom: 15px;
background-color: #fff;
border-radius: 5px;
.search-title {
font-family: Alibaba PuHuiTi;
font-weight: bold;
@ -18,6 +20,7 @@
position: relative;
padding-bottom: 15px;
border-bottom: 1px solid #F2F4F6;
&::before {
content: "";
display: block;
@ -30,39 +33,48 @@
background-color: #2F8AE5;
}
}
.demo-form-inline {
padding: 20px 20px 30px 20px;
}
.el-form-item {
width: 100%;
.el-form-item__content {
width: calc(100% - 120px);
.el-select {
width: 100%;
}
}
}
.tyshxydm-class {
.el-form-item__content {
width: calc(100% - 140px);
}
}
.unit-form {
.el-form-item__content {
width: 100%;
}
}
}
main {
flex: 1;
padding: 20px 0px;
background-color: #fff;
border-radius: 5px;
.search-title {
display: flex;
justify-content: space-between;
border-bottom: 1px solid #F2F4F6;
padding: 0px 10px 0px 0px;
.search-title-span {
font-family: Alibaba PuHuiTi;
font-weight: bold;
@ -70,7 +82,7 @@
color: #192734;
padding-left: 20px;
position: relative;
&::before {
content: "";
display: block;
@ -84,19 +96,24 @@
}
}
}
.search-title-two {
padding-bottom: 15px;
}
section {
margin: 10px 0;
padding: 0px 10px;
.el-table {
th {
background: rgba(98,153,204,0.1);
background: rgba(98, 153, 204, 0.1);
}
td {
border-bottom: none;
}
.evenNumber-row {
background-color: #F6F9FD;
}
@ -104,39 +121,49 @@
}
}
}
#L-pagination {
margin-top: 15px;
padding: 0px 10px;
.btn-prev,
.btn-next {
padding: 0px 15px;
}
}
// -
.L-task-info {
height: 100%;
width: 100%;
overflow-y: scroll;
background-color: #f2f2f2;
.el-row {
height: 100%;
display: flex;
.el-col {
height: 100%;
}
}
.info-left, .info-right{
.info-left,
.info-right {
height: 100%;
background-color: #fff;
border-radius: 5px;
}
.info-right {
margin-left: 10px;
.info-title {
font-weight: 700;
font-size: 18px;
color: #3D3D3D;
padding-left: 10px;
&::before {
content: "";
display: block;
@ -148,20 +175,25 @@
border-radius: 5px;
}
}
.timeline {
padding: 20px;
}
}
}
.audit-pages-box,.info-left {
.audit-pages-box,
.info-left {
height: 100%;
background-color: #fff;
border-radius: 5px;
.content-info {
padding: 20px 0;
margin-bottom: 15px;
background-color: #fff;
border-radius: 5px;
.info-title {
font-family: Alibaba PuHuiTi;
font-weight: bold;
@ -171,7 +203,7 @@
position: relative;
padding-bottom: 15px;
border-bottom: 1px solid #F2F4F6;
&::before {
content: "";
display: block;
@ -184,18 +216,22 @@
background-color: #2F8AE5;
}
}
.top-info {
margin: 20px 20px 0px 20px;
padding: 20px;
background: #FAFBFC;
.top-row {
margin-bottom: 20px;
}
.el-col {
color: #192733;
font-family: Alibaba PuHuiTi;
font-weight: 400;
font-size: 14px;
span {
font-family: Alibaba PuHuiTi;
font-weight: 400;
@ -205,14 +241,17 @@
}
}
}
.content-info-two {
// border-bottom: 1px solid #ccc;
// margin-bottom: 20px;
}
.info-cut-off-rule {
border-bottom: 1px solid #F2F4F6;
display: flex;
margin-bottom: 20px;
div {
padding: 10px;
padding: 10px 20px;
@ -226,21 +265,25 @@
cursor: pointer;
margin-right: 10px;
}
.left-tab {
margin-left: 20px;
border-right: none;
}
.active-tab {
color: #fff;
background-color: #1485EF;
border: 1px solid #1485EF;
}
}
.info-cut-off-rule-my {
padding-top: 15px;
padding-bottom: 15px;
border-bottom: 1px solid #F2F4F6;
margin-bottom: 20px;
.info-title {
font-family: Alibaba PuHuiTi;
font-weight: bold;
@ -248,8 +291,8 @@
color: #192734;
padding-left: 20px;
position: relative;
&::before {
content: "";
display: block;
@ -263,16 +306,20 @@
}
}
}
.info-bottom-box {
padding: 0px 20px;
section {
.el-table {
th {
background: rgba(98,153,204,0.1);
background: rgba(98, 153, 204, 0.1);
}
td {
border-bottom: none;
}
.evenNumber-row {
background-color: #F6F9FD;
}
@ -280,10 +327,13 @@
}
}
}
.audit-pages-box-two,.info-left-two {
.audit-pages-box-two,
.info-left-two {
background-color: #F2F4F6 !important;
display: flex;
flex-direction: column;
.renwuxiangqing {
flex: 1;
background-color: #fff;
@ -295,65 +345,81 @@
.taskDialogBox {
.select-box {
position: relative;
.el-select {
width: 100%;
}
.btn-box {
position: absolute;
right: calc(-100% - 10px);
}
}
.newTask-form-item {
.el-form-item__content {
text-align: center;
}
}
}
// form--
.L-assets-info {
height: 100%;
padding: 20px 40px 20px 10px;
overflow-y: scroll;
.assets-info-top {
height: 100%;
.top-title-box {
font-weight: 700;
font-size: 18px;
color: #3D3D3D;
padding-left: 30px;
}
.top-title-two-box {
font-weight: 700;
font-size: 16px;
color: #3D3D3D;
padding-left: 50px;
}
.assets-info-box {
// padding-bottom: 100px;
.demo-ruleForm {
.upload-file {
cursor: pointer;
}
.el-select,.el-date-editor,.el-cascader {
.el-select,
.el-date-editor,
.el-cascader {
width: 100%;
}
// 访
.fangwenwangzhi {
.el-input-group__prepend {
padding: 0 10px;
}
.el-input--suffix {
width: 80px;
.el-input__suffix {
right: 15px;
}
}
.wangzhispan {
margin-left: 15px;
}
}
// IpPort
.IpPort {
.line {
@ -389,3 +455,8 @@ input[aria-hidden="true"] {
.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
box-shadow: none;
}
.bottomclass{
text-align: center;
background-color: #fff;
}

@ -0,0 +1,386 @@
<!-- 任务管理 -->
<template>
<div class="L-main" id="L-size-main">
<div class="content-search" id="L-header">
<div class="search-title">查询条件</div>
<el-form :inline="true" :model="formInline" size="small" class="demo-form-inline">
<el-row>
<el-col :span="8">
<el-form-item label="任务名称:">
<el-input v-model="formInline.name" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="任务编号:">
<el-input v-model="formInline.type" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="任务完成时间:">
<el-date-picker v-model="formInline.time" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="请选择">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="任务状态:">
<el-select v-model="formInline.status" placeholder="请选择">
<el-option label="item.label" value="item.value">
</el-option>
<!-- <el-option
v-for="dict in dict.type.bms_approval_status"
:key="dict.value"
:label="dict.label"
:value="dict.value">
</el-option> -->
</el-select>
</el-form-item>
</el-col>
<el-col :span="16" style="text-align: right;padding-right: 20px;">
<el-form-item>
<el-button size="mini" @click="resetQuery('queryFrom')"></el-button>
<el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<main>
<div class="search-title">
<span class="search-title-span">任务列表</span>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"></el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"></el-button>
</el-col>
</el-row>
</div>
<section>
<el-table v-loading="loading" :data="tableData" :height="tabHeader" :max-height="tabHeader"
:row-class-name="tableRowClassName">
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="任务编号" key="number" width="200px" prop="number" align="center" />
<el-table-column label="任务名称" key="name" prop="name" align="center" />
<el-table-column label="任务下发时间" key="type" prop="type" align="center">
<!-- <template slot-scope="scope">
<dict-tag :options="dict.type.project_middle_type" :value="scope.row.projectMiddleType"/>
</template> -->
</el-table-column>
<el-table-column label="任务期限" key="unit" prop="unit" align="center" />
<el-table-column label="任务完成时间" key="time" prop="time" align="center" />
<el-table-column label="任务状态" key="status" width="200px" prop="status" class-name="table-status"
align="center">
<template slot-scope="scope">
<span v-if="scope.row.status === 0" style="color: #F58A0C;">
待审核
</span>
<span v-if="scope.row.status === 1" style="color: #F50C0C;">
审核驳回
</span>
<span v-if="scope.row.status === 3" style="color: #16B771;">
正常完成
</span>
<span v-if="scope.row.status === 4" style="color: #1485EF;">
超期完成
</span>
</template>
</el-table-column>
<el-table-column label="操作" prop="userId" class-name="table-operation" align="center">
<template slot-scope="scope">
<div style="display: flex;align-items: center;justify-content: center;">
<div style="display: flex;align-items: center;">
<img src="@/assets/images/icon-ck@2x.png" alt="" style="width: 20px;margin-right: 5px;">
<span class="look-info" @click="goInfo(scope.row)"
style="color: #1485EF;margin-right: 15px;cursor: pointer;">查看</span>
</div>
<div v-if="scope.row.status == 0" style="display: flex;align-items: center;">
<img src="@/assets/images/icon-shenhe@2x.png" alt="" style="width: 15px;margin-right: 5px;">
<span class="del-info" @click="delInfo(scope.row)"
style="color: #1485EF;margin-right: 15px;cursor: pointer;">审核</span>
</div>
</div>
</template>
</el-table-column>
</el-table>
</section>
<my-pagination id="L-pagination" :total="total" :page="pagination.current" :limit="pagination.size"
@pagination="getPagination" :current-page.sync="pagination.current"></my-pagination>
</main>
<my-dialog title="新增任务" @close="renwuclose" ref="renwuclose" class="taskDialogBox" width="30%">
<el-row>
<el-col :span="18">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px">
<el-form-item label="任务名称" prop="taskName">
<el-input v-model="ruleForm.taskName" placeholder="请输入单位名称"></el-input>
</el-form-item>
<el-form-item label="核查单位" prop="unit" class="select-box">
<el-col :span="24">
<el-select v-model="ruleForm.unit" placeholder="请选择活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-col>
<el-col class="btn-box">
<el-button type="primary" @click="addliebiao"></el-button>
</el-col>
</el-form-item>
<el-form-item label="任务期限" prop="time">
<el-date-picker type="date" placeholder="选择日期" v-model="ruleForm.time"
style="width: 100%;"></el-date-picker>
</el-form-item>
<el-form-item class="newTask-form-item">
<el-button @click="resetForm('ruleForm')"></el-button>
<el-button type="primary" @click="submitForm('ruleForm')"></el-button>
</el-form-item>
</el-form>
</el-col>
<el-col :span="6"></el-col>
</el-row>
</my-dialog>
<my-dialog title="单位列表" @close="importClose" ref="taskDialog" class="taskDialogBox" width="80%">
<el-form :inline="true" :model="formInline" size="small" class="demo-form-inline">
<el-row>
<el-col :span="7">
<el-form-item label="任务编号:">
<el-input v-model="formInline.type" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="任务名称:">
<el-input v-model="formInline.name" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="任务状态:">
<el-select v-model="formInline.status" placeholder="请选择">
<el-option label="item.label" value="item.value">
</el-option>
<!-- <el-option
v-for="dict in dict.type.bms_approval_status"
:key="dict.value"
:label="dict.label"
:value="dict.value">
</el-option> -->
</el-select>
</el-form-item>
</el-col>
<el-col :span="3" style="text-align: right;padding-right: 20px;">
<el-form-item class="unit-form">
<el-button size="mini" @click="resetQuery('queryFrom')"></el-button>
<el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<section>
<el-table v-loading="liebiaoloading" :data="liebiaotableData" :height="tabHeader" :max-height="tabHeader"
:row-class-name="tableRowClassName">
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="任务编号" key="number" width="200px" prop="number" align="center" />
<el-table-column label="任务名称" key="name" prop="name" align="center" />
<el-table-column label="任务下发时间" key="type" prop="type" align="center">
<!-- <template slot-scope="scope">
<dict-tag :options="dict.type.project_middle_type" :value="scope.row.projectMiddleType"/>
</template> -->
</el-table-column>
<el-table-column label="任务期限" key="unit" prop="unit" align="center" />
</el-table>
</section>
<my-pagination id="L-pagination" :total="liebiaototal" :page="liebiaopagination.current" :limit="liebiaopagination.size"
@pagination="getPagination" :current-page.sync="liebiaopagination.current"></my-pagination>
</my-dialog>
</div>
</template>
<script>
import myPagination from "@/views/components/Pagination/index.vue"
import myDialog from "@/views/components/myDialog/index.vue"
export default {
// dicts: ['jjh_project_type', 'bms_approval_status', "project_middle_type", "project_small_type", "project_categories"],
components: { myPagination, myDialog },
data() {
return {
formInline: {
name: "",
type: "",
time: [],
number: "",
status: "",
},
total: 0,
pagination: {
current: 1,
size: 10,
},
liebiaotableData:[],
liebiaopagination: {
current: 1,
size: 10,
},
liebiaototal:0,
liebiaoloading:false,
tableData: [
{
number: 20230001,
name: "XXX任务",
type: "2023-07-30 16:30:21",
unit: "2023-07-30",
time: "2023-07-30 16:30:21",
status: 0,
}, {
number: 20230001,
name: "XXX任务",
type: "2023-07-30 16:30:21",
unit: "2023-07-30",
time: "2023-07-30 16:30:21",
status: 1,
}, {
number: 20230001,
name: "XXX任务",
type: "2023-07-30 16:30:21",
unit: "2023-07-30",
time: "2023-07-30 16:30:21",
status: 3,
}, {
number: 20230001,
name: "XXX任务",
type: "2023-07-30 16:30:21",
unit: "2023-07-30",
time: "2023-07-30 16:30:21",
status: 4,
},
],
loading: false,
tabHeader: undefined,
ruleForm: {
taskName: "",
unit: "",
time: "",
},
rules: {
name: [
{ required: true, message: '请输入活动名称', trigger: 'blur' },
],
region: [
{ required: true, message: '请选择活动区域', trigger: 'change' }
],
date1: [
{ type: 'date', required: true, message: '请选择日期', trigger: 'change' }
],
}
}
},
mounted() {
this.getInfo();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
},
methods: {
//
getInfo() {
// this.loading = true;
// jProject(this.pagination).then(res=>{
// this.loading = false;
// this.total = res.data.total;
// this.tableData = res.data.records;
// })
},
//
resetQuery() {
this.formInline = {
name: "",
type: "",
time: [],
number: "",
status: "",
}
this.pagination = {
current: 1,
size: 10,
}
this.getList();
},
//
handleQuery() {
this.pagination = {
current: 1,
size: 10
}
if (this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0]
this.formInline.endTime = this.formInline.time[1]
}
this.pagination = { ...this.pagination, ...this.formInline };
this.getList();
},
//
getPagination(pages) {
this.pagination.current = pages.page;
this.pagination.size = pages.limit;
this.getList();
},
//
handleImport() { },
//
handleExport() { },
//
handleAdd() {
this.$refs.taskDialog.open()
},
//
addliebiao(){
this.$refs.renwuclose.open()
},
//
renwuclose(){},
//
importClose() { },
//
goInfo() {
this.$router.push({
name: 'TaskInfo', query: {
pageType: "info",
}
})
},
//
edit() {
},
//
delInfo() {
this.$router.push({
name: 'taskAudit', query: {
pageType: "info",
}
})
},
// table
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 !== 0) {
return 'evenNumber-row';
}
return '';
},
//
cancalDebounce() {
const element = document.getElementById('L-size-main'); // ID
const header = document.getElementById('L-header'); // ID
const pagination = document.getElementById('L-pagination'); // ID
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight - 110;
}
},
}
</script>

@ -17,15 +17,8 @@
</el-col>
<el-col :span="8">
<el-form-item label="任务完成时间:">
<el-date-picker
v-model="formInline.time"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="请选择"
>
<el-date-picker v-model="formInline.time" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="请选择">
</el-date-picker>
</el-form-item>
</el-col>
@ -59,28 +52,17 @@
<span class="search-title-span">任务列表</span>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"></el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>任务创建</el-button>
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"></el-button>
</el-col>
</el-row>
</div>
<section>
<el-table v-loading="loading" :data="tableData" :height="tabHeader" :max-height="tabHeader" :row-class-name="tableRowClassName">
<el-table-column type="index" width="50" label="序号" align="center"/>
<el-table v-loading="loading" :data="tableData" :height="tabHeader" :max-height="tabHeader"
:row-class-name="tableRowClassName">
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="任务编号" key="number" width="200px" prop="number" align="center" />
<el-table-column label="任务名称" key="name" prop="name" align="center" />
<el-table-column label="任务下发时间" key="type" prop="type" align="center">
@ -90,9 +72,10 @@
</el-table-column>
<el-table-column label="任务期限" key="unit" prop="unit" align="center" />
<el-table-column label="任务完成时间" key="time" prop="time" align="center" />
<el-table-column label="任务状态" key="status" width="200px" prop="status" class-name="table-status" align="center">
<el-table-column label="任务状态" key="status" width="200px" prop="status" class-name="table-status"
align="center">
<template slot-scope="scope">
<span v-if="scope.row.status === 0" style="color: #F58A0C;">
<span v-if="scope.row.status === 0" style="color: #F58A0C;">
待审核
</span>
<span v-if="scope.row.status === 1" style="color: #F50C0C;">
@ -111,46 +94,41 @@
<div style="display: flex;align-items: center;justify-content: center;">
<div style="display: flex;align-items: center;">
<img src="@/assets/images/icon-ck@2x.png" alt="" style="width: 20px;margin-right: 5px;">
<span class="look-info" @click="goInfo(scope.row)" style="color: #1485EF;margin-right: 15px;cursor: pointer;">查看</span>
<span class="look-info" @click="goInfo(scope.row)"
style="color: #1485EF;margin-right: 15px;cursor: pointer;">查看</span>
</div>
<div v-if="scope.row.status == 0" style="display: flex;align-items: center;">
<img src="@/assets/images/icon-shenhe@2x.png" alt="" style="width: 15px;margin-right: 5px;">
<span class="del-info" @click="delInfo(scope.row)" style="color: #1485EF;margin-right: 15px;cursor: pointer;">审核</span>
<span class="del-info" @click="delInfo(scope.row)"
style="color: #1485EF;margin-right: 15px;cursor: pointer;">审核</span>
</div>
</div>
</template>
</el-table-column>
</el-table>
</section>
<my-pagination
id="L-pagination"
:total="total"
:page="pagination.current"
:limit="pagination.size"
@pagination="getPagination"
:current-page.sync="pagination.current"
></my-pagination>
<my-pagination id="L-pagination" :total="total" :page="pagination.current" :limit="pagination.size"
@pagination="getPagination" :current-page.sync="pagination.current"></my-pagination>
</main>
<my-dialog title="新增任务" @close="importClose" ref="taskDialog" class="taskDialogBox" width="30%">
<my-dialog title="新增任务" @close="importClose" ref="taskDialog" class="taskDialogBox" width="40%">
<el-row>
<el-col :span="18">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px">
<el-form-item label="任务名称" prop="taskName">
<el-input v-model="ruleForm.taskName"></el-input>
<el-input v-model="ruleForm.taskName" placeholder="请输入单位名称"></el-input>
</el-form-item>
<el-form-item label="核查单位" prop="unit" class="select-box">
<el-form-item label="核查单位" prop="dwmc" class="select-box">
<el-col :span="24">
<el-select v-model="ruleForm.unit" placeholder="请选择活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
<el-select v-model="ruleForm.dwmc" placeholder="请选择活动区域" multiple collapse-tags>
</el-select>
</el-col>
<el-col class="btn-box">
<el-button type="primary">单位列表</el-button>
<el-button type="primary" @click="addliebiao"><i class="el-icon-s-unfold"></i></el-button>
</el-col>
</el-form-item>
<el-form-item label="任务期限" prop="time">
<el-date-picker type="date" placeholder="选择日期" v-model="ruleForm.time" style="width: 100%;"></el-date-picker>
<el-form-item label="任务期限" prop="taskDeadline">
<el-date-picker type="date" placeholder="选择日期" v-model="ruleForm.taskDeadline" style="width: 100%;"
value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item class="newTask-form-item">
<el-button @click="resetForm('ruleForm')"></el-button>
@ -161,80 +139,91 @@
<el-col :span="6"></el-col>
</el-row>
</my-dialog>
<div class="newTask-liebiao">
<my-dialog title="单位列表" ref="liebiaoDialog" class="taskDialogBox" width="80%">
<danweiList ref="danweiList" @adddanweilist="adddanweilist" @liebiaoClose="liebiaoClose"></danweiList>
</my-dialog>
</div>
</div>
</template>
<script>
import myPagination from "@/views/components/Pagination/index.vue"
import myDialog from "@/views/components/myDialog/index.vue"
import danweiList from "@/views/system/user/danweiList.vue"
import { addassetTaskadd } from "@/api/renwuApi/index.js"
export default {
// dicts: ['jjh_project_type', 'bms_approval_status', "project_middle_type", "project_small_type", "project_categories"],
components:{myPagination, myDialog},
components: { myPagination, myDialog, danweiList },
data() {
return {
formInline:{
name:"",
type:"",
time:[],
number:"",
status:"",
formInline: {
name: "",
type: "",
time: [],
number: "",
status: "",
},
total:0,
pagination:{
current:1,
size:10,
total: 0,
pagination: {
current: 1,
size: 10,
},
tableData:[
tableData: [
{
number:20230001,
name:"XXX任务",
type:"2023-07-30 16:30:21",
unit:"2023-07-30",
time:"2023-07-30 16:30:21",
status:0,
},{
number:20230001,
name:"XXX任务",
type:"2023-07-30 16:30:21",
unit:"2023-07-30",
time:"2023-07-30 16:30:21",
status:1,
},{
number:20230001,
name:"XXX任务",
type:"2023-07-30 16:30:21",
unit:"2023-07-30",
time:"2023-07-30 16:30:21",
status:3,
},{
number:20230001,
name:"XXX任务",
type:"2023-07-30 16:30:21",
unit:"2023-07-30",
time:"2023-07-30 16:30:21",
status:4,
number: 20230001,
name: "XXX任务",
type: "2023-07-30 16:30:21",
unit: "2023-07-30",
time: "2023-07-30 16:30:21",
status: 0,
}, {
number: 20230001,
name: "XXX任务",
type: "2023-07-30 16:30:21",
unit: "2023-07-30",
time: "2023-07-30 16:30:21",
status: 1,
}, {
number: 20230001,
name: "XXX任务",
type: "2023-07-30 16:30:21",
unit: "2023-07-30",
time: "2023-07-30 16:30:21",
status: 3,
}, {
number: 20230001,
name: "XXX任务",
type: "2023-07-30 16:30:21",
unit: "2023-07-30",
time: "2023-07-30 16:30:21",
status: 4,
},
],
loading:false,
loading: false,
tabHeader: undefined,
ruleForm:{
taskName:"",
unit:"",
time:"",
ruleForm: {
taskName: "",
dwmc: [],
taskDeadline: "",
},
rules: {
name: [
{ required: true, message: '请输入活动名称', trigger: 'blur' },
taskName: [
{ required: true, message: '请输入', trigger: 'blur' },
],
region: [
{ required: true, message: '请选择活动区域', trigger: 'change' }
dwmc: [
{ required: true, message: '请选择', trigger: 'change' }
],
date1: [
{ type: 'date', required: true, message: '请选择日期', trigger: 'change' }
taskDeadline: [
{ required: true, message: '请选择日期', trigger: 'change' }
],
}
},
tabclicklist: []
}
},
mounted(){
mounted() {
this.getInfo();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
@ -242,9 +231,45 @@ export default {
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
},
methods:{
methods: {
//
resetForm() {
this.ruleForm = {
dwmc: [],
taskName: "",
taskDeadline: "",
}
this.$refs.taskDialog.close()
this.tabclicklist = []
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.ruleForm.dwmc = this.ruleForm.dwmc.join(",")
addassetTaskadd(this.ruleForm).then(res => {
this.resetForm()
})
} else {
console.log('error submit!!');
return false;
}
});
},
adddanweilist(val) {
if (val) {
let list = val
this.ruleForm.dwmc = []
list.forEach(element => {
this.ruleForm.dwmc.push(element.nickName)
});
} else {
this.ruleForm.dwmc = []
}
this.tabclicklist = val
},
//
getInfo(){
getInfo() {
// this.loading = true;
// jProject(this.pagination).then(res=>{
// this.loading = false;
@ -253,13 +278,13 @@ export default {
// })
},
//
resetQuery(){
resetQuery() {
this.formInline = {
name:"",
type:"",
time:[],
number:"",
status:"",
name: "",
type: "",
time: [],
number: "",
status: "",
}
this.pagination = {
current: 1,
@ -267,59 +292,79 @@ export default {
}
this.getList();
},
//
addliebiao() {
this.$refs.liebiaoDialog.open()
if (this.tabclicklist) {
setTimeout(() => {
this.$refs.danweiList.dakai(this.tabclicklist)
}, 100);
}
},
liebiaoClose() {
this.$refs.liebiaoDialog.close()
},
//
handleQuery(){
handleQuery() {
this.pagination = {
current: 1,
size: 10
}
if(this.formInline.time.length > 0) {
if (this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0]
this.formInline.endTime = this.formInline.time[1]
}
this.pagination = { ...this.pagination,...this.formInline };
this.pagination = { ...this.pagination, ...this.formInline };
this.getList();
},
//
getPagination(pages){
getPagination(pages) {
this.pagination.current = pages.page;
this.pagination.size = pages.limit;
this.getList();
},
//
handleImport(){},
handleImport() { },
//
handleExport(){},
handleExport() { },
//
handleAdd(){
handleAdd() {
this.$refs.taskDialog.open()
},
//
importClose(){},
importClose() {
},
//
goInfo(){
this.$router.push({name: 'TaskInfo',query: {
pageType: "info",
}})
goInfo() {
this.$router.push({
name: 'TaskInfo', query: {
pageType: "info",
}
})
},
//
edit(){
edit() {
},
//
delInfo(){
this.$router.push({name: 'taskAudit',query: {
pageType: "info",
}})
delInfo() {
this.$router.push({
name: 'taskAudit', query: {
pageType: "info",
}
})
},
// table
tableRowClassName({row, rowIndex}){
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 !== 0) {
return 'evenNumber-row';
}
return '';
},
//
cancalDebounce(){
cancalDebounce() {
const element = document.getElementById('L-size-main'); // ID
const header = document.getElementById('L-header'); // ID
const pagination = document.getElementById('L-pagination'); // ID
@ -331,3 +376,9 @@ export default {
},
}
</script>
<style lang="scss" scoped>
.el-icon-s-unfold {
font-size: 16px;
}
</style>

@ -1,14 +1,7 @@
<template>
<el-dialog
:title="title"
:visible.sync="dialogFormVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
:custom-class="myclass ? 'custom-my-class':''"
@close="resetCancel"
:width="width"
append-to-body
>
<el-dialog :title="title" :visible.sync="dialogFormVisible" :close-on-click-modal="false"
:close-on-press-escape="false" :custom-class="myclass ? 'custom-my-class' : ''" @close="resetCancel" :width="width"
append-to-body>
<slot></slot>
<div slot="footer" class="dialog-footer" v-if="footer">
<el-form size="small">
@ -27,41 +20,41 @@ export default {
dialogFormVisible: false,
}
},
props:{
title:{
type:String,
default:''
props: {
title: {
type: String,
default: ''
},
myclass:{
type:Boolean,
default:false,
myclass: {
type: Boolean,
default: false,
},
closeText:{
type:String,
default:'取消'
closeText: {
type: String,
default: '取消'
},
width: {
type:String,
default:"50%"
type: String,
default: "50%"
},
footer: {
type:Boolean,
default:false,
type: Boolean,
default: false,
}
},
methods:{
open(){
methods: {
open() {
this.dialogFormVisible = true
},
close(){
close() {
this.dialogFormVisible = false;
},
//
resetCancel(){
resetCancel() {
this.$emit('close')
},
//
resetConfirm(){
resetConfirm() {
this.$emit('confirm')
},
},
@ -69,10 +62,13 @@ export default {
</script>
<style lang="scss" scoped>
::v-deep .el-dialog {
margin-top: 25vh !important;
border-radius: 5px;
.el-dialog__header {
border-bottom: 1px solid #DDDDDD;
padding: 10px 20px;
background: #F2F4F6;
span {
// font-family: PingFang-SC, PingFang-SC;
font-weight: 800;
@ -92,12 +88,19 @@ export default {
}
}
}
.el-dialog__headerbtn {
top: 15px;
}
.el-dialog__footer {
border-top: 1px solid #DDDDDD;
.dialog-footer {
.el-form {
.dialog-from-item {
margin-bottom: 0;
.el-form-item__content {
.el-button {
padding: 10px 17px;
@ -108,6 +111,7 @@ export default {
}
}
}
::v-deep .custom-my-class {
margin-top: 15vh !important;
}

@ -0,0 +1,270 @@
<template>
<div class="L-main" id="L-size-main">
<div class="content-search" id="L-header">
<div class="search-title">查询条件</div>
<el-form :inline="true" :model="queryParams" ref="queryForm" size="small" class="demo-form-inline">
<el-row>
<el-col :span="6">
<el-form-item label="单位名称:" prop="nickName">
<el-input v-model="queryParams.nickName" placeholder="请输入单位名称" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="单位类型:" prop="dwlx">
<el-select v-model="queryParams.dwlx" placeholder="用户状态" clearable>
<el-option v-for="dict in dict.type.dwlx" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="统一社会信用代码:" class="tyshxydm-class" prop="userName">
<el-input v-model="queryParams.userName" placeholder="请输入统一社会信用代码" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="3" style="text-align: right;padding-right: 20px;">
<el-form-item class="unit-form">
<el-button size="mini" @click="resetQuery"></el-button>
<el-button size="mini" type="primary" @click="handleQuery"></el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<main>
<div class="search-title">
<span class="search-title-span">单位列表</span>
</div>
<section>
<el-table ref="multipleTable" v-loading="loading" :data="userList" :height="tabHeader" :max-height="tabHeader"
:row-class-name="tableRowClassName" @selection-change="handleSelectionChange" row-key="userName">
<el-table-column type="selection" width="55" :reserve-selection="true">
</el-table-column>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column label="单位名称" align="center" key="nickName" prop="nickName">
<template slot-scope="scope">{{ scope.row.nickName }}</template>
</el-table-column>
<el-table-column label="单位类型" align="center" key="dwlx" prop="dwlx">
<template slot-scope="scope">
<dict-tag :options="dict.type.dwlx" :value="scope.row.dwlx" />
</template>
</el-table-column>
<el-table-column label="统一社会信用代码" align="center" key="userName" prop="userName">
<template slot-scope="scope">{{ scope.row.userName }}</template>
</el-table-column>
<el-table-column label="所属区域" align="center" key="ssqycounty" prop="ssqycounty">
<template slot-scope="scope">{{ scope.row.ssqycity }}</template>
</el-table-column>
<el-table-column label="所属行业" align="center" key="sshy" prop="sshy">
<template slot-scope="scope">
<dict-tag :options="dict.type.sshy" :value="scope.row.sshy" />
<!-- {{ scope.row.sshy }} -->
</template>
</el-table-column>
<el-table-column label="单位地址" align="center" key="dwxxdz" prop="dwxxdz">
<template slot-scope="scope">{{ scope.row.dwxxdz }}</template>
</el-table-column>
</el-table>
</section>
<my-pagination id="L-pagination" :total="total" :page="queryParams.current" :limit="queryParams.size"
@pagination="getPagination" :current-page.sync="queryParams.current"></my-pagination>
</main>
<div class="bottomclass">
<el-button size="mini" @click="resetCancel"></el-button>
<el-button type="primary" size="mini" @click="resetConfirm"></el-button>
</div>
</div>
</template>
<script>
// import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
import { listUnit, delUnit } from "@/api/auditPagesApi/index";
import { getToken } from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import myPagination from "@/views/components/Pagination/index.vue"
export default {
name: "User",
dicts: ['dwlx', 'sshy'],
components: { Treeselect, myPagination },
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
userList: [],
//
title: "",
//
deptOptions: undefined,
//
open: false,
//
deptName: undefined,
//
initPassword: undefined,
//
postOptions: [],
//
roleOptions: [],
//
form: {},
defaultProps: {
children: "children",
label: "label"
},
//
upload: {
//
open: false,
//
title: "",
//
isUploading: false,
//
updateSupport: 0,
//
headers: { Authorization: "Bearer " + getToken() },
//
url: process.env.VUE_APP_BASE_API + "/tc/unit/importData"
},
//
queryParams: {
current: 1,
size: 10,
userName: undefined,
nickName: undefined,
dwlx: undefined,
},
//
tabHeader: undefined,
tabclicklist: []
};
},
watch: {
//
deptName(val) {
this.$refs.tree.filter(val);
}
},
created() {
this.getList();
// this.getConfigKey("sys.user.initPassword").then(response => {
// this.initPassword = response.msg;
// });
},
mounted() {
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
},
methods: {
dakai(val) {
console.log(val);
this.toggleSelection(val)
},
resetCancel() {
this.$emit('liebiaoClose')
this.toggleSelection()
this.$emit('adddanweilist', [])
},
resetConfirm() {
this.$emit('adddanweilist', this.tabclicklist)
this.$emit('liebiaoClose')
this.toggleSelection()
},
// /table
toggleSelection(rows) {
if (rows) {
rows.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row);
});
} else {
this.$refs.multipleTable.clearSelection();
}
},
handleSelectionChange(val) {
if (val) {
this.tabclicklist = val
}
},
// table
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 !== 0) {
return 'evenNumber-row';
}
return '';
},
/** 查询用户列表 */
getList() {
this.loading = true;
listUnit(this.queryParams).then(response => {
this.userList = response.data.records;
this.total = response.data.total;
this.loading = false;
}
);
},
//
getPagination(pages) {
this.queryParams.current = pages.page;
this.queryParams.size = pages.limit;
this.getList();
},
//
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.current = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.toggleSelection()
this.handleQuery();
},
//
cancalDebounce() {
const element = document.getElementById('L-size-main'); // ID
const header = document.getElementById('L-header'); // ID
const pagination = document.getElementById('L-pagination'); // ID
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight - 120;
}
}
};
</script>
Loading…
Cancel
Save