Browse Source

Merge branch 'dev-jmlb0908' into dev

dev-用户反馈
jiangyy 3 years ago
parent
commit
569bee30f4
  1. 4
      .env.development
  2. 1102
      src/js/dai/nongli.js
  3. 68
      src/views/modules/communityParty/calendar/cpts/calendar.vue
  4. 198
      src/views/modules/communityParty/calendar/index.vue
  5. 59
      src/views/modules/workSys/resiCate.vue

4
.env.development

@ -1,7 +1,7 @@
NODE_ENV=development NODE_ENV=development
# VUE_APP_API_SERVER = http://epmet-dev.elinkservice.cn:41080/api # VUE_APP_API_SERVER = http://epmet-dev.elinkservice.cn:41080/api
# VUE_APP_API_SERVER = http://192.168.1.140/api VUE_APP_API_SERVER = http://192.168.1.140/api
VUE_APP_API_SERVER = https://epmet-yantai.elinkservice.cn/api # VUE_APP_API_SERVER = https://epmet-yantai.elinkservice.cn/api
# VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api # VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api
# VUE_APP_API_SERVER = https://epmet-cloud.elinkservice.cn/api # VUE_APP_API_SERVER = https://epmet-cloud.elinkservice.cn/api
# VUE_APP_API_SERVER = https://epdc-shibei.elinkservice.cn/api # VUE_APP_API_SERVER = https://epdc-shibei.elinkservice.cn/api

1102
src/js/dai/nongli.js

File diff suppressed because it is too large

68
src/views/modules/communityParty/calendar/cpts/calendar.vue

