Browse Source

[企业公告][日程计划列表] 创建人、日期 回显完成

liangyan0105 3 years ago
parent
commit
d7219eb9c2

+ 98 - 2
README.md

@@ -1,6 +1,5 @@
 Ant Design Jeecg Vue
 ====
-
 当前最新版本: 2.1.4(发布日期:2020-02-24)
 
 Overview
@@ -103,4 +102,101 @@ yarn run lint
 备注
 ----
 
-> @vue/cli 升级后,eslint 规则更新了。由于影响到全部 .vue 文件,需要逐个验证。既暂时关闭部分原本不验证的规则,后期维护时,在逐步修正这些 rules
+> @vue/cli 升级后,eslint 规则更新了。由于影响到全部 .vue 文件,需要逐个验证。既暂时关闭部分原本不验证的规则,后期维护时,在逐步修正这些 rules
+
+
+
+字段  by chenchuang 
+----
+
+- [日程计划]---------------------------
+  /**id*/
+  private String id;
+
+	/**日程标题*/
+	private String title;
+
+	/**日程类型*/
+	private String type;
+
+	/**紧急程度*/
+	private String degreeOfUrgency;
+
+	/**开始时间*/
+	private Date startTime;
+
+	/**结束时间*/
+	private Date endTime;
+
+	/**参与人id*/
+	private Object participantsId;
+
+	/**参与人名称*/
+	private Object participantsName;
+
+	/**备注*/
+	private Object memo;
+
+- [企业公告]--------------------------------
+
+	/**标题*/
+	private String  title;
+
+	/**类型*/	
+	private String  type
+
+	/**内容*/
+	private Object  content;
+
+	/**创建人*/
+	private String  createBy;
+
+	/**创建日期*/
+	private String  createTime
+
+	/**是否发布*/
+ 	private Boolean isRelease 
+
+- [用品领用]---------------------------
+
+	/**编码*/
+	private String  code;
+
+
+	/**用品名称*/	
+	private String  supName
+
+
+	/**规格*/
+	private String  size;
+
+	/**库存数量*/
+	private String  inventoryNum;
+
+
+	/**领用数量*/
+	private String  receiveNum;
+
+
+	/**申请人*/
+ 	private String  proposer;
+
+
+	/**所属部门*/
+	private String  department;
+
+
+	/**申请日期*/
+	private String  applicationDate;
+
+-------------------------------------------
+
+
+
+
+
+
+
+
+
+

+ 3 - 0
src/assets/less/common.css

@@ -53,3 +53,6 @@
 .sendGr {
   color: green;
 }
+a {
+  text-decoration: none;
+}

+ 3 - 0
src/assets/less/common.less

@@ -50,4 +50,7 @@
 }
 .sendGr {
   color: green;
+}
+a {
+  text-decoration: none;
 }

+ 83 - 38
src/views/oa/enter-ann/add/addAnnModal.vue

@@ -34,34 +34,67 @@
           </a-col>
         </a-row>
 
-        <!-- 创建人  时间 -->
-        <a-row :gutter="24">
-          <a-col :span="12">
-            <a-form-item label="创建人">
-              <a-input
-                v-decorator="['createBy', { rules: [{ required: false, message: '请输入创建人' }] }]"
-                placeholder="系统回显"
-                disabled
-              />
-            </a-form-item>
-          </a-col>
+        <!-- 创建人  时间  新增弹框-->
+        <div v-if="title=='新增企业公告'">
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="创建人">
+                <a-input
+                  v-decorator="['createBy', { rules: [{ required: false, message: '请输入创建人' }] }]"
+                  placeholder="系统回显"
+                  disabled
+                />
 
