Просмотр исходного кода

Merge branch 'develop' of http://code.dashoo.cn/chengjian/opms_frontend into develop

liuzl 2 лет назад
Родитель
Сommit
38b91f0c37
2 измененных файлов с 16 добавлено и 6 удалено
  1. 15 5
      src/views/plat/task/components/TaskAdd.vue
  2. 1 1
      src/views/plat/task/index.vue

+ 15 - 5
src/views/plat/task/components/TaskAdd.vue

@@ -21,7 +21,7 @@
               v-model="form.taskStartDate"
               placeholder="请选择开始时间"
               style="width: 100%"
-              type="datetime"
+              type="date"
               value-format="yyyy-MM-dd HH:mm:ss" />
           </el-form-item>
         </el-col>
@@ -31,7 +31,7 @@
               v-model="form.taskEndDate"
               placeholder="请选择结束时间"
               style="width: 100%"
-              type="datetime"
+              type="date"
               value-format="yyyy-MM-dd HH:mm:ss" />
           </el-form-item>
         </el-col>
@@ -182,6 +182,10 @@
           targetName: '',
           remark: '',
           teamIds: [],
+          teamNames: '',
+          mainUserName: '',
+          watchUserName: '',
+          supervisorUserName: '',
         },
         // 校验规则
         rules: {
@@ -267,6 +271,10 @@
         this.form.targetType = ''
         this.form.targetName = ''
         this.form.remark = ''
+        this.form.teamNames = ''
+        this.form.mainUserName = ''
+        this.form.watchUserName = ''
+        this.form.supervisorUserName = ''
       },
       // 关闭弹窗
       close() {
@@ -280,13 +288,16 @@
       save() {
         this.$refs['form'].validate(async (valid) => {
           if (valid) {
-            if (this.teamIds && this.teamIds.length > 0) {
-              this.form.ownerUserId = this.teamIds.join(',')
+            if (this.form.teamIds && this.form.teamIds.length > 0) {
+              this.form.ownerUserId = this.form.teamIds.join(',')
             } else {
               this.form.ownerUserId = ''
             }
             // eslint-disable-next-line vue/no-mutating-props
             this.selfVisible = false
+            if (this.form.targetId == '') {
+              this.form.targetId = 0
+            }
             const { msg } = await taskApi.createTask(this.form)
             this.$baseMessage(msg, 'success', 'vab-hey-message-success')
             if (this.doRefresh) {
@@ -309,7 +320,6 @@
         this.$refs.selectUser.open()
       },
       selectUser(userList, property, label) {
-        console.log(userList, 'userList')
         this.form[label] = userList.map((item) => item.nickName).join()
         if (this.multiple) {
           this.form[property] = userList.map((item) => item.id)

+ 1 - 1
src/views/plat/task/index.vue

@@ -106,7 +106,7 @@
               </span>
               <span
                 v-else-if="item.prop === 'taskStartDate' || item.prop === 'taskEndDate' || item.prop === 'createdTime'">
-                {{ parseTime(row[item.prop], '{y}-{m}-{d} {h}:{i}') }}
+                {{ parseTime(row[item.prop], '{y}-{m}-{d}') }}
               </span>
               <span v-else>{{ row[item.prop] }}</span>
             </template>