@ -1,16 +1,19 @@
<template> <template>
<div class="m-calendar"> <div class="m-calendar">
<div class="top-list"> <div class="top-list">
<div class="top" <div
class="top"
v-for="(item, index) in top" v-for="(item, index) in top"
:class="{ 'z-weekend': index > 4 }" :class="{ 'z-weekend': index > 4 }"
:key="item"> :key="item"
>
{{ item }} {{ item }}
</div> </div>
</div> </div>
<!-- 日历号 --> <!-- 日历号 -->
<div class="date-list"> <div class="date-list">
<div class="date-item" <div
class="date-item"
:class="{ :class="{
'z-on': item.format == currentDate, 'z-on': item.format == currentDate,
'z-this-month': item.thisMonth, 'z-this-month': item.thisMonth,
@ -20,17 +23,21 @@
}" }"
v-for="(item, index) in visibleCalendar" v-for="(item, index) in visibleCalendar"
:key="index" :key="index"
@click="handleClickDate(item)"> @click="handleClickDate(item)"
>
<div class="date">{{ item.date }}</div> <div class="date">{{ item.date }}</div>
<slot name="date-item" <div class="nongli">
v-bind:item="item" {{ computeNongliText(item.year, item.month, item.date) }}
v-bind:index="index"></slot> </div>
<slot name="date-item" v-bind:item="item" v-bind:index="index"> </slot>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import nongli from "@/js/dai/nongli";
export default { export default {
props: { props: {
currentYear: { currentYear: {
@ -120,6 +127,11 @@ export default {
this.init(); this.init();
}, },
methods: { methods: {
computeNongliText(y, m, d) {
let item = nongli.solar2lunar(y, m + 1, d);
return item.festival || item.lunarFestival || item.Term || item.IDayCn;
},
init() { init() {
if (!this.currentDate) { if (!this.currentDate) {
this.handleClickDate( this.handleClickDate(
@ -152,8 +164,8 @@ export default {
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
border-left: 1px solid #eee; border-left: 1px solid #e5e5e5;
border-top: 1px solid #eee; border-top: 1px solid #e5e5e5;
pointer-events: none; pointer-events: none;
} }
@ -166,7 +178,7 @@ export default {
padding: 20px 0; padding: 20px 0;
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
background-color: #E6A23C; background-color: rgba(#ccc, 0.2);
text-align: center; text-align: center;
&::after { &::after {
@ -177,9 +189,9 @@ export default {
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
border-right: 1px solid #eee; border-right: 1px solid #e5e5e5;
pointer-events: none; pointer-events: none;
border-bottom: 1px solid #eee; border-bottom: 1px solid #e5e5e5;
} }
&.z-weekend { &.z-weekend {
@ -210,8 +222,8 @@ export default {
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
border-right: 1px solid #eee; border-right: 1px solid #e5e5e5;
border-bottom: 1px solid #eee; border-bottom: 1px solid #e5e5e5;
pointer-events: none; pointer-events: none;
} }
@ -223,16 +235,36 @@ export default {
color: #3e8ef7; color: #3e8ef7;
} }
.nongli {
position: absolute;
z-index: 0;
left: 0;
right: 0;
text-align: center;
color: #bbb;
font-size: 16px;
font-weight: bold;
}
&.z-weekend {
.date {
color: #ff3333;
}
}
&.z-on { &.z-on {
z-index: 21; z-index: 21;
box-shadow: 0 0 15px 5px #a8cee0; box-shadow: 0 0 15px 5px #a8cee0;
background:#3E8EF7; background: #3e8ef7;
.date { .date {
font-size: 30px; font-size: 30px;
color: #ffffff; color: #ffffff;
font-weight: bold; font-weight: bold;
} }
.nongli {
color: #ffffff;
}
} }
&.z-this-month { &.z-this-month {
@ -244,12 +276,6 @@ export default {
font-weight: 700; font-weight: 700;
} }
} }
&.z-weekend {
.date {
color: #ff3333;
}
}
} }
} }
} }

198
src/views/modules/communityParty/calendar/index.vue

@ -1,25 +1,28 @@
<template> <template>
<div> <div>
<div v-if="showType === 'list'" <div v-if="showType === 'list'" class="g-cnt">
class="g-cnt">
<el-row :gutter="15"> <el-row :gutter="15">
<el-col :span="6"> <el-col :span="6">
<div class="m-sizer"> <div class="m-sizer">
<div class="item"> <div class="item">
<el-cascader class="customer_cascader" <el-cascader
class="customer_cascader"
ref="myCascader" ref="myCascader"
size="big" size="big"
v-model="fmData.orgId" v-model="fmData.orgId"
:options="partyOptions" :options="partyOptions"
:props="partyOptionsProps" :props="partyOptionsProps"
:show-all-levels="false" :show-all-levels="false"
@change="handleChangeParty"></el-cascader> @change="handleChangeParty"
></el-cascader>
</div> </div>
<div class="item"> <div class="item">
<el-radio v-model="fmData.isSelf" <el-radio v-model="fmData.isSelf" label="1"
label="1">本人创建的活动</el-radio> >本人创建的活动</el-radio
<el-radio v-model="fmData.isSelf" >
label="0">本组织所有活动</el-radio> <el-radio v-model="fmData.isSelf" label="0"
>本组织所有活动</el-radio
>
</div> </div>
</div> </div>
@ -31,16 +34,20 @@
<div class="date-week">{{ currentDate.dayFormat }}</div> <div class="date-week">{{ currentDate.dayFormat }}</div>
</div> </div>
<div class="m-list" <div
class="m-list"
v-if=" v-if="
currentDateData.activityList.length > 0 || currentDateData.activityList.length > 0 ||
currentDateData.scheduleList.length > 0 currentDateData.scheduleList.length > 0
"> "
>
<div class="list-title">今日活动/日程</div> <div class="list-title">今日活动/日程</div>
<div class="list"> <div class="list">
<div class="item" <div
class="item"
:key="item.activityId" :key="item.activityId"
v-for="item in currentDateData.activityList"> v-for="item in currentDateData.activityList"
>
<div class="item-title"> <div class="item-title">
{{ item.theme }} {{ item.theme }}
</div> </div>
@ -64,23 +71,33 @@
<span>参加组织</span> <span>参加组织</span>
<span>{{ item.joinOrgs.join("、") }}</span> <span>{{ item.joinOrgs.join("、") }}</span>
</div> </div>
<div v-if="item.isMe" <div v-if="item.isMe" class="item-ope">
class="item-ope"> <el-button
<el-button type="primary" type="primary"
v-if="item.isPublish === '0'" v-if="item.isPublish === '0'"
size="mini" size="mini"
@click="handleClickHuodong('publish', item)">发布</el-button> @click="handleClickHuodong('publish', item)"
<el-button type="success" >发布</el-button
>
<el-button
type="success"
size="mini" size="mini"
@click="handleClickHuodong('edit', item)">修改</el-button> @click="handleClickHuodong('edit', item)"
<el-button size="mini" >修改</el-button
@click="handleClickHuodong('del', item)">删除</el-button> >
<el-button
size="mini"
@click="handleClickHuodong('del', item)"
>删除</el-button
>
</div> </div>
</div> </div>
<div class="item" <div
class="item"
:key="item.scheduleId" :key="item.scheduleId"
v-for="item in currentDateData.scheduleList"> v-for="item in currentDateData.scheduleList"
>
<div class="item-title"> <div class="item-title">
{{ item.title }} {{ item.title }}
</div> </div>
@ -97,22 +114,29 @@
<span>{{ item.remark }}</span> <span>{{ item.remark }}</span>
</div> </div>
<div class="item-ope"> <div class="item-ope">
<el-button type="success" <el-button
type="success"
size="mini"
@click="handleClickRicheng('edit', item)"
>修改</el-button
>
<el-button
size="mini" size="mini"
@click="handleClickRicheng('edit', item)">修改</el-button> @click="handleClickRicheng('del', item)"
<el-button size="mini" >删除</el-button
@click="handleClickRicheng('del', item)">删除</el-button> >
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="m-ope"> <div class="m-ope">
<el-button type="warning" <el-button type="warning" style="width: 48%" @click="addHudong"
style="width: 48%" >添加活动计划</el-button
@click="addHudong">添加活动计划</el-button> >
<el-button style="width: 48%" <el-button style="width: 48%" @click="addRicheng"
@click="addRicheng">添加日程</el-button> >添加日程</el-button
>
</div> </div>
</el-col> </el-col>
@ -120,54 +144,74 @@
<div class="m-cal"> <div class="m-cal">
<div class="hd"> <div class="hd">
<div class="hd-year"> <div class="hd-year">
<el-date-picker v-model="currentYearStr" <el-date-picker
v-model="currentYearStr"
value-format="yyyy" value-format="yyyy"
type="year" type="year"
placeholder="选择年度" placeholder="选择年度"
size="big" size="big"
style="width: 100px;"> style="width: 100px"
:editable="false"
:clearable="false"
>
</el-date-picker> </el-date-picker>
</div> </div>
<div class="hd-month"> <div class="hd-month">
<div class="month-item" <div
class="month-item"
:class="{ 'z-on': m - 1 == currentMonth }" :class="{ 'z-on': m - 1 == currentMonth }"
:key="'month' + m" :key="'month' + m"
@click="currentMonth = m - 1" @click="currentMonth = m - 1"
v-for="m in 12"> v-for="m in 12"
<el-badge :value="monthData[m-1]" >
<el-badge
:value="monthData[m - 1]"
:hidden="monthData[m - 1] == 0" :hidden="monthData[m - 1] == 0"
class="item"> class="item"
>
<div class="month-text">{{ m }}</div> <div class="month-text">{{ m }}</div>
</el-badge> </el-badge>
</div> </div>
</div> </div>
<div class="hd-btn"> <div class="hd-btn">
<el-button type="primary" <el-button
type="primary"
size="big" size="big"
@click="handleAddYearPlan" @click="handleAddYearPlan"
style="padding-left:10px; padding-right:10px;">生成年度活动计划</el-button> style="padding-left: 10px; padding-right: 10px"
>生成年度活动计划</el-button
>
</div> </div>
</div> </div>
<calendar :currentYear="currentYear" <calendar
:currentYear="currentYear"
:currentMonth="currentMonth" :currentMonth="currentMonth"
@rangeChange="handleRangeChange" @rangeChange="handleRangeChange"
@clickDate="handleChangeDate"> @clickDate="handleChangeDate"
>
<template v-slot:date-item="{ item, index }"> <template v-slot:date-item="{ item, index }">
<div class="tip" <div
class="tip"
v-if=" v-if="
rangeData[item.dateId] && rangeData[item.dateId] &&
rangeData[item.dateId].activityList.length > 0 rangeData[item.dateId].activityList.length > 0
"> "
<div class="tip-num" >
v-if="rangeData[item.dateId].activityList.length > 1"> <div
class="tip-num"
v-if="rangeData[item.dateId].activityList.length > 1"
>
{{ rangeData[item.dateId].activityList.length }} {{ rangeData[item.dateId].activityList.length }}
</div> </div>
<div class="tip-text"> <div class="tip-text">
<span class="z-on"> <span class="z-on">
{{ rangeData[item.dateId].activityList[0].actTypeName }}</span>
{{ {{
rangeData[item.dateId].activityList[0].isPublish==='0' rangeData[item.dateId].activityList[0].actTypeName
}}</span
>
{{
rangeData[item.dateId].activityList[0].isPublish === "0"
? "(未发布)" ? "(未发布)"
: "(已发布)" : "(已发布)"
}} }}
@ -176,11 +220,12 @@
{{ rangeData[item.dateId].activityList[0].topic }} {{ rangeData[item.dateId].activityList[0].topic }}
</div> </div>
<div class="all-list" <div class="all-list" :class="computeAllListClass(index)">
:class="computeAllListClass(index)"> <div
<div class="item" class="item"
:key="item.activityId" :key="item.activityId"
v-for="item in rangeData[item.dateId].activityList"> v-for="item in rangeData[item.dateId].activityList"
>
<div class="item-title"> <div class="item-title">
{{ item.theme }} {{ item.theme }}
</div> </div>
@ -207,21 +252,24 @@
</div> </div>
</div> </div>
</div> </div>
<div class="corn" <div
class="corn"
v-if=" v-if="
rangeData[item.dateId] && rangeData[item.dateId] &&
rangeData[item.dateId].scheduleList.length > 0 rangeData[item.dateId].scheduleList.length > 0
"> "
>
<div class="corn-num"> <div class="corn-num">
{{ rangeData[item.dateId].scheduleList.length }} {{ rangeData[item.dateId].scheduleList.length }}
</div> </div>
<div class="corn-text">日程</div> <div class="corn-text">日程</div>
<div class="all-list" <div class="all-list" :class="computeAllListClass(index)">
:class="computeAllListClass(index)"> <div
<div class="item" class="item"
:key="item.scheduleId" :key="item.scheduleId"
v-for="item in rangeData[item.dateId].scheduleList"> v-for="item in rangeData[item.dateId].scheduleList"
>
<div class="item-title"> <div class="item-title">
{{ item.title }} {{ item.title }}
</div> </div>
@ -248,12 +296,15 @@
</div> </div>
<div v-if="showType === 'yearplan'"> <div v-if="showType === 'yearplan'">
<yearplan-list :currentYearStr="currentYearStr" <yearplan-list
:currentYearStr="currentYearStr"
@handleOk="handleAddPlanOk" @handleOk="handleAddPlanOk"
@handleClose="handleAddPlanClose"></yearplan-list> @handleClose="handleAddPlanClose"
></yearplan-list>
</div> </div>
<el-dialog v-if="showAdd" <el-dialog
v-if="showAdd"
:visible.sync="showAdd" :visible.sync="showAdd"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
@ -261,16 +312,20 @@
width="850px" width="850px"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@closed="showAdd = false"> @closed="showAdd = false"
<add-activity ref="ref_add_form" >
<add-activity
ref="ref_add_form"
:formType="formType" :formType="formType"
:icPartyActId="icPartyActId" :icPartyActId="icPartyActId"
:defaultTime="currentDate.dateId" :defaultTime="currentDate.dateId"
@handleOk="handleOk" @handleOk="handleOk"
@handleClose="handleClose"></add-activity> @handleClose="handleClose"
></add-activity>
</el-dialog> </el-dialog>
<el-dialog v-if="showSchedule" <el-dialog
v-if="showSchedule"
:visible.sync="showSchedule" :visible.sync="showSchedule"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
@ -278,12 +333,15 @@
width="850px" width="850px"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@closed="showSchedule = false"> @closed="showSchedule = false"
<schedule-form ref="ref_schedule_form" >
<schedule-form
ref="ref_schedule_form"
:formType="formType" :formType="formType"
:scheduleId="scheduleId" :scheduleId="scheduleId"
@handleOk="handleOk" @handleOk="handleOk"
@handleClose="handleClose"> @handleClose="handleClose"
>
</schedule-form> </schedule-form>
</el-dialog> </el-dialog>
</div> </div>
@ -411,7 +469,7 @@ export default {
// //
addRicheng() { addRicheng() {
this.formType = "schedule"; this.formType = "schedule";
this.scheduleId = '' this.scheduleId = "";
this.showSchedule = true; this.showSchedule = true;
}, },
@ -624,7 +682,7 @@ export default {
this.monthData[index] = parseInt(item.count); this.monthData[index] = parseInt(item.count);
}); });
console.log("--------------monthData", this.monthData); console.log("--------------monthData", this.monthData);
this.$forceUpdate() this.$forceUpdate();
} }
} else { } else {
this.$message.error(msg); this.$message.error(msg);
@ -739,6 +797,8 @@ $red: #f33;
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
cursor: pointer; cursor: pointer;
opacity: 0.7;
transform: scale(0.94);
} }
} }
} }

