|
@@ -238,12 +238,24 @@
|
|
|
<!-- <el-divider /> -->
|
|
|
<!-- 添加或修改公告对话框 -->
|
|
|
<el-dialog :title="title" :visible.sync="open" width="980px" append-to-body>
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="160px" class="from_index">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" >
|
|
|
+ <dynamic-forms :ref="item.columnName" :config="form.fixedData" @inputs = "changeFn" :formConfig="item" v-for="(item,index) in queryData.columns" :key='index' />
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="handleQuery">确 定</el-button>
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
+ </div>
|
|
|
<!-- if(){ -->
|
|
|
<!-- 日历 -->
|
|
|
- <dynamic-forms v-if="nummer == 0" :config="form" @inputs = "changeFn" :formConfig="queryData" :open="open" @submitForm="submitForm($event)" @cancel="cancel($event)" :nummer = "nummer" />
|
|
|
+
|
|
|
+ <!-- <dynamic-forms v-if="nummer == 0" :config="form" @inputs = "changeFn" :formConfig="queryData" :open="open" @submitForm="submitForm($event)" @cancel="cancel($event)" :nummer = "nummer" /> -->
|
|
|
<!-- }else if(){ -->
|
|
|
<!-- 备忘录 -->
|
|
|
- <memoran-dum v-if="nummer == 1" :config="form" @inputs = "changeFn" :formConfig="queryDatatwo" :open="open" @cancel="cancel($event)" :nummer = "nummer" />
|
|
|
+ <!-- <memoran-dum v-if="nummer == 1" :config="form" @inputs = "changeFn" :formConfig="queryDatatwo" :open="open" @cancel="cancel($event)" :nummer = "nummer" /> -->
|
|
|
<!-- } -->
|
|
|
|
|
|
</el-dialog>
|
|
@@ -251,7 +263,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listIndex, listIndextwo, listIndextherr, listIndexfou, listIndextanl, getConfig, delConfig, addConfig, updateConfig, clearCache } from "@/api/system/config";
|
|
|
+import { listIndex, listIndextwo, listIndextherr, listIndexfou, listIndextanl, getConfig, delConfig, addConfig, addConfigindex, updateConfig, clearCache } from "@/api/system/config";
|
|
|
import Editor from '@/components/Editor';
|
|
|
export default {
|
|
|
name: "index",
|
|
@@ -374,7 +386,15 @@ export default {
|
|
|
editorList:[],
|
|
|
queryData: {},
|
|
|
queryDatatwo:{},
|
|
|
- nummer:0 //0 是日历 1 是备忘录
|
|
|
+ nummer:0 ,//0 是日历 1 是备忘录
|
|
|
+ forme:{
|
|
|
+ table:'',
|
|
|
+ objId:-1,
|
|
|
+ fixedData:{}
|
|
|
+ },
|
|
|
+ rjtu:[],
|
|
|
+ truew:[],
|
|
|
+ fales:[]
|
|
|
};
|
|
|
},
|
|
|
|
|
@@ -395,17 +415,26 @@ export default {
|
|
|
brightDate () {
|
|
|
// let ary = []
|
|
|
var that = this
|
|
|
- console.log(that.calendarData,887)
|
|
|
+ // console.log(that.calendarData,887)
|
|
|
for (var i = 0 ; i < that.calendarData.length; i++) {
|
|
|
// that.ary.push(that.calendarData[i].startDate)
|
|
|
// that.ary.push(that.calendarData[i].begin_time.slice(0,10))
|
|
|
// that.ary.push(that.calendarData[i].all_date.split(','))
|
|
|
+ that.calendarData[i].love="yu"
|
|
|
if(that.calendarData[i].all_date !== undefined){
|
|
|
+ // that.rjtu.concat(that.calendarData[i].all_date.join(','))
|
|
|
that.ary.push(that.calendarData[i].all_date.join(','))
|
|
|
- console.log(that.calendarData[i].all_date.join(','),754)
|
|
|
+ // that.calendarData[i].all_date.fi
|
|
|
+ that.calendarData[i].all_date.filter(route => {
|
|
|
+ // console.log(route,9875)
|
|
|
+ that.ary.push(route)
|
|
|
+ })
|
|
|
+ // that.ary = that.calendarData[i].all_date
|
|
|
+ // console.log(that.calendarData[i].all_date.join(','),754)
|
|
|
}
|
|
|
// console.log(that.calendarData[i].all_date,754)
|
|
|
}
|
|
|
+ // console.log( that.rjtu,7545)
|
|
|
console.log(that.ary)
|
|
|
return that.ary
|
|
|
}
|
|
@@ -415,20 +444,109 @@ export default {
|
|
|
// Tooltip 文字提示
|
|
|
content (date) {
|
|
|
console.log(date,37645)
|
|
|
+ let data = date
|
|
|
let content = ''
|
|
|
+ let conert = ''
|
|
|
+ let conertre = ''
|
|
|
+ let nujue= 0
|
|
|
+ let nujeug = []
|
|
|
+ let setre = []
|
|
|
+ this.truew = []
|
|
|
+ console.log(this.calendarData)
|
|
|
// console.log(data,37645)
|
|
|
for (var i = 0 ; i < this.calendarData.length; i++) {
|
|
|
- // this.calendarData[i].begin_time = this.calendarData[i].begin_time.slice(0,10)
|
|
|
- console.log(this.calendarData[i].begin_time,123)
|
|
|
// if (date === this.calendarData[i].begin_time) {
|
|
|
+ // console.log(this.calendarData[i])
|
|
|
if(this.calendarData[i].all_date !== undefined){
|
|
|
- content = this.calendarData[i].remind_type
|
|
|
- }
|
|
|
+ console.log(this.calendarData[i].all_date.includes(data))
|
|
|
+ if(this.calendarData[i].all_date.includes(data) == true){
|
|
|
+ console.log(this.calendarData[i].all_date.includes(data))
|
|
|
+ this.truew.push(this.calendarData[i].all_date.includes(data))
|
|
|
+ console.log(this.truew)
|
|
|
+ if(this.truew.length >1){
|
|
|
+ content = content + ',' + this.calendarData[i].schedule_content
|
|
|
+ // nujeug = content.split(',')
|
|
|
+ // setre = [...new set(nujeug)]
|
|
|
+ // conert = setre.join(',')
|
|
|
+ }else{
|
|
|
+ content = this.calendarData[i].schedule_content
|
|
|
+ }
|
|
|
+
|
|
|
+ // content = this.calendarData[i].schedule_content
|
|
|
+ // return content
|
|
|
+ }
|
|
|
+ console.log(content)
|
|
|
+ // if(this.calendarData[i].all_date.includes(data) == false){
|
|
|
+ // console.log(this.calendarData[i].all_date.includes(data))
|
|
|
+ // // this.rjtu.push(this.calendarData[i].schedule_content)
|
|
|
+ // // content = this.calendarData[i].schedule_content
|
|
|
+
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ }
|
|
|
+ // return content
|
|
|
+ // }
|
|
|
+
|
|
|
+ // if(this.calendarData[i].all_date !== undefined){
|
|
|
+ // for(var j= 0 ; j<this.calendarData[i].all_date.length; j++){
|
|
|
+ // // if(data == this.calendarData[i].all_date[j]){
|
|
|
+ // // // console.log(124)
|
|
|
+ // // // console.log(this.calendarData[i])
|
|
|
+ // // // content = this.calendarData[i].schedule_content
|
|
|
+ // // // console.log(content)
|
|
|
+ // // }else if(data !== this.calendarData[i].all_date[j]){
|
|
|
+ // // content = this.calendarData[i].schedule_content
|
|
|
+ // // console.log(876543)
|
|
|
+ // // console.log(content)
|
|
|
+ // // }
|
|
|
+ // }
|
|
|
+ // // this.calendarData[i].all_date.filter(route => {
|
|
|
+ // // if(data == route){
|
|
|
+ // // console.log(124)
|
|
|
+ // // console.log(route.schedule_content)
|
|
|
+ // // content = route.schedule_content
|
|
|
+ // // console.log(content)
|
|
|
+ // // }else{
|
|
|
+ // // console.log(876543)
|
|
|
+ // // }
|
|
|
+ // // })
|
|
|
+ // }
|
|
|
+
|
|
|
+ // console.log(route,9875)
|
|
|
+ // that.ary.push(route)
|
|
|
+
|
|
|
+ // if(this.calendarData[i].schedule_content !== undefined){
|
|
|
+ // nujue = nujue +1
|
|
|
+ // if(this.calendarData[i].schedule_content !== this.calendarData[nujue].schedule_content){
|
|
|
+ // // this.rjtu.push(this.calendarData[i].schedule_content)
|
|
|
+ // }
|
|
|
+ // // content = this.rjtu.join(',')
|
|
|
+
|
|
|
+ // }
|
|
|
|
|
|
// }
|
|
|
}
|
|
|
+ // this.calendarData.filter(route =>{
|
|
|
+ // if(route.schedule_content !== undefined){
|
|
|
+ // // if(date == route.all_date)
|
|
|
+
|
|
|
+ // console.log(route.schedule_content,23456)
|
|
|
+ // content = route.schedule_content
|
|
|
+ // }
|
|
|
+
|
|
|
+ // })
|
|
|
+ // if(content.length >1){
|
|
|
+ // for(var k = 0 ; k < content.length; k++){
|
|
|
+ // console.log(content[i])
|
|
|
+ // // if(conertre.indexOf(conert[i])==-1){
|
|
|
+ // // conertre+=conert[i];
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
console.log(content)
|
|
|
- return content
|
|
|
+ // console.log(this.rjtu,12345)
|
|
|
+ // content = this.rjtu.join(',')
|
|
|
+ return content
|
|
|
},
|
|
|
//数据 第一部分列表
|
|
|
getList() {
|
|
@@ -543,6 +661,7 @@ export default {
|
|
|
//日历新增弹框数据
|
|
|
getLisalendaraddd() {
|
|
|
this.loading = true;
|
|
|
+ this.queryData = []
|
|
|
listIndextanl(this.calendaradd).then(response => {
|
|
|
if(response.data !== undefined){
|
|
|
this.queryData = response.data
|
|
@@ -568,10 +687,11 @@ export default {
|
|
|
//备忘录新增弹框数据
|
|
|
getLisalendaradddmer() {
|
|
|
this.loading = true;
|
|
|
+ this.queryData = []
|
|
|
listIndextanl(this.calendaraddmer).then(response => {
|
|
|
if(response.data !== undefined){
|
|
|
- this.queryDatatwo = response.data
|
|
|
- this.queryDatatwo.columns.filter(route => {
|
|
|
+ this.queryData = response.data
|
|
|
+ this.queryData.columns.filter(route => {
|
|
|
// console.log(route)
|
|
|
if(route.htmlType == "input" || route.htmlType == 'textarea'){
|
|
|
this.inputList.push(route)
|
|
@@ -637,8 +757,8 @@ export default {
|
|
|
},
|
|
|
// 表单重置
|
|
|
reset() {
|
|
|
- this.form = {
|
|
|
- };
|
|
|
+ this.form ={
|
|
|
+ },
|
|
|
this.resetForm("form");
|
|
|
},
|
|
|
// 取消按钮
|
|
@@ -651,36 +771,61 @@ export default {
|
|
|
this.nummer = 0
|
|
|
console.log(this.open)
|
|
|
this.reset();
|
|
|
+ this.form ={
|
|
|
+ }
|
|
|
this.getLisalendaraddd()
|
|
|
this.open = true;
|
|
|
this.title = "添加日历";
|
|
|
},
|
|
|
- /** 提交按钮 */
|
|
|
- submitForm: function(data) {
|
|
|
- console.log(this.form,data)
|
|
|
- // this.$refs["form"].validate(valid => {
|
|
|
- // if (valid) {
|
|
|
- // if (this.form.id != undefined) {
|
|
|
- // updateNotice(this.form).then(response => {
|
|
|
- // this.msgSuccess("修改成功");
|
|
|
- // this.open = false;
|
|
|
- // this.getList();
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- // addNotice(this.form).then(response => {
|
|
|
- // this.msgSuccess("新增成功");
|
|
|
- // this.open = false;
|
|
|
- // this.getList();
|
|
|
- // });
|
|
|
- // }
|
|
|
- // }
|
|
|
- // });
|
|
|
+ /** 提交按钮操作 */
|
|
|
+ handleQuery() {
|
|
|
+ for(let item of this.queryData.columns){
|
|
|
+ if(item.htmlType == 'checkbox' || item.htmlType == 'imageUpload' || item.htmlType == 'fileUpload'){
|
|
|
+ this.form[item.columnName] = this.$refs[item.columnName][0].config
|
|
|
+ } else{
|
|
|
+ this.form[item.columnName] = this.$refs[item.columnName][0].config[item.columnName]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // this.forme = this.form
|
|
|
+ if(this.nummer == 0){
|
|
|
+ this.forme.table = 'sys_schedule'
|
|
|
+ this.forme.objId = -1
|
|
|
+ this.forme.fixedData = this.form
|
|
|
+ if(this.forme.fixedData.remind_type !== undefined){
|
|
|
+ this.forme.fixedData.remind_type = this.forme.fixedData.remind_type.join(',');
|
|
|
+ }
|
|
|
+ //日历
|
|
|
+ console.log(this.forme.fixedData,this.forme)
|
|
|
+ addConfigindex(this.forme).then(response => {
|
|
|
+ this.msgSuccess("新增成功");
|
|
|
+ // this.open = false;
|
|
|
+ this.getLisalendar()
|
|
|
+ this.cancel();
|
|
|
+ });
|
|
|
+ }else if(this.nummer == 1){
|
|
|
+ // this.form.table = 'sys_memorandum'
|
|
|
+ this.forme.table = 'sys_memorandum'
|
|
|
+ this.forme.objId = -1
|
|
|
+ this.forme.fixedData = this.form
|
|
|
+ if(this.forme.fixedData.remind_type !== undefined){
|
|
|
+ this.forme.fixedData.remind_type = this.forme.fixedData.remind_type.join(',');
|
|
|
+ }
|
|
|
+ //备忘录
|
|
|
+ addConfigindex(this.forme).then(response => {
|
|
|
+ this.msgSuccess("新增成功");
|
|
|
+ // this.open = false;
|
|
|
+ this.getLismemorandum()
|
|
|
+ this.cancel();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ console.log(this.form.fixedData,22311)
|
|
|
+ // this.getList();
|
|
|
},
|
|
|
// 弹框
|
|
|
changeFn(obj) {
|
|
|
console.log(obj)
|
|
|
for(let key in obj){
|
|
|
- this.form[key] = obj[key]
|
|
|
+ this.form.fixedData[key] = obj[key]
|
|
|
}
|
|
|
},
|
|
|
// 新增备忘录
|