-          <a-col :span="12">
-            <a-form-item label="创建日期">
-              <a-date-picker
-                disabled
-                style="width:100%"
-                showTime
-                format="YYYY-MM-DD HH:mm"
-                placeholder="系统回显"
-                @change="createTimeChange"
-                @ok="createTimeOk"
-                v-decorator="['createTime', { rules: [{ required: false, message: '请选择紧创建日期' }] }]"
-              />
-            </a-form-item>
-          </a-col>
-        </a-row>
+              </a-form-item>
+            </a-col>
+
+            <a-col :span="12">
+              <a-form-item label="创建日期">
+                <a-date-picker
+                  disabled
+                  style="width:100%"
+                  showTime
+                  format="YYYY-MM-DD HH:mm"
+                  placeholder="系统回显"
+                  @change="createTimeChange"
+                  @ok="createTimeOk"
+                  v-decorator="['createTime', { rules: [{ required: false, message: '请选择紧创建日期' }] }]"
+                />
+
+              </a-form-item>
+            </a-col>
+          </a-row>
+        </div>
+
+        <!-- 编辑的弹框显示 -->
+        <div v-if="title=='编辑企业公告'">
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="创建人">
+                <a-input
+                  v-decorator="['createBy', { rules: [{ required: false, message: '请输入创建人' }] }]"
+                  disabled
+                />
+
+              </a-form-item>
+            </a-col>
 
+            <a-col :span="12">
+              <a-form-item label="创建日期">
+                <a-date-picker
+                  disabled
+                  style="width:100%"
+                  showTime
+                  format="YYYY-MM-DD HH:mm:ss"
+                  @change="createTimeChange"
+                  @ok="createTimeOk"
+                  v-decorator="['createTime', { rules: [{ required: false, message: '请选择紧创建日期' }] }]"
+                />
+
+              </a-form-item>
+            </a-col>
+          </a-row>
+        </div>
         <!-- 公告富文本 -->
         <a-row :gutter="24">
           <a-col :span="12">
@@ -77,7 +110,7 @@
 </template>
 
 <script>
-// import moment from 'moment'
+import moment from 'moment'
 import 'moment/locale/zh-cn'
 import JEditor from '@/components/jeecg/JEditor'
 import { enterpriseEAdd, enterpriseEUpdate } from '@api/oa/cd-enterprise-announcement'