59
src/views/modules/workSys/resiCate.vue

@ -185,6 +185,26 @@
size="small" size="small"
label="描述文字"></el-input-number> / label="描述文字"></el-input-number> /
</el-form-item> </el-form-item>
<el-form-item v-if="form.columnName==='IS_YLFN'"
label="自动匹配">
<el-switch v-model="autoMatching"></el-switch>
</el-form-item>
<el-form-item v-if="form.columnName==='IS_YLFN' && autoMatching"
label="匹配规则">
<span>年龄</span>
<el-input-number v-model="ageMin"
:min="0"
size="small"
label="描述文字"></el-input-number>
<span>{{' — '}}</span>
<el-input-number v-model="ageMax"
:min="ageMin"
size="small"
label="描述文字"></el-input-number>
</el-form-item>
</el-form> </el-form>
<div class="resi-btns"> <div class="resi-btns">
<el-button size="small" <el-button size="small"
@ -290,6 +310,10 @@ export default {
level2: 0, level2: 0,
level3: 0 level3: 0
}, },
autoMatching: false,
ageMin: 0,
ageMax: 1,
rules: { rules: {
managementIcon: [{ required: true, message: '管理平台图标不能为空', trigger: 'blur' }], managementIcon: [{ required: true, message: '管理平台图标不能为空', trigger: 'blur' }],
dataIcon: [{ required: true, message: '数据平台图标不能为空', trigger: 'blur' }], dataIcon: [{ required: true, message: '数据平台图标不能为空', trigger: 'blur' }],
@ -430,8 +454,26 @@ export default {
warn: row.warn == '1' ? true : false, warn: row.warn == '1' ? true : false,
level1: row.level1 || 0, level1: row.level1 || 0,
level2: row.level2 || 0, level2: row.level2 || 0,
level3: row.level3 || 0 level3: row.level3 || 0,
}
if (row.columnName === 'IS_YLFN') {
if (row.autoMatching === '1') {
this.autoMatching = true
} else {
this.autoMatching = false
}
if (row.ylfnValue) {
let array = row.ylfnValue.split(',')
this.ageMin = array[0]
this.ageMax = array[1]
}
} }
this.dialogVisible = true this.dialogVisible = true
}, },
async handleSUbmit () { async handleSUbmit () {
@ -440,6 +482,21 @@ export default {
if (this.form.warn) { if (this.form.warn) {
if (!this.form.level1) return this.$message.error('黄色预警不能为0') if (!this.form.level1) return this.$message.error('黄色预警不能为0')
} }
if (this.form.columnName === 'IS_YLFN') {
this.form.autoMatching = this.autoMatching ? '1' : '0'
if (this.autoMatching) {
if ((this.ageMin > 0 || this.ageMin === 0) && (this.ageMax > 0 || this.ageMax === 0)) {
this.form.ylfnValue = this.ageMin + ',' + this.ageMax
} else {
return this.$message.error('年龄范围不能为空')
}
}
} else {
}
this.btnLoading = true this.btnLoading = true
const _form = { const _form = {
...this.form, ...this.form,

Loading…
Cancel
Save