安生 4 yıl önce
ebeveyn
işleme
a4dfe64c3a

+ 1 - 0
package.json

@@ -56,6 +56,7 @@
     "element-ui": "2.13.0",
     "file-saver": "2.0.1",
     "fuse.js": "3.4.4",
+    "jquery": "^3.5.1",
     "js-beautify": "^1.10.2",
     "js-cookie": "2.2.0",
     "jsencrypt": "3.0.0-rc.1",

BIN
src/assets/image/logo-bg.png


+ 73 - 57
src/views/login.vue

@@ -1,62 +1,69 @@
 <template>
-  <div class="login">
-    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
-      <h3 class="title">协同办公平台</h3>
-      <el-form-item prop="username">
-        <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
-          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon"/>
-        </el-input>
-      </el-form-item>
-      <el-form-item prop="password">
-        <el-input
-          v-model="loginForm.password"
-          type="password"
-          auto-complete="off"
-          placeholder="密码"
-          @keyup.enter.native="handleLogin"
-        >
-          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon"/>
-        </el-input>
-      </el-form-item>
-      <el-form-item prop="code">
-        <el-input
-          v-model="loginForm.code"
-          auto-complete="off"
-          placeholder="验证码"
-          style="width: 63%"
-          @keyup.enter.native="handleLogin"
-        >
-          <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon"/>
-        </el-input>
-        <div class="login-code">
-          <img :src="codeUrl" @click="getCode"/>
-        </div>
-      </el-form-item>
-      <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
-      <el-form-item style="width:100%;">
-        <el-button
-          :loading="loading"
-          size="medium"
-          type="primary"
-          style="width:100%;"
-          @click.native.prevent="handleLogin"
-        >
-          <span v-if="!loading">登 录</span>
-          <span v-else>登 录 中...</span>
-        </el-button>
-      </el-form-item>
-    </el-form>
-    <!--  底部  -->
-    <div class="el-login-footer">
-      <span>技术支持:石家庄开发区亿网科技发展有限公司</span>
+    <div class="login">
+      <div class="actuy">
+        协同办公平台
+        <div style="color: #ffff;font-size: 35px;line-height: 70px">欢迎您的登录</div>
+      </div>
+
+      <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
+        <h3 class="title">用户登陆</h3>
+        <el-form-item prop="username">
+          <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
+            <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon"/>
+          </el-input>
+        </el-form-item>
+        <el-form-item prop="password">
+          <el-input
+            v-model="loginForm.password"
+            type="password"
+            auto-complete="off"
+            placeholder="密码"
+            @keyup.enter.native="handleLogin"
+          >
+            <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon"/>
+          </el-input>
+        </el-form-item>
+        <el-form-item prop="code">
+          <el-input
+            v-model="loginForm.code"
+            auto-complete="off"
+            placeholder="验证码"
+            style="width: 63%"
+            @keyup.enter.native="handleLogin"
+          >
+            <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon"/>
+          </el-input>
+          <div class="login-code">
+            <img :src="codeUrl" @click="getCode"/>
+          </div>
+        </el-form-item>
+        <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
+        <el-form-item style="width:100%;">
+          <el-button
+            :loading="loading"
+            size="medium"
+            type="primary"
+            style="width:100%;"
+            @click.native.prevent="handleLogin"
+          >
+            <span v-if="!loading">登 录</span>
+            <span v-else>登 录 中...</span>
+          </el-button>
+        </el-form-item>
+      </el-form>
+      <!--  底部  -->
+      <div class="el-login-footer">
+        <span>技术支持:石家庄开发区亿网科技发展有限公司</span>
+      </div>
     </div>
-  </div>
 </template>
-
 <script>
   import { getCodeImg } from '@/api/login'
   import Cookies from 'js-cookie'
   import { encrypt, decrypt } from '@/utils/jsencrypt'
+  import $ from 'jquery'
+
+
 
   export default {
     name: 'Login',
@@ -96,6 +103,7 @@
       this.getCode()
       this.getCookie()
     },
