yrik há 4 anos atrás
pai
commit
bee087c51d

+ 1 - 0
ruoyi-ui/src/api/system/config.js

@@ -55,6 +55,7 @@ export function addConfigindex(data) {
     data: data
   })
 }
+
 export function listIndex(data) {
   return request({
     url: '/boman-web-core/p/cs/queryList',

+ 7 - 7
ruoyi-ui/src/components/DynamicForms/index.vue

@@ -6,27 +6,27 @@
             <el-form-item :label="item.columnComment" style="display: inline-block;" :prop="item.columnName" v-if="item.isEdit == 1">
               <!-- 输入框 -->
               <el-input v-if="item.htmlType == 'input'" v-model="config[item.columnName]" :placeholder="'请输入'+item.columnComment"
-                clearable @keyup.enter.native="submitForm" @change="submitForm"/>
+                clearable @keyup.enter.native="submitForm" />
               <!-- 多行输入框 -->
               <el-input v-if="item.htmlType == 'textarea'" type="textarea" v-model="config[item.columnName]" :placeholder="'请输入'+item.columnComment"
-                clearable @keyup.enter.native="submitForm" @change="submitForm"/>
+                clearable @keyup.enter.native="submitForm" />
               <!-- 下拉框 -->
               <el-select v-model="config[item.columnName]" v-if="item.htmlType == 'select'" filterable :placeholder="'请输入'+item.columnComment">
-                <el-option v-for="itemChild in item.sysDictData" :key="itemChild.dictValue" :label="itemChild.dictLabel" :value="itemChild.dictValue" @change="submitForm">
+                <el-option v-for="itemChild in item.sysDictData" :key="itemChild.dictValue" :label="itemChild.dictLabel" :value="itemChild.dictValue" >
                 </el-option>
               </el-select>
               <!-- 复选框 -->
-              <el-checkbox-group v-model="config" v-if="item.htmlType == 'checkbox'">
-                <el-checkbox @change="submitForm" v-for="itemChild in item.sysDictData" :label="itemChild.dictValue" :key="itemChild.dictLabel" >
+              <el-checkbox-group v-model="config[item.columnName]" v-if="item.htmlType == 'checkbox'">
+                <el-checkbox  v-for="itemChild in item.sysDictData" :label="itemChild.dictValue" :key="itemChild.dictLabel" >
                   {{itemChild.dictLabel}}
                 </el-checkbox>
               </el-checkbox-group>
               <!-- 单选框 -->
               <el-radio-group v-model="config[item.columnName]" v-if="item.htmlType == 'radio'">
-                <el-radio v-for="itemChild in item.sysDictData" :key="itemChild.dictValue" :label="itemChild.dictLabel" :value="itemChild.dictValue" @change="submitForm"></el-radio>
+                <el-radio v-for="itemChild in item.sysDictData" :key="itemChild.dictValue" :label="itemChild.dictLabel" :value="itemChild.dictValue" ></el-radio>
               </el-radio-group>
               <!-- 时间控件 -->
-              <el-date-picker v-model="config[item.columnName]" v-if="item.htmlType == 'datetime'" type="date" :placeholder="'请输入'+item.columnComment" @change="submitForm">
+              <el-date-picker v-model="config[item.columnName]" v-if="item.htmlType == 'datetime'" type="date" :placeholder="'请输入'+item.columnComment">
               </el-date-picker>
               <!-- 上传图片 -->
               <el-upload v-if="item.htmlType == 'imageUpload'" :headers="{Authorization: 'Bearer ' + getToken()}" :action="process + '/boman-file/upload'" list-type="picture-card"

+ 2 - 0
ruoyi-ui/src/main.js

@@ -23,6 +23,7 @@ import Pagination from "@/components/Pagination";
 import RightToolbar from "@/components/RightToolbar"
 import DynamicForm from "@/components/DynamicForm"
 import DynamicForms from "@/components/DynamicForms"
+import MemoranDum from "@/components/MemoranDum"
 
 // 全局方法挂载
 Vue.prototype.getDicts = getDicts
@@ -52,6 +53,7 @@ Vue.component('Pagination', Pagination)
 Vue.component('RightToolbar', RightToolbar)
 Vue.component('DynamicForm', DynamicForm)
 Vue.component('DynamicForms', DynamicForms)
+Vue.component('MemoranDum', MemoranDum)
 
 Vue.use(permission)
 

+ 22 - 7
ruoyi-ui/src/views/index.vue

@@ -238,7 +238,14 @@
     <!-- <el-divider /> -->
   <!-- 添加或修改公告对话框 -->
   <el-dialog :title="title" :visible.sync="open" width="980px" append-to-body>
-            <dynamic-forms :config="form" @inputs = "changeFn" :formConfig="queryData" :open="open" @submitForm="submitForm($event)" @cancel="cancel($event)" :nummer = "nummer" />
+            <!-- if(){ -->
+              <!-- 日历 -->
+              <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" />
+            <!-- } -->
+
   </el-dialog>
   </div>
 </template>
@@ -366,6 +373,7 @@ export default {
       selectList:[],
       editorList:[],
       queryData: {},
+      queryDatatwo:{},
       nummer:0   //0 是日历  1 是备忘录
     };
   },
@@ -387,12 +395,16 @@ export default {
      brightDate () {
        // let ary = []
        var that =  this
-       console.log(that.calendarData)
+       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 = that.calendarData[i].all_date
-         console.log(that.calendarData[i].begin_time)
+         // that.ary.push(that.calendarData[i].all_date.split(','))
+         if(that.calendarData[i].all_date !== undefined){
+           that.ary.push(that.calendarData[i].all_date.join(','))
+           console.log(that.calendarData[i].all_date.join(','),754)
+         }
+         // console.log(that.calendarData[i].all_date,754)
        }
        console.log(that.ary)
        return that.ary
@@ -409,7 +421,10 @@ export default {
           // 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) {
-              content = this.calendarData[i].remind_type
+              if(this.calendarData[i].all_date !== undefined){
+                content = this.calendarData[i].remind_type
+              }
+
             // }
           }
           console.log(content)
@@ -555,8 +570,8 @@ export default {
      this.loading = true;
      listIndextanl(this.calendaraddmer).then(response => {
          if(response.data !== undefined){
-           this.queryData = response.data
-           this.queryData.columns.filter(route => {
+           this.queryDatatwo = response.data
+           this.queryDatatwo.columns.filter(route => {
              // console.log(route)
              if(route.htmlType == "input" || route.htmlType == 'textarea'){
                this.inputList.push(route)