Browse Source

Merge branch 'dev-calendar' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev-calendar

feature
jiangyy 3 years ago
parent
commit
3773ea0418
  1. 2
      src/assets/scss/modules/visual/command.scss
  2. 167
      src/views/modules/communityParty/calendar/cpts/calendar.vue
  3. 45
      src/views/modules/communityParty/calendar/index.vue
  4. 15
      src/views/modules/visual/command/index.vue
  5. 1
      src/views/modules/visual/cpts/map/index.vue
  6. 36
      src/views/modules/worklog/icworklog-add-or-update.vue

2
src/assets/scss/modules/visual/command.scss

@ -63,7 +63,7 @@
.m-search {
position: absolute;
z-index: 200;
z-index: 4;
left: 0;
right: 0;
top: 30px;

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

@ -0,0 +1,167 @@
<template>
<div>
<el-row>
<!-- 左侧提示早班晚班或者上午下午 -->
<el-col :span="1">
<div class="date-con tip-con">
<el-col
v-for="item in 6"
:key="item"
class="date thisMonth tip"
:span="1"
>
<div class="morning">早班</div>
<div class="evening">晚班</div>
</el-col>
</div>
</el-col>
<!-- 右侧周一到周五具体内容 -->
<el-col :span="11">
<!-- 第一行表头周一到周日 -->
<div class="top-con">
<div class="top" v-for="item in top" :key="item">星期{{ item }}</div>
</div>
<!-- 日历号 -->
<div class="date-con">
<div
class="date"
:class="[item.thisMonth, item.isToday, item.afterToday]"
v-for="(item, index) in visibleCalendar"
:key="index"
>
<div>{{ item.day }}</div>
<div class="morning">张三李四</div>
<div class="evening">王五赵六</div>
</div>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
props: {
time: {
type: Object,
default: () => {
return {
year: new Date().getFullYear(),
month: new Date().getMonth(),
};
},
},
},
data() {
return {
top: ["一", "二", "三", "四", "五", "六", "日"],
};
},
created() {
console.log("123", this.time);
},
methods: {
//
},
computed: {
// ,42
visibleCalendar() {
//
const today = new Date();
today.setHours(0);
today.setMinutes(0);
today.setSeconds(0);
today.setMilliseconds(0);
const calendarArr = [];
//
const currentFirstDay = new Date(this.time.year, this.time.month, 1);
//
const weekDay = currentFirstDay.getDay();
//
const startDay = currentFirstDay - (weekDay - 1) * 24 * 3600 * 1000;
// 42
for (let i = 0; i < 42; i++) {
const date = new Date(startDay + i * 24 * 3600 * 1000);
calendarArr.push({
date: new Date(startDay + i * 24 * 3600 * 1000),
year: date.getFullYear(),
month: date.getMonth(),
day: date.getDate(),
//
thisMonth:
date.getFullYear() === today.getFullYear() &&
date.getMonth() === today.getMonth()
? "thisMonth"
: "",
//
isToday:
date.getFullYear() === today.getFullYear() &&
date.getMonth() === today.getMonth() &&
date.getDate() === today.getDate()
? "isToday"
: "",
//
afterToday: date.getTime() >= today.getTime() ? "afterToday" : "",
});
}
return calendarArr;
},
},
};
</script>
<style lang="scss" scoped>
.top-con {
display: flex;
align-items: center;
.top {
width: 14.285%;
background-color: rgb(242, 242, 242);
padding: 10px 0;
margin: 5px;
text-align: center;
}
}
.date-con {
display: flex;
flex-wrap: wrap;
.date {
width: 14.285%;
text-align: center;
padding: 5px;
.morning {
padding: 10px 0;
background-color: rgba(220, 245, 253, 0.3);
}
.evening {
padding: 10px 0;
background-color: rgba(220, 244, 209, 0.3);
}
}
.thisMonth {
.morning {
background-color: rgb(220, 245, 253);
}
.evening {
background-color: rgb(220, 244, 209);
}
}
.isToday {
font-weight: 700;
.morning {
background-color: rgb(169, 225, 243);
}
.evening {
background-color: rgb(193, 233, 175);
}
}
}
.tip-con {
margin-top: 51px;
.tip {
margin-top: 21px;
width: 100%;
}
}
</style>

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