@@ -108,17 +141,29 @@ export default {
     methods: {
     // 回显表单
         getAnnFormInfo (e) {
-            console.log('弹框拿到编辑项ID', this.annInfo.id)
+            // console.log('弹框拿到编辑项ID', this.annInfo.id)
             this.$nextTick(() => {
-                this.addAnnForm.setFieldsValue({
-                    title: this.annInfo.title,
-                    type: this.annInfo.type,
-                    isRelease: this.isRelease
-                })
+                if (this.title == '新增企业公告') {
+                    this.addAnnForm.setFieldsValue({
+                        title: this.annInfo.title,
+                        type: this.annInfo.type,
+                        isRelease: this.isRelease
+                    })
+                } else {
+                    this.addAnnForm.setFieldsValue({
+                        title: this.annInfo.title,
+                        type: this.annInfo.type,
+                        isRelease: this.isRelease,
+                        createBy: this.annInfo.createBy,
+                        createTime: moment(this.annInfo.createTime, 'YYYY-MM-DD HH:mm:ss')
+
+                    })
+                }
                 this.$refs.JEditor.myValue = this.annInfo.content
-                console.log('回显完成,保存按钮判断是否编辑')
+                // console.log('回显完成,保存按钮判断是否编辑')
             })
         },
+
         // 弹框 保存
         handleOk () {
             this.addAnnForm.validateFields((err, vals) => {
@@ -127,17 +172,17 @@ export default {
                     news.title = vals.title
                     news.type = vals.type
                     news.createBy = vals.createBy
-                    news.createTime = vals.createTime
+                    news.createTime = vals.createTime.format('YYYY-MM-DD HH:mm:ss')
                     news.isRelease = vals.isRelease
                     news.content = this.$refs.JEditor.myValue
-                    // console.log(news.content )
                     // 编辑--------------------------------------
                     if (this.annInfo.id) {
                         news.id = this.annInfo.id
+                        // console.log('>>>>>', this.annInfo.createTime)
                         console.log('这是修改')
                         enterpriseEUpdate(news).then(res => {
                             if (res.success) {
-                                this.$message.success('日程计划修改成功')
+                                this.$message.success('修改成功')
                                 this.addModalVisible = false
                                 this.addAnnForm.resetFields() // 清空表单
                                 this.$refs.JEditor.myValue = '' // 清空富文本
@@ -150,7 +195,7 @@ export default {
                             if (res.success) {
                                 // console.log(res)
                                 this.addModalVisible = false
-                                this.$message.success('新增企业公告成功')
+                                this.$message.success('新增成功')
                                 this.addAnnForm.resetFields() // 清空
                                 this.$refs.JEditor.myValue = '' // 清空富文本
                                 this.fatherGetList()

+ 0 - 1
src/views/oa/enterpriseAnnouncement.vue

@@ -77,7 +77,6 @@
       </a-row>
     </div>
 
-    <!-- 新增弹框 组件 :fatherGetAnnList="getAnnList" -->
     <addAnn-modal ref="AddAnnModal" @ok="modalFormOk" :fatherGetList="getAnnList"></addAnn-modal>
   </a-card>
 </template>

+ 3 - 4
src/views/oa/my-plan/add/savePlan.vue

@@ -224,7 +224,6 @@ export default {
         handleOk (e) {
             this.addForm.validateFields((err, values) => {
                 // console.log('跑出来', values)
-                // console.log('>>>>>>>', this.$refs.JEditor.myValue)
                 if (!err) {
                     var scheduleObject = {}
                     scheduleObject.title = values.title
@@ -240,13 +239,13 @@ export default {
                         console.log('这是修改')
                         scheduleUpdate(scheduleObject).then(res => {
                             if (res.success && this.fatherMethod) {
-                                this.$message.success('日程计划修改成功')
+                                this.$message.success('修改成功')
                                 this.savePlanModalVisible = false
                                 this.addForm.resetFields() // 清空表单
                                 this.$refs.JEditor.myValue = '' // 清空富文本
                                 this.fatherMethod() // 调用父组件的查询方法
                             } else {
-                                this.$message.success('日程计划列表修改成功')
+                                this.$message.success('修改成功')
                                 this.savePlanModalVisible = false
                                 this.addForm.resetFields() // 清空表单
                                 this.$refs.JEditor.myValue = '' // 清空富文本
@@ -258,7 +257,7 @@ export default {
                         scheduleAdd(scheduleObject).then(res => {
                             if (res.success) {
                                 this.savePlanModalVisible = false
-                                this.$message.success('新增日程成功')
+                                this.$message.success('新增成功')
                                 this.addForm.resetFields() // 清空表单
                                 this.$refs.JEditor.myValue = ''
                             }

+ 1 - 3
src/views/oa/my-plan/schedulePlan.vue

@@ -118,7 +118,6 @@ export default {
         handleDateClick (e) {
             const selectData = e.dateStr
             console.log('父组件点击的日期:', selectData)
-            // 点击的时间赋值给 timeList,并在页面传给传给子组件
             this.timeList = selectData
             // =====父组件拿子组件==================================
             // this.$refs.savePlan.formData.startTime = selectData
@@ -127,9 +126,8 @@ export default {
             this.$refs.savePlan.savePlanModalVisible = true
             this.$refs.savePlan.setStartTime() // 调用子组件回显日期方法
         },
-        // 点击日程,回显信息
+        // 点击日程(回显)
         handleEventClick (e) {
-            // 拿 子组件弹框属性
             this.$refs.savePlan.savePlanModalVisible = true
             console.log('点击项ID', e.event.id)
             if (e.event.id) {