master
lion 2 years ago
parent 08d795e848
commit 45eec7a224

@ -42,12 +42,12 @@
</div>
</div>
<div>
<div style="margin-bottom:15px;">
<el-button v-if="select.category_type_id" @click="$refs['create'].setType('add'),
<div style="background: #fff;border-radius: 10px;padding-top:10px">
<div style="margin:10px;margin-top:0px">
<el-button size="small" type="primary" v-if="select.category_type_id" @click="$refs['create'].setType('add'),
$refs['create'].setForm('type_id', select.category_type_id),
$refs['create'].setForm('year', select.year.toString()),
$refs['create'].show()" plain>新建{{select.year}}{{select.categoryTypeName}}清单</el-button>
$refs['create'].show()">新建{{select.year}}{{select.categoryTypeName}}清单</el-button>
</div>
<xy-table ref="xyTable" :is-page="false" :list="list" res-prop="" :indent="20" :row-key="row => row._index"
:table-item="table" :auths="auths_auth_mixin" :req-opt="select" :destroy-action="destroy" @editor="row => {
@ -62,7 +62,7 @@
size="mini" @click="">整体克隆</el-button>
</template>
<template slot-scope="scope">
<div style="display: flex;">
<div style="display: flex;justify-content: center;">
<Button v-if="scope.row._type !== 'type'" size="small" type="primary" @click="$refs['create'].setId(scope.row.id),
$refs['create'].setType('editor'),
$refs['create'].show();">编辑</Button>
@ -169,7 +169,7 @@
label: '清单',
align: "left",
// fixed:'left',
width:600,
// width:600,
customFn: row => {
return row._type === 'type' ? ( <span> <i style = "padding: 0 8px;color: rgb(239, 216, 117);"
class = "el-icon-folder-opened"> </i><span style="text-wrap:wrap">{row.title}</span> </span>) : ( <span> < i style = "padding: 0 8px;"
@ -185,7 +185,7 @@
prop: "records_count",
label: "预警规则",
// fixed:"right",
// width:300,
width:280,
customFn: row => {
return(<div>
<el-button plain type='primary' size="mini"
@ -353,5 +353,10 @@
::v-deep .el-table .cell.el-tooltip{
white-space: wrap!important;
text-wrap:wrap
}
::v-deep .v-header .selerchcontent{
background: #fff;
padding: 10px;
border-radius: 10px;
}
</style>

@ -8,7 +8,7 @@
<div slot="content"></div>
<slot>
<header-content :auths="auths_auth_mixin">
<template #search>
<!-- <template #search>
<div style="display: flex">
<Button
type="primary"
@ -16,7 +16,7 @@
>查询</Button
>
</div>
</template>
</template> -->
<template #create>
<Button
type="primary"

@ -8,46 +8,34 @@
<header-content :auths="auths_auth_mixin">
<template #search>
<div>
<div style="margin-bottom:15px;margin-top:15px;">
<div style="margin-bottom:15px;margin-top:15px;display: flex;align-items: start;">
<span style="margin-right:15px;display: inline-block;width:45px;vertical-align: top;">年度 </span>
<el-radio-group style="width:90%" v-model="select.year" @change="changeYear">
<el-radio style="margin-right:5px;margin-bottom:5px;margin-left:0" v-for="item in yearList" border
:label="item">{{item}}</el-radio>
</el-radio-group>
</div>
<div>
<div style="display: flex;align-items: start;">
<span style="margin-right:15px;display: inline-block;width:45px;vertical-align: top;">类型 </span>
<el-radio-group style="width:90%" @change="changeCategoryType" v-model="select.category_type_id">
<el-radio style="margin-right:5px;margin-bottom:5px;margin-left:0" v-for="item in categoryTypeList" border
:label="item.id">{{item.title}}</el-radio>
</el-radio-group>
</div>
<!-- <el-date-picker size="small" style="width: 110px;" placeholder="请选择日期" value-format="yyyy" v-model="select.year" type="year"></el-date-picker> -->
<!-- <Button
style="margin-left: 10px;"
type="primary"
@click="getList"
>查询</Button> -->
</div>
</template>
<!-- <template #create>
<Button type="primary" @click="$refs['create'].setType('add'),$refs['create'].show()"></Button>
</template>
<template #setting>
<Button type="primary" :ghost="isStartSelect" @click="isStartSelect = !isStartSelect">设置清单类型</Button>
</template> -->
</header-content>
</slot>
</LxHeader>
</div>
</div>
<div>
<div style="margin-bottom:15px;">
<el-button v-if="select.category_type_id" @click="$refs['create'].setType('add'),
<div style="background: #fff;border-radius: 10px;padding-top:10px">
<div style="margin:10px;margin-top:0px">
<el-button size="small" type="primary" v-if="select.category_type_id" @click="$refs['create'].setType('add'),
$refs['create'].setForm('type_id', select.category_type_id),
$refs['create'].setForm('year', select.year.toString()),
$refs['create'].show()" plain>新建{{select.year}}{{select.categoryTypeName}}清单</el-button>
$refs['create'].show()" >新建{{select.year}}{{select.categoryTypeName}}清单</el-button>
</div>
<xy-table ref="xyTable" :is-page="false" :list="list" res-prop="" :indent="20" :row-key="row => row._index"
:table-item="table" :auths="auths_auth_mixin" :req-opt="select" :destroy-action="destroy" @editor="row => {
@ -316,5 +304,10 @@
::v-deep .el-table .cell.el-tooltip{
white-space: wrap!important;
text-wrap:wrap
}
::v-deep .v-header .selerchcontent{
background: #fff;
padding: 10px;
border-radius: 10px;
}
</style>

@ -8,7 +8,7 @@
<div slot="content"></div>
<slot>
<header-content :auths="auths_auth_mixin">
<template #search>
<!-- <template #search>
<div style="display: flex">
<Button
type="primary"
@ -16,7 +16,7 @@
>查询</Button
>
</div>
</template>
</template> -->
<template #create>
<Button
type="primary"

@ -13,23 +13,23 @@
</slot>
</LxHeader>
</div>
<div>
<div class="formwrap" :style="{'height':tableHeight+'px'}">
<div>
<div style="margin-bottom:15px;margin-top:15px;">
<div style="margin-bottom:15px;margin-top:15px;display: flex;align-items: start;">
<span style="margin-bottom:15px;display: inline-block;width:45px;vertical-align: top;">年度 </span>
<el-radio-group style="width:90%" v-model="select.year" @change="changeYear">
<el-radio style="margin-right:5px;margin-bottom:15px;margin-left:0" v-for="item in yearList" border
:label="item">{{item}}</el-radio>
</el-radio-group>
</div>
<div style="margin-bottom:15px;margin-top:15px;">
<div style="margin-bottom:15px;margin-top:15px;">
<span style="margin-bottom:15px;display: inline-block;width:45px;vertical-align: top;">部门 </span>
<el-select v-model="select.department_id" @change="changeDep" placeholder="请选择">
<el-option v-for="item in depList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
<div style="margin-bottom:15px;margin-top:15px;">
<div style="margin-bottom:15px;margin-top:15px;display: flex;align-items: start;">
<span style="margin-bottom:15px;display: inline-block;width:45px;vertical-align: top;">类型 </span>
<el-radio-group style="width:90%" @change="changeCategoryType" v-model="select.category_type_id">
<el-radio style="margin-right:5px;margin-bottom:5px;margin-left:0" v-for="item in categoryTypeList" border
@ -37,7 +37,10 @@
</el-radio-group>
</div>
<!-- <el-date-picker size="small" style="width: 110px;" placeholder="请选择日期" value-format="yyyy" v-model="select.year" type="year"></el-date-picker> -->
<Button style="margin-left: 10px;width:300px" type="primary" @click="goForm"></Button>
<div style="margin-top:30px">
<Button style="margin-left: 10px;width:300px;max-width: 300px;min-width: 300px;" size="large" type="primary"
@click="goForm">进入填报</Button>
</div>
</div>
</div>
</div>
@ -67,19 +70,27 @@
},
data() {
return {
tableHeight: 0,
yearList: [],
categoryTypeList: [],
depList: [],
select: {
year: '',
department_id: '',
department_name:'',
department_id: '',
department_name: '',
category_type_id: '',
categoryTypeName: ''
},
}
},
created() {
let clientHeight = document.documentElement.clientHeight;
// let lxheader = document.querySelector(".v-header")?.getBoundingClientRect();
// let lxHeader_height = lxheader.height + 25; //
let paginationHeight = 37; //
let topHeight = 50; //
this.tableHeight =
clientHeight - topHeight - paginationHeight - 20 - 25;
this.getPastYears()
this.getCategoryType()
this.getDep()
@ -100,23 +111,23 @@
this.select.categoryTypeName = res.length > 0 ? res[0].title : ''
})
},
changeDep(e){
this.depList.map(item=>{
if(item.id===e){
this.select.department_id = item.id
this.select.department_name = item.name
}
})
},
changeDep(e) {
this.depList.map(item => {
if (item.id === e) {
this.select.department_id = item.id
this.select.department_name = item.name
}
})
},
changeYear(e) {},
changeCategoryType(e) {
this.categoryTypeList.map(item=>{
if(item.id===e){
this.select.category_type_id = item.id
this.select.categoryTypeName = item.title
}
})
changeCategoryType(e) {
this.categoryTypeList.map(item => {
if (item.id === e) {
this.select.category_type_id = item.id
this.select.categoryTypeName = item.title
}
})
},
async getPastYears(years) {
@ -124,19 +135,19 @@
this.yearList = res.years
this.select.year = res.selected_year
})
},
goForm(){
if(!this.select.department_id){
this.$message({
type:'warning',
message:'请选择部门'
})
return
}
this.$router.push({
path:'/departmentH5',
query:this.select
})
},
goForm() {
if (!this.select.department_id) {
this.$message({
type: 'warning',
message: '请选择部门'
})
return
}
this.$router.push({
path: '/departmentH5',
query: this.select
})
}
},
@ -161,4 +172,20 @@
white-space: wrap !important;
text-wrap: wrap
}
.formwrap {
padding: 50px;
background: #fff;
border-radius: 10px;
// display: flex;
// justify-content: center;
// width: 100%;
&>div {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
</style>

@ -5,7 +5,16 @@
<slot>
<div style="display: flex">
<div style="margin-right:10px">
<DatePicker v-model="select.year" @on-change="changeYear" type="year" placeholder="选择年份" style="width: 150px" />
<el-date-picker
v-model="select.year"
@change="changeYear"
value-format="yyyy"
format="yyyy"
type="year"
style="width:150px;height:30px"
class="getyear"
placeholder="选择总览年份">
</el-date-picker>
</div>
<div style="margin-right:10px">
<Select v-model="select.department_id" placeholder="请选择部门" style="width:150px">
@ -19,7 +28,7 @@
<Button
type="primary"
@click="$refs['xyTable'].getTableData(true)"
@click="getList"
>查询</Button
>
</div>
@ -30,7 +39,8 @@
<xy-table ref="xyTable"
:table-item="table"
:auths="auths_auth_mixin"
:action="index">
:list='list'
>
<template v-slot:btns>
<el-table-column align='center' fixed="right" label="操作" width="100" header-align="center">
<template slot-scope="scope">
@ -66,6 +76,7 @@ export default {
keyword:''
},
depList:[],
list:[],
table: [
{
type: "index",
@ -88,12 +99,12 @@ export default {
width: 120
},
{
prop: "start_date",
prop: "start_at",
label: "开始填报日期",
width: 160
},
{
prop: "end_date",
prop: "end_at",
label: "结束填报日期",
width: 160
},
@ -140,10 +151,18 @@ export default {
},
created(){
this.getDep()
this.getList()
},
methods: {
index,destroy,
getList(){},
destroy,
async getList(){
const res = await index({
page:1,
page_size:10,
...this.select
})
this.list = res.data
},
changeYear(){
},
@ -161,4 +180,12 @@ export default {
</script>
<style scoped lang="scss">
::v-deep .getyear{
input{
height:30px;
}
.el-input__icon{
line-height: 30px;
}
}
</style>

@ -6,6 +6,8 @@
<el-date-picker
v-model="select.year"
@change="changeYear"
value-format="yyyy"
format="yyyy"
type="year"
placeholder="选择总览年份">
</el-date-picker>
@ -52,7 +54,15 @@
this.getOverview()
},
methods:{
changeYear(e){},
changeYear(e){
if(e){
this.select.year = e
this.getOverview()
}else{
this.select.year = this.$moment().format('YYYY')
this.getOverview()
}
},
getOverview(){
overview({
year:this.select.year

@ -17,13 +17,20 @@
:value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>
</div>
<div style="margin-right:10px">
<span>部门</span>
<Select v-model="select.depatment_id" style="width:120px">
<Option v-for="item in depList"
:value="item.id" :key="item.id">{{ item.name }}</Option>
</Select>
</div>
<div style="margin-right:10px">
<Input v-model="select.keyword" placeholder="请输入关键字" style="width: 150px" />
</div>
<Button
type="primary"
@click="$refs['xyTable'].getTableData(true)"
@click="getList"
>查询</Button
>
</div>
@ -44,7 +51,7 @@
<xy-table ref="xyTable"
:table-item="table"
:auths="auths_auth_mixin"
:action="index"
:list="list"
:destroy-action="destroy"
@editor="row => {
$refs['create'].setId(row.id);
@ -52,7 +59,7 @@
$refs['create'].show();
}"></xy-table>
<create ref="create" @refresh="$refs['xyTable'].getTableData()"></create>
<create ref="create" @refresh="getList"></create>
</div>
</template>
@ -62,6 +69,7 @@ import { authMixin } from "@/mixin/authMixin";
import headerContent from "@/components/LxHeader/XyContent.vue";
import LxHeader from "@/components/LxHeader/index.vue";
import create from "./component/create.vue"
import { listCommondepartment } from "@/api/common";
export default {
mixins: [authMixin],
components: {
@ -73,8 +81,11 @@ export default {
return {
select:{
status:'',
depatment_id:'',
keyword:''
},
list:[],
depList:[],
statusList:[{
label:'开启填报',
value:0
@ -107,12 +118,12 @@ export default {
width: 120
},
{
prop: "start_date",
prop: "start_at",
label: "开始填报日期",
width: 160
},
{
prop: "end_date",
prop: "end_at",
label: "结束填报日期",
width: 160
},
@ -160,8 +171,28 @@ export default {
]
}
},
created(){
this.getDepList()
this.getList()
},
methods: {
async getList(){
const res = await index({
page:1,
page_size:10,
...this.select
})
this.list = res.data
},
index,destroy,
getDepList(){
var that = this;
listCommondepartment().then(response => {
that.depList = response.data;
}).catch(error => {
//reject(error)
})
},
},
computed: {},
}

@ -7,8 +7,9 @@
<div slot="content"></div>
<slot>
<div>
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
<Button type="primary" @click="edit()" style="margin-left: 10px">新增部门</Button>
<!-- <Button type="primary" @click="load" style="margin-left: 10px">查询</Button> -->
<Button type="primary" @click="edit()" style="margin:0 10px">立即同步</Button>
<span>最后同步时间</span>
</div>
</slot>
</LxHeader>

Loading…
Cancel
Save