合并代码

lijinlong
吕天方 3 months ago
commit 8d507f321e

@ -5,7 +5,7 @@ VUE_APP_TITLE = 若依管理系统
ENV = 'development' ENV = 'development'
# 若依管理系统/开发环境 # 若依管理系统/开发环境
VUE_APP_BASE_API = 'http://192.168.0.110:9015' VUE_APP_BASE_API = 'http://192.168.0.108:9015'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

@ -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; display: flex;
flex-direction: column; flex-direction: column;
background-color: #F2F4F6; background-color: #F2F4F6;
.content-search { .content-search {
padding-top: 20px; padding-top: 20px;
margin-bottom: 15px; margin-bottom: 15px;
background-color: #fff; background-color: #fff;
border-radius: 5px; border-radius: 5px;
.search-title { .search-title {
font-family: Alibaba PuHuiTi; font-family: Alibaba PuHuiTi;
font-weight: bold; font-weight: bold;
@ -18,6 +20,7 @@
position: relative; position: relative;
padding-bottom: 15px; padding-bottom: 15px;
border-bottom: 1px solid #F2F4F6; border-bottom: 1px solid #F2F4F6;
&::before { &::before {
content: ""; content: "";
display: block; display: block;
@ -30,39 +33,48 @@
background-color: #2F8AE5; background-color: #2F8AE5;
} }
} }
.demo-form-inline { .demo-form-inline {
padding: 20px 20px 30px 20px; padding: 20px 20px 30px 20px;
} }
.el-form-item { .el-form-item {
width: 100%; width: 100%;
.el-form-item__content { .el-form-item__content {
width: calc(100% - 120px); width: calc(100% - 120px);
.el-select { .el-select {
width: 100%; width: 100%;
} }
} }
} }
.tyshxydm-class { .tyshxydm-class {
.el-form-item__content { .el-form-item__content {
width: calc(100% - 140px); width: calc(100% - 140px);
} }
} }
.unit-form { .unit-form {
.el-form-item__content { .el-form-item__content {
width: 100%; width: 100%;
} }
} }
} }
main { main {
flex: 1; flex: 1;
padding: 20px 0px; padding: 20px 0px;
background-color: #fff; background-color: #fff;
border-radius: 5px; border-radius: 5px;
.search-title { .search-title {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
border-bottom: 1px solid #F2F4F6; border-bottom: 1px solid #F2F4F6;
padding: 0px 10px 0px 0px; padding: 0px 10px 0px 0px;
.search-title-span { .search-title-span {
font-family: Alibaba PuHuiTi; font-family: Alibaba PuHuiTi;
font-weight: bold; font-weight: bold;
@ -84,19 +96,24 @@
} }
} }
} }
.search-title-two { .search-title-two {
padding-bottom: 15px; padding-bottom: 15px;
} }
section { section {
margin: 10px 0; margin: 10px 0;
padding: 0px 10px; padding: 0px 10px;
.el-table { .el-table {
th { th {
background: rgba(98,153,204,0.1); background: rgba(98, 153, 204, 0.1);
} }
td { td {
border-bottom: none; border-bottom: none;
} }
.evenNumber-row { .evenNumber-row {
background-color: #F6F9FD; background-color: #F6F9FD;
} }
@ -104,39 +121,49 @@
} }
} }
} }
#L-pagination { #L-pagination {
margin-top: 15px; margin-top: 15px;
padding: 0px 10px; padding: 0px 10px;
.btn-prev, .btn-prev,
.btn-next { .btn-next {
padding: 0px 15px; padding: 0px 15px;
} }
} }
// - // -
.L-task-info { .L-task-info {
height: 100%; height: 100%;
width: 100%; width: 100%;
overflow-y: scroll; overflow-y: scroll;
background-color: #f2f2f2; background-color: #f2f2f2;
.el-row { .el-row {
height: 100%; height: 100%;
display: flex; display: flex;
.el-col { .el-col {
height: 100%; height: 100%;
} }
} }
.info-left, .info-right{
.info-left,
.info-right {
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
border-radius: 5px; border-radius: 5px;
} }
.info-right { .info-right {
margin-left: 10px; margin-left: 10px;
.info-title { .info-title {
font-weight: 700; font-weight: 700;
font-size: 18px; font-size: 18px;
color: #3D3D3D; color: #3D3D3D;
padding-left: 10px; padding-left: 10px;
&::before { &::before {
content: ""; content: "";
display: block; display: block;
@ -148,20 +175,25 @@
border-radius: 5px; border-radius: 5px;
} }
} }
.timeline { .timeline {
padding: 20px; padding: 20px;
} }
} }
} }
.audit-pages-box,.info-left {
.audit-pages-box,
.info-left {
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
border-radius: 5px; border-radius: 5px;
.content-info { .content-info {
padding: 20px 0; padding: 20px 0;
margin-bottom: 15px; margin-bottom: 15px;
background-color: #fff; background-color: #fff;
border-radius: 5px; border-radius: 5px;
.info-title { .info-title {
font-family: Alibaba PuHuiTi; font-family: Alibaba PuHuiTi;
font-weight: bold; font-weight: bold;
@ -184,18 +216,22 @@
background-color: #2F8AE5; background-color: #2F8AE5;
} }
} }
.top-info { .top-info {
margin: 20px 20px 0px 20px; margin: 20px 20px 0px 20px;
padding: 20px; padding: 20px;
background: #FAFBFC; background: #FAFBFC;
.top-row { .top-row {
margin-bottom: 20px; margin-bottom: 20px;
} }
.el-col { .el-col {
color: #192733; color: #192733;
font-family: Alibaba PuHuiTi; font-family: Alibaba PuHuiTi;
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
span { span {
font-family: Alibaba PuHuiTi; font-family: Alibaba PuHuiTi;
font-weight: 400; font-weight: 400;
@ -205,14 +241,17 @@
} }
} }
} }
.content-info-two { .content-info-two {
// border-bottom: 1px solid #ccc; // border-bottom: 1px solid #ccc;
// margin-bottom: 20px; // margin-bottom: 20px;
} }
.info-cut-off-rule { .info-cut-off-rule {
border-bottom: 1px solid #F2F4F6; border-bottom: 1px solid #F2F4F6;
display: flex; display: flex;
margin-bottom: 20px; margin-bottom: 20px;
div { div {
padding: 10px; padding: 10px;
padding: 10px 20px; padding: 10px 20px;
@ -226,21 +265,25 @@
cursor: pointer; cursor: pointer;
margin-right: 10px; margin-right: 10px;
} }
.left-tab { .left-tab {
margin-left: 20px; margin-left: 20px;
border-right: none; border-right: none;
} }
.active-tab { .active-tab {
color: #fff; color: #fff;
background-color: #1485EF; background-color: #1485EF;
border: 1px solid #1485EF; border: 1px solid #1485EF;
} }
} }
.info-cut-off-rule-my { .info-cut-off-rule-my {
padding-top: 15px; padding-top: 15px;
padding-bottom: 15px; padding-bottom: 15px;
border-bottom: 1px solid #F2F4F6; border-bottom: 1px solid #F2F4F6;
margin-bottom: 20px; margin-bottom: 20px;
.info-title { .info-title {
font-family: Alibaba PuHuiTi; font-family: Alibaba PuHuiTi;
font-weight: bold; font-weight: bold;
@ -263,16 +306,20 @@
} }
} }
} }
.info-bottom-box { .info-bottom-box {
padding: 0px 20px; padding: 0px 20px;
section { section {
.el-table { .el-table {
th { th {
background: rgba(98,153,204,0.1); background: rgba(98, 153, 204, 0.1);
} }
td { td {
border-bottom: none; border-bottom: none;
} }
.evenNumber-row { .evenNumber-row {
background-color: #F6F9FD; 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; background-color: #F2F4F6 !important;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.renwuxiangqing { .renwuxiangqing {
flex: 1; flex: 1;
background-color: #fff; background-color: #fff;
@ -295,15 +345,18 @@
.taskDialogBox { .taskDialogBox {
.select-box { .select-box {
position: relative; position: relative;
.el-select { .el-select {
width: 100%; width: 100%;
} }
.btn-box { .btn-box {
position: absolute; position: absolute;
right: calc(-100% - 10px); right: calc(-100% - 10px);
} }
} }
.newTask-form-item { .newTask-form-item {
.el-form-item__content { .el-form-item__content {
text-align: center; text-align: center;
@ -316,44 +369,57 @@
height: 100%; height: 100%;
padding: 20px 40px 20px 10px; padding: 20px 40px 20px 10px;
overflow-y: scroll; overflow-y: scroll;
.assets-info-top { .assets-info-top {
height: 100%; height: 100%;
.top-title-box { .top-title-box {
font-weight: 700; font-weight: 700;
font-size: 18px; font-size: 18px;
color: #3D3D3D; color: #3D3D3D;
padding-left: 30px; padding-left: 30px;
} }
.top-title-two-box { .top-title-two-box {
font-weight: 700; font-weight: 700;
font-size: 16px; font-size: 16px;
color: #3D3D3D; color: #3D3D3D;
padding-left: 50px; padding-left: 50px;
} }
.assets-info-box { .assets-info-box {
// padding-bottom: 100px; // padding-bottom: 100px;
.demo-ruleForm { .demo-ruleForm {
.upload-file { .upload-file {
cursor: pointer; cursor: pointer;
} }
.el-select,.el-date-editor,.el-cascader {
.el-select,
.el-date-editor,
.el-cascader {
width: 100%; width: 100%;
} }
// 访 // 访
.fangwenwangzhi { .fangwenwangzhi {
.el-input-group__prepend { .el-input-group__prepend {
padding: 0 10px; padding: 0 10px;
} }
.el-input--suffix { .el-input--suffix {
width: 80px; width: 80px;
.el-input__suffix { .el-input__suffix {
right: 15px; right: 15px;
} }
} }
.wangzhispan { .wangzhispan {
margin-left: 15px; margin-left: 15px;
} }
} }
// IpPort // IpPort
.IpPort { .IpPort {
.line { .line {
@ -389,3 +455,8 @@ input[aria-hidden="true"] {
.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner { .el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
box-shadow: none; 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>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="任务完成时间:"> <el-form-item label="任务完成时间:">
<el-date-picker <el-date-picker v-model="formInline.time" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
v-model="formInline.time" type="datetimerange" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="请选择">
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-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -59,28 +52,17 @@
<span class="search-title-span">任务列表</span> <span class="search-title-span">任务列表</span>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"></el-button>
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"></el-button>
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>任务创建</el-button>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<section> <section>
<el-table v-loading="loading" :data="tableData" :height="tabHeader" :max-height="tabHeader" :row-class-name="tableRowClassName"> <el-table v-loading="loading" :data="tableData" :height="tabHeader" :max-height="tabHeader"
<el-table-column type="index" width="50" label="序号" align="center"/> :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="number" width="200px" prop="number" align="center" />
<el-table-column label="任务名称" key="name" prop="name" align="center" /> <el-table-column label="任务名称" key="name" prop="name" align="center" />
<el-table-column label="任务下发时间" key="type" prop="type" align="center"> <el-table-column label="任务下发时间" key="type" prop="type" align="center">
@ -90,7 +72,8 @@
</el-table-column> </el-table-column>
<el-table-column label="任务期限" key="unit" prop="unit" align="center" /> <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="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"> <template slot-scope="scope">
<span v-if="scope.row.status === 0" style="color: #F58A0C;"> <span v-if="scope.row.status === 0" style="color: #F58A0C;">
待审核 待审核
@ -122,35 +105,28 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</section> </section>
<my-pagination <my-pagination id="L-pagination" :total="total" :page="pagination.current" :limit="pagination.size"
id="L-pagination" @pagination="getPagination" :current-page.sync="pagination.current"></my-pagination>
:total="total"
:page="pagination.current"
:limit="pagination.size"
@pagination="getPagination"
:current-page.sync="pagination.current"
></my-pagination>
</main> </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-row>
<el-col :span="18"> <el-col :span="18">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px">
<el-form-item label="任务名称" prop="taskName"> <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>
<el-form-item label="核查单位" prop="unit" class="select-box"> <el-form-item label="核查单位" prop="dwmc" class="select-box">
<el-col :span="24"> <el-col :span="24">
<el-select v-model="ruleForm.unit" placeholder="请选择活动区域"> <el-select v-model="ruleForm.dwmc" placeholder="请选择活动区域" multiple collapse-tags>
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select> </el-select>
</el-col> </el-col>
<el-col class="btn-box"> <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-col>
</el-form-item> </el-form-item>
<el-form-item label="任务期限" prop="time"> <el-form-item label="任务期限" prop="taskDeadline">
<el-date-picker type="date" placeholder="选择日期" v-model="ruleForm.time" style="width: 100%;"></el-date-picker> <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>
<el-form-item class="newTask-form-item"> <el-form-item class="newTask-form-item">
<el-button @click="resetForm('ruleForm')"></el-button> <el-button @click="resetForm('ruleForm')"></el-button>
@ -161,80 +137,91 @@
<el-col :span="6"></el-col> <el-col :span="6"></el-col>
</el-row> </el-row>
</my-dialog> </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> </div>
</template> </template>
<script> <script>
import myPagination from "@/views/components/Pagination/index.vue" import myPagination from "@/views/components/Pagination/index.vue"
import myDialog from "@/views/components/myDialog/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 { export default {
// dicts: ['jjh_project_type', 'bms_approval_status', "project_middle_type", "project_small_type", "project_categories"], // dicts: ['jjh_project_type', 'bms_approval_status', "project_middle_type", "project_small_type", "project_categories"],
components:{myPagination, myDialog}, components: { myPagination, myDialog, danweiList },
data() { data() {
return { return {
formInline:{ formInline: {
name:"", name: "",
type:"", type: "",
time:[], time: [],
number:"", number: "",
status:"", status: "",
}, },
total:0, total: 0,
pagination:{ pagination: {
current:1, current: 1,
size:10, size: 10,
}, },
tableData:[ tableData: [
{ {
number:20230001, number: 20230001,
name:"XXX任务", name: "XXX任务",
type:"2023-07-30 16:30:21", type: "2023-07-30 16:30:21",
unit:"2023-07-30", unit: "2023-07-30",
time:"2023-07-30 16:30:21", time: "2023-07-30 16:30:21",
status:0, status: 0,
},{ }, {
number:20230001, number: 20230001,
name:"XXX任务", name: "XXX任务",
type:"2023-07-30 16:30:21", type: "2023-07-30 16:30:21",
unit:"2023-07-30", unit: "2023-07-30",
time:"2023-07-30 16:30:21", time: "2023-07-30 16:30:21",
status:1, status: 1,
},{ }, {
number:20230001, number: 20230001,
name:"XXX任务", name: "XXX任务",
type:"2023-07-30 16:30:21", type: "2023-07-30 16:30:21",
unit:"2023-07-30", unit: "2023-07-30",
time:"2023-07-30 16:30:21", time: "2023-07-30 16:30:21",
status:3, status: 3,
},{ }, {
number:20230001, number: 20230001,
name:"XXX任务", name: "XXX任务",
type:"2023-07-30 16:30:21", type: "2023-07-30 16:30:21",
unit:"2023-07-30", unit: "2023-07-30",
time:"2023-07-30 16:30:21", time: "2023-07-30 16:30:21",
status:4, status: 4,
}, },
], ],
loading:false, loading: false,
tabHeader: undefined, tabHeader: undefined,
ruleForm:{ ruleForm: {
taskName:"", taskName: "",
unit:"", dwmc: [],
time:"", taskDeadline: "",
}, },
rules: { rules: {
name: [ taskName: [
{ required: true, message: '请输入活动名称', trigger: 'blur' }, { required: true, message: '请输入', trigger: 'blur' },
], ],
region: [ dwmc: [
{ required: true, message: '请选择活动区域', trigger: 'change' } { required: true, message: '请选择', trigger: 'change' }
], ],
date1: [ taskDeadline: [
{ type: 'date', required: true, message: '请选择日期', trigger: 'change' } { required: true, message: '请选择日期', trigger: 'change' }
], ],
} },
tabclicklist: []
} }
}, },
mounted(){ mounted() {
this.getInfo(); this.getInfo();
this.cancalDebounce(); this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce); window.addEventListener('resize', this.cancalDebounce);
@ -242,9 +229,45 @@ export default {
destroyed() { destroyed() {
window.removeEventListener('resize', this.cancalDebounce); 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; // this.loading = true;
// jProject(this.pagination).then(res=>{ // jProject(this.pagination).then(res=>{
// this.loading = false; // this.loading = false;
@ -253,13 +276,13 @@ export default {
// }) // })
}, },
// //
resetQuery(){ resetQuery() {
this.formInline = { this.formInline = {
name:"", name: "",
type:"", type: "",
time:[], time: [],
number:"", number: "",
status:"", status: "",
} }
this.pagination = { this.pagination = {
current: 1, current: 1,
@ -267,59 +290,79 @@ export default {
} }
this.getList(); 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 = { this.pagination = {
current: 1, current: 1,
size: 10 size: 10
} }
if(this.formInline.time.length > 0) { if (this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0] this.formInline.startTime = this.formInline.time[0]
this.formInline.endTime = this.formInline.time[1] this.formInline.endTime = this.formInline.time[1]
} }
this.pagination = { ...this.pagination,...this.formInline }; this.pagination = { ...this.pagination, ...this.formInline };
this.getList(); this.getList();
}, },
// //
getPagination(pages){ getPagination(pages) {
this.pagination.current = pages.page; this.pagination.current = pages.page;
this.pagination.size = pages.limit; this.pagination.size = pages.limit;
this.getList(); this.getList();
}, },
// //
handleImport(){}, handleImport() { },
// //
handleExport(){}, handleExport() { },
// //
handleAdd(){ handleAdd() {
this.$refs.taskDialog.open() this.$refs.taskDialog.open()
}, },
// //
importClose(){}, importClose() {
},
// //
goInfo(){ goInfo() {
this.$router.push({name: 'TaskInfo',query: { this.$router.push({
name: 'TaskInfo', query: {
pageType: "info", pageType: "info",
}}) }
})
}, },
// //
edit(){ edit() {
}, },
// //
delInfo(){ delInfo() {
this.$router.push({name: 'taskAudit',query: { this.$router.push({
name: 'taskAudit', query: {
pageType: "info", pageType: "info",
}}) }
})
}, },
// table // table
tableRowClassName({row, rowIndex}){ tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 !== 0) { if (rowIndex % 2 !== 0) {
return 'evenNumber-row'; return 'evenNumber-row';
} }
return ''; return '';
}, },
// //
cancalDebounce(){ cancalDebounce() {
const element = document.getElementById('L-size-main'); // ID const element = document.getElementById('L-size-main'); // ID
const header = document.getElementById('L-header'); // ID const header = document.getElementById('L-header'); // ID
const pagination = document.getElementById('L-pagination'); // ID const pagination = document.getElementById('L-pagination'); // ID
@ -331,3 +374,9 @@ export default {
}, },
} }
</script> </script>
<style lang="scss" scoped>
.el-icon-s-unfold {
font-size: 16px;
}
</style>

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