Browse Source

fix: 修改需求

bill 2 years ago
parent
commit
47a10b1347

+ 1 - 1
src/api/scene.ts

@@ -1,6 +1,6 @@
 import axios from './instance'
 import { GET_SCENE_LIST } from './constant'
-import type { PageResult, PageRequest, SimpleProject } from './'
+import type { PageResult, PageRequest } from './'
 
 export enum SceneStatus {
   DEL = -1,

+ 1 - 1
src/store/project.ts

@@ -22,7 +22,7 @@ import type {
 } from '@/api'
 
 export const BinType = Symbol('bin')
-export const binTypeDesc = 'bin'
+export const binTypeDesc = 'BIM'
 export type { Project, BimUploadData, Bim }
 
 export type ProjectScene = Omit<Scene, 'type' | 'num' | 'status'> &

+ 0 - 1
src/store/scene.ts

@@ -1,5 +1,4 @@
 import { defineStore } from 'pinia'
-import { fetchScenes } from '@/api'
 import type { Scenes } from '@/api'
 
 export type { Scenes, Scene } from '@/api'

+ 5 - 6
src/views/member/edit.vue

@@ -38,11 +38,7 @@
           placeholder="请输入用户账号"
         />
       </a-form-item>
-      <a-form-item
-        name="remark"
-        label="备注"
-        :rules="[{ required: true, message: '请输入备注' }]"
-      >
+      <a-form-item name="remark" label="备注">
         <a-input v-model:value="editMember.remark" placeholder="请输入备注" />
       </a-form-item>
     </a-form>
@@ -73,7 +69,10 @@ const visible = ref(true)
 
 const saveHandler = async () => {
   await fromRef.value?.validate()
-  await props.onSave(toRaw(editMember.value))
+  await props.onSave({
+    ...toRaw(editMember.value),
+    remark: editMember.value.remark || ''
+  })
   visible.value = false
 }
 </script>

+ 1 - 1
src/views/member/list.vue

@@ -5,7 +5,7 @@
       <a-input-search
         v-model:value="params.userName"
         style="width: 280px"
-        placeholder="请选择项目创建时间"
+        placeholder="请输入成员名称"
         allow-clear
         @search="updateList"
       />

+ 5 - 2
src/views/project/detailed.vue

@@ -3,7 +3,10 @@
     <div class="meta">
       <div class="header">
         <h3>{{ project?.projectName }}</h3>
-        <div class="actions">
+        <div
+          v-if="project?.projectStatus === ProjectStatus.undone"
+          class="actions"
+        >
           <a-button @click="updateProject">修改项目</a-button>
           <a-button @click="deleteProject">删除项目</a-button>
           <a-button type="primary" @click="finishProject"> 完成项目 </a-button>
@@ -40,7 +43,7 @@ import { Modal } from 'ant-design-vue'
 import { HeadPanl, BodyPanl } from '@/layout/panl'
 import { router, RoutesName, routesMetas } from '@/router'
 import { computed, toRef } from 'vue'
-import { useProject } from '@/store'
+import { useProject, ProjectStatus } from '@/store'
 import { useRealtime } from '@/hook'
 import { renderModal } from '@/helper'
 import { uploadFile } from '@/api'

+ 7 - 4
src/views/record/columns.ts

@@ -13,19 +13,22 @@ export const recordColumns: ColumnsType<Record> = [
     key: 'projectName'
   },
   {
-    title: '备注名称',
+    title: '备注',
     dataIndex: 'logMsg',
     key: 'logMsg'
   },
   {
-    title: '创建人',
+    title: '操作人',
     dataIndex: 'userName',
     key: 'userName'
   },
   {
-    title: '更新时间',
+    title: '操作时间',
     dataIndex: 'createTime',
-    key: 'createTime'
+    key: 'createTime',
+    customRender({ record }) {
+      return record.createTime.substring(0, 16)
+    }
   },
   {
     title: '操作',

+ 1 - 1
src/views/scene/actions.vue

@@ -2,7 +2,7 @@
   <div class="table-actions">
     <template v-if="bimDone">
       <a @click="updateBimName">修改</a>
-      <a v-if="!store.current!.panos" @click="syncScene">同步</a>
+      <a @click="syncScene"> {{ store.current!.panos ? '修改' : '' }}同步 </a>
     </template>
     <template v-if="done">
       <a @click="queryScene">查看</a>

+ 2 - 2
src/views/scene/insert.vue

@@ -81,9 +81,9 @@ const props = defineProps<{
 
 enum Type {
   scene = '场景',
-  bim = 'bim'
+  bim = 'BIM'
 }
-const currentType = ref(Type.bim)
+const currentType = ref(Type.scene)
 
 const bim = ref<UploadData>({ name: '', file: undefined })
 const typeNums = ref(

+ 1 - 1
src/views/scene/update.vue

@@ -1,7 +1,7 @@
 <template>
   <a-modal
     v-model:visible="visible"
-    title="修改bim"
+    title="修改BIM"
     width="480px"
     :after-close="onCancel"
     @ok="saveHandler"