@ -0,0 +1,45 @@
<template>
<div class="g-cnt">
<calendar></calendar>
</div>
</template>
<script>
import { requestPost, requestGet } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import calendar from "./cpts/calendar";
export default {
name: "party-calendar",
components: {
calendar,
},
data() {
return {};
},
async mounted() {
// await this.getPartyOggList()
},
methods: {
async getPartyOggList() {
const url = "/resi/partymember/icPartyOrg/getSearchTreelist";
let params = {
agencyId: this.$store.state.user.agencyId,
};
const { data, code, msg } = await requestGet(url, params);
console.log("data-orgparty----o", data);
if (code === 0) {
this.partyOrgList = this.deepArrTOnull(data);
} else {
}
},
},
};
</script>
<style lang="scss" scoped>
.g-cnt {
background-color: #ffffff;
padding: 20px;
}
</style>

15
src/views/modules/visual/command/index.vue

@ -16,9 +16,7 @@
</div>
</div>
<people v-if="orgLevel === 'people'" :uid="selUserId" />
<div v-show="orgLevel !== 'people'" class="g-cnt">
<div class="g-cnt">
<div class="m-map" @click="handleClickMapBox">
<grid-map
ref="map"
@ -206,10 +204,6 @@
:enterpriseId="enterpriseId"
@handleClose="handleClose"
/>
<!-- <people v-if="pageType==='watch-resi'"
:uid="icResiUserId"
ref="ref_people"></people> -->
</div>
</template>
@ -482,8 +476,11 @@ export default {
};
}
} else if (type == "watch-resi") {
this.toSubAgency("people", info.icResiUserId);
// this.toSubAgency("people", info.icResiUserId);
this.icResiUserId = info.icResiUserId;
this.$router.push({
path: `/main-shuju/visual-basicinfo-people/${info.icResiUserId}`,
});
//
} else if (type == "watch-event") {
//
@ -550,7 +547,7 @@ export default {
this.categoryKeys2 = [obj.categoryKey];
this.placeType2 = obj.placeType;
this.categoryNames2 = [obj.categoryName];
console.log(obj)
console.log(obj);
},
handleChangeMenu(list) {

1
src/views/modules/visual/cpts/map/index.vue

@ -29,6 +29,7 @@ let posLayer;
let circleLayer;
let dotLayer;
let dotBgLayer;
let dotLayer2;
export default {
name: "l7",

36
src/views/modules/worklog/icworklog-add-or-update.vue

@ -10,9 +10,10 @@
>
<el-option
v-for="item in optionsG"
:key="item.value"
:label="item.label"
:value="item.value"
:key="item.gridId"
:label="item.gridName"
:value="item.gridId"
:disabled="item.disabled"
>
</el-option>
</el-select>
@ -69,7 +70,6 @@
</el-form-item> -->
<el-form-item label="照片"
label-width="150px"
style="display:block">
<el-upload :class="['avatar-uploader', {'hide': hideUploadBtn}] "
ref="uploadPic"
@ -102,6 +102,7 @@ export default {
return {
formType: '',
visible: false,
gridState: true,
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile',
logTypeArr: [],
optionsG: [],
@ -117,24 +118,17 @@ export default {
remark: '',
mobile: '',
fileList: [],
// imageList: [],//
// imageList: [],//
},
hideUploadBtn: false
}
},
created () {
this.getGridList()
this.getCategrayList()
},
computed: {
dataRule () {
return {
agencyId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
gridId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
title: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
@ -153,6 +147,7 @@ export default {
methods: {
init () {
this.visible = true
this.getGridList()
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
this.dataForm.fileList = []
@ -171,6 +166,15 @@ export default {
...this.dataForm,
...res.data
}
const grid = this.optionsG.filter(item => item.gridId === res.data.gridId)
if (grid.length < 1 && res.data.gridId !== '') {
this.gridState = false
this.optionsG.push({gridName:res.data.gridName, gridId:res.data.gridId, disabled: true})
} else {
this.gridState = true
}
const { id } = this.$store.state.user
if (this.dataForm.createdBy == id) { //
this.formType = 'update'
@ -197,9 +201,8 @@ export default {
}
},
getGridList() {
const { user } = this.$store.state
this.$http
.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'query' })
.post('/gov/mine/agency/getmygrids')
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
@ -327,6 +330,11 @@ export default {
},
//
dataFormSubmitHandle: debounce(function () {
if (!this.gridState) {
this.dataForm.gridId = ''
this.gridState = true
return this.$message.error("请重新选择网格")
}
if (this.dataForm.content.length < 70) {
return this.$message.error("内容不能少于70字")
}

Loading…
Cancel
Save