+
     methods: {
       getCode() {
         getCodeImg().then(res => {
@@ -143,6 +151,15 @@
 </script>
 
 <style rel="stylesheet/scss" lang="scss">
+
+  .actuy{
+    font-size: 50px;
+    color: #fff;
+    margin-top: 6px;
+    font-weight: 700;
+    margin-top: -235px;
+  }
+
   .login {
     display: flex;
     justify-content: center;
@@ -156,18 +173,17 @@
     margin: 0px auto 30px auto;
     text-align: center;
     /*color: #707070;*/
-    color: #fff;
+    color: #7f7f7f;
     font-size: 1.6rem;
   }
 
   .login-form {
-    /*border-radius: 6px;*/
     border-radius: 20px;
-    /*background: #ffffff;*/
-    background: none;
     border: 1px solid #1890ff;
     width: 400px;
     padding: 25px 25px 5px 25px;
+    background: #fff;
+    margin: 0 0 0 20%;
 
     .el-input {
       height: 38px;
@@ -208,10 +224,10 @@
     bottom: 0;
     width: 100%;
     text-align: center;
-    color: #fff;
     font-family: Arial;
     font-size: 12px;
     letter-spacing: 1px;
+    color: #0C0C0C;
   }
 </style>
 

+ 257 - 245
src/views/system/officework/schedule/schedule.vue

@@ -1,22 +1,22 @@
 <template>
   <div class="app-container" v-if="isReloadData">
     <FullCalendar  defaultView="dayGridMonth" :options="calendarOptions" locale="zh-cn" firstDay="1" weekNumberCalculation="ISO"
-                  showNonCurrentDates="false"
-                  :eventTimeFormat="evnetTime"
-                  :header="header"
-                  :buttonText="buttonText"
-                  :displayEventEnd="true"
-                  :allDayDefault="false"
-                  eventLimitText="查看所有"
-                  :fixedWeekCount="false"
-                  :showNonCurrentDates="false"
-                  :eventLimit="true"
-                  :allDaySlot="false"
-                  :weekends="true"
-                  @dateClick="handleDateClick"
-                  @eventClick="handleEventClick"
+                   showNonCurrentDates="false"
+                   :eventTimeFormat="evnetTime"
+                   :header="header"
+                   :buttonText="buttonText"
+                   :displayEventEnd="true"
+                   :allDayDefault="false"
+                   eventLimitText="查看所有"
+                   :fixedWeekCount="false"
+                   :showNonCurrentDates="false"
+                   :eventLimit="true"
+                   :allDaySlot="false"
+                   :weekends="true"
+                   @dateClick="handleDateClick"
+                   @eventClick="handleEventClick"
     />
-<!--    添加日程-->
+    <!--    添加日程-->
     <el-dialog  :visible.sync="schedule"  title="添加日程" append-to-body width="40%" @click="close">
       <el-row :gutter="12">
         <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px">
@@ -60,7 +60,7 @@
         <el-button type="primary"  @click="submit()">确定</el-button>
       </div>
     </el-dialog>
-<!--    编辑日程-->
+    <!--    编辑日程-->
     <el-dialog  :visible.sync="schedule1"  title="编辑日程" append-to-body width="40%" >
       <el-row :gutter="12">
         <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px">
@@ -107,7 +107,7 @@
       </div>
     </el-dialog>
   </div>
-  </template>
+</template>
 
 <script>
   import { addRemindEvents,selectList,delSchenule,findList,updatarichen} from "@/api/officework/index";
@@ -132,264 +132,276 @@
     components: {
       FullCalendar
     },
-        data(){
-            return {
-              isReloadData: true,
-              loading:true,
-              dialogVisible:false,
-              qqq:'',
-              kaishi:'',
-              jieshu:'',
-              eveid:'',
-              schedule: false,
-              schedule1:false,
-              formData: {
-                id:"",
-                start: null,
-                field105: null,
-                finish: null,
-                field107: null,
-                hour: undefined,
-                incident: undefined,
-              },
-              rules: {
-                start: [{
-                  required: true,
-                  message: '请选择开始日期',
-                  trigger: 'change'
-                }],
-                finish: [{
-                  required: true,
-                  message: '请选择结束日期',
-                  trigger: 'change'
-                }],
-                hour: [{
-                  required: true,
-                  message: '请选择提醒时间',
-                  trigger: 'blur'
-                }],
-                incident: [{
-                  required: true,
-                  message: '请输入你的记录',
-                  trigger: 'blur'
-                }],
-              },
-              calendarOptions: {
-                plugins: [ dayGridPlugin, timeGridPlugin,interactionPlugin ,listPlugin],
-                initialView: 'dayGridMonth',
-                dateClick: this.handleDateClick,
-                eventClick:this.handleEventClick,
-                locale:"zh",
-                allDayDefault:false,
-                header:{
-                  left: 'prev,next today',
-                  center: 'title',
-                  right: 'month,agendaWeek,agendaDay,list'
-                },
-                buttonText: {
-                  today: '今天',
-                  month: '月',
-                  week: '周',
-                  day: '天',
-                  list: '列表'
-                },
-                events: [
-                  // { title: 'event 1', date: '2020-08-05' },
-                  // { title: 'event 2', date: '2020-08-06' },
-                  // { title: '部门会议', start: new Date(),end:'2020-08-10' }
-                ]
-              },
-              plugins: [
-                dayGridPlugin,
-                timeGridPlugin,
-                interactionPlugin ,
-                listPlugin],
-              header:{
-                left: 'prev,next today',
-                center: 'title',
-                right: 'month,agendaWeek,agendaDay,list'
-              },
-              buttonText: {
-                today: '今天',
-                month: '月',
-                week: '周',
-                day: '天',
-                list: '列表'
-              },
-              evnetTime: {
-                hour: 'numeric',
-                minute: '2-digit',
-                hour12: false
-              },
-                value: new Date(),
-              arrList:undefined
-            }
+    data(){
+      return {
+        isReloadData: true,
+        loading:true,
+        dialogVisible:false,
+        qqq:'',
+        kaishi:'',
+        jieshu:'',
+        eveid:'',
+        schedule: false,
+        schedule1:false,
+        formData: {
+          id:"",
+          start: null,
+          field105: null,
+          finish: null,
+          field107: null,
+          hour: undefined,
+          incident: undefined,
+          color:null
         },
+        rules: {
+          start: [{
+            required: true,
+            message: '请选择开始日期',
+            trigger: 'change'
+          }],
+          finish: [{
+            required: true,
+            message: '请选择结束日期',
+            trigger: 'change'
+          }],
+          hour: [{
+            required: true,
+            message: '请选择提醒时间',
+            trigger: 'blur'
+          }],
+          incident: [{
+            required: true,
+            message: '请输入你的记录',
+            trigger: 'blur'
+          }],
+        },
+        calendarOptions: {
+          plugins: [ dayGridPlugin, timeGridPlugin,interactionPlugin ,listPlugin],
+          initialView: 'dayGridMonth',
+          dateClick: this.handleDateClick,
+          eventClick:this.handleEventClick,
+          locale:"zh",
+          allDayDefault:false,
+          header:{
+            left: 'prev,next today',
+            center: 'title',
+            right: 'month,agendaWeek,agendaDay,list'
+          },
+          buttonText: {
+            today: '今天',
+            month: '月',
+            week: '周',
+            day: '天',
+            list: '列表'
+          },
+          events: [
+            // { title: 'event 1', date: '2020-08-05' },
+            // { title: 'event 2', date: '2020-08-06' },
+            // { title: '部门会议', start: new Date(),end:'2020-08-10' }
+          ]
+        },
+        plugins: [
+          dayGridPlugin,
+          timeGridPlugin,
+          interactionPlugin ,
+          listPlugin],
+        header:{
+          left: 'prev,next today',
+          center: 'title',
+          right: 'month,agendaWeek,agendaDay,list'
+        },
+        buttonText: {
+          today: '今天',
+          month: '月',
+          week: '周',
+          day: '天',
+          list: '列表'
+        },
+        evnetTime: {
+          hour: 'numeric',
+          minute: '2-digit',
+          hour12: false
+        },
+        value: new Date(),
+        arrList:undefined
+      }
+    },
     created() {
       this.toList();
     },
-     methods:{
-       //取消按钮
-       cancel() {
-         this.schedule1 = false;
-         this.reset();
-       },
-       // 表单重置
-       reset() {
-         this.formData = {
-             id:"",
-             start: null,
-             field105: null,
-             finish: null,
-             field107: null,
-             hour: undefined,
-             incident: undefined,
-         },
-         this.resetForm("elForm");
-       },
-       //修改日程
-       updatarc(){
-         var formdata = new FormData
-         formdata.append('id',this.formData.id)
-         formdata.append('start',this.formData.start)
-         formdata.append('finish',this.formData.finish)
-         formdata.append('hour',this.formData.hour)
-         formdata.append('incident',this.formData.incident)
-          updatarichen(formdata).then(response => {
-            // console.log(response)
-           // if (response.code === 200) {
-             this.msgSuccess("修改成功");
-             this.schedule1=false;
-            this.calendarOptions.events = [];
-            this.toList();
-           // }
-         });
-         this.resetForm();
+    methods:{
+      //取消按钮
+      cancel() {
+        this.schedule1 = false;
+        this.reset();
+      },
+      // 表单重置
+      reset() {
+        this.formData = {
+          id:"",
+          start: null,
+          field105: null,
+          finish: null,
+          field107: null,
+          hour: undefined,
+          incident: undefined,
+        },
+          this.resetForm("elForm");
+      },
+      //修改日程
+      updatarc(){
+        var formdata = new FormData
+        formdata.append('id',this.formData.id)
+        formdata.append('start',this.formData.start)
+        formdata.append('finish',this.formData.finish)
+        formdata.append('hour',this.formData.hour)
+        formdata.append('incident',this.formData.incident)
+        updatarichen(formdata).then(response => {
+          // console.log(response)
+          // if (response.code === 200) {
+          this.msgSuccess("修改成功");
+          this.schedule1=false;
+          this.calendarOptions.events = [];
+          this.toList();
+          // }
+        });
+        this.resetForm();
 
-       },
-       reload() {
-         this.isReloadData = false;
-         this.$nextTick(() => {
-           this.isReloadData = true;
-         });
-       },
+      },
+      reload() {
+        this.isReloadData = false;
+        this.$nextTick(() => {
+          this.isReloadData = true;
+        });
+      },
       toList (){
         // this.loading = true;
         selectList(this.formData).then(response => {
           console.log(response.rows)
+
           for(var i = 0; i < response.rows.length;i++){
+
             this.calendarOptions.events.push({ // add new event data
               title: response.rows[i].incident,
               start: response.rows[i].start,
               end: response.rows[i].finish,
               defId:response.rows[i].id,
+              color:response.rows[i].color
             });
           }
         })
       },
 
-          handleDateClick(arg) {
-            this.$confirm('是否要添加一个新的日程?', '提示', {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-              type: 'warning'
-            }).then(() => {
-              this.schedule = true;
-              this.formData = {};
-              this.formData.start = new Date();
-            }).catch(() => {});
-          },
-          handleEventClick(info) {
-            // alert('日程安排为:' + info.event.title);
-            // console.log(info.event)
-            this.eveid = info.event._def.extendedProps.defId
+      handleDateClick(arg) {
+        this.$confirm('是否要添加一个新的日程?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.schedule = true;
+          this.formData = {};
+          this.formData.start = new Date();
+          //var  b=["#D81C29","#17E7FF","#5CD82B","#B28226","#D81C29","#0DD8D1","#747474"]
+          // this.formData.color=b[Math.round(Math.random() * (7 - 1) + 1)];
+          var r = Math.floor(Math.random()*255);
+          var g = Math.floor(Math.random()*255);
+          var b = Math.floor(Math.random()*255);
+          var aa = 'rgba('+ r +','+ g +','+ b +',0.8)';
+          this.formData.color=aa
+          console.log(this.formData.color)
+        }).catch(() => {});
+      },
+      handleEventClick(info) {
+        // alert('日程安排为:' + info.event.title);
+        // console.log(info.event)
+        this.eveid = info.event._def.extendedProps.defId
 
-            this.schedule1 = true;
-            // this.updatarc();
-            let defId = this.eveid;
-            var formdata = new FormData;
-            formdata.append('id', defId)
-            findList(defId).then(response =>{
-              console.log(response.rows[0])
-              this.formData= response.rows[0];
+        this.schedule1 = true;
+        // this.updatarc();
+        let defId = this.eveid;
+        var formdata = new FormData;
+        formdata.append('id', defId)
+        findList(defId).then(response =>{
+          console.log(response.rows[0])
+          this.formData= response.rows[0];
 
-            });
-          },
-          //添加日程
-          submit: function() {
-            this.$refs["elForm"].validate(valid => {
-              if (valid) {
-                addRemindEvents(this.formData).then(response => {
-                  if (response.code === 200) {
-                    this.msgSuccess("添加成功");
-                    this.schedule=false;
-                    // this.toList();
-                    this.calendarOptions.events = [];
-                    this.toList();
-                  }
-                });
+        });
+      },
+      //添加日程
+      submit: function() {
+        this.$refs["elForm"].validate(valid => {
+          if (valid) {
+            addRemindEvents(this.formData).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("添加成功");
+                this.schedule=false;
+                // this.toList();
+                this.calendarOptions.events = [];
+                this.toList();
               }
-            })
+            });
+          }
+        })
 
-            this.resetForm();
+        this.resetForm();
 
-          },
-          //删除日程
-          deletrichen(){
-            let defId = this.eveid;
-            var formdata = new FormData
-            formdata.append('id', defId)
-            this.$confirm('是否确认删除日程?', "警告", {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-              type: 'warning'
-            }).then(function() {
-              return delSchenule(formdata);
-            }).then(() => {
-              this.reload();
-              this.msgSuccess("删除成功");
-              this.schedule1 = false;
-              this.calendarOptions.events = [];
-              this.toList();
-            }).catch(function() {});
-          },
-          resetForm() {
-            this.formData=[];
-          }
-        },
-        inheritAttrs: false,
-        // components: {},
-        props: [],
-        computed: {},
-        watch: {},
+      },
+      //删除日程
+      deletrichen(){
+        let defId = this.eveid;
+        var formdata = new FormData
+        formdata.append('id', defId)
+        this.$confirm('是否确认删除日程?', "警告", {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(function() {
+          return delSchenule(formdata);
+        }).then(() => {
+          this.reload();
+          this.msgSuccess("删除成功");
+          this.schedule1 = false;
+          this.calendarOptions.events = [];
+          this.toList();
+        }).catch(function() {});
+      },
+      resetForm() {
+        this.formData=[];
+      }
+    },
+    inheritAttrs: false,
+    // components: {},
+    props: [],
+    computed: {},
+    watch: {},
 
-        mounted() {},
-    }
+    mounted() {},
+  }
 </script>
 <style lang="less">
   @import '~@fullcalendar/core/main.css';
   @import '~@fullcalendar/daygrid/main.css';
 
   .el-calendar__title{font-size: 22px;}
-    .calendar-day{
-        text-align: center;
-        color: #202535;
-        line-height: 30px;
-        font-size: 12px;
-    }
-    .is-selected{
-        color: #F8A535;
-        font-size: 10px;
-        margin-top: 5px;
-    }
-    #calendar .el-button-group>.el-button:not(:first-child):not(:last-child):after{
-        content: '当月';
-    }
-    .prev,.next{background: #efefef;}
-    .prev .calendar-day,.next .calendar-day{color: #999;}
-    .el-calendar-table td.is-selected {
-        background-color:#d6ebff !important;
-        }
-     .el-calendar-table .el-calendar-day:hover{background-color:#d6ebff !important;}
-      .xsmini{width:20px;float: right;}
+  .calendar-day{
+    text-align: center;
+    color: #202535;
+    line-height: 30px;
+    font-size: 12px;
+  }
+  .is-selected{
+    color: #F8A535;
+    font-size: 10px;
+    margin-top: 5px;
+  }
+  #calendar .el-button-group>.el-button:not(:first-child):not(:last-child):after{
+    content: '当月';
+  }
+  .prev,.next{background: #efefef;}
+  .prev .calendar-day,.next .calendar-day{color: #999;}
+  .el-calendar-table td.is-selected {
+    background-color:#d6ebff !important;
+  }
+  .el-calendar-table .el-calendar-day:hover{background-color:#d6ebff !important;}
+  .xsmini{width:20px;float: right;}
 </style>