scorpio před 2 roky
rodič
revize
d1046b2336
2 změnil soubory, kde provedl 21 přidání a 1 odebrání
  1. 7 0
      src/api/dash/index.js
  2. 14 1
      src/views/dash/compoents/profile.vue

+ 7 - 0
src/api/dash/index.js

@@ -1,6 +1,13 @@
 import fetch from '../fetch.js'
 
 export default {
+  /**
+   * 获取我的状态
+   * @returns {Promise<unknown>}
+   */
+  workInfo() {
+    return fetch('/blade-project-manage-v2/index/v2/v2/work-status')
+  },
   /**
    * 更新或者修改状态
    * @param params

+ 14 - 1
src/views/dash/compoents/profile.vue

@@ -14,7 +14,7 @@
       style="margin-left: 60px"
     >
       <el-input
-        placeholder="填写状态词"
+        :placeholder="placeholder"
         size="large"
         v-model="status"
         class="input"
@@ -56,6 +56,7 @@ export default {
   data() {
     return {
       status: '',
+      placeholder: '请填写状态(最长6个字符)',
       icons: [
         {
           icon: new URL('../../../assets/svg/task/work.svg', import.meta.url)
@@ -84,7 +85,19 @@ export default {
       ]
     }
   },
+  created() {
+    this.info()
+  },
   methods: {
+    info() {
+      this.$api.dash.workInfo().then(res => {
+        if (res.code === 200) {
+          this.placeholder = res.data.workStatusDescribe
+        } else {
+          console.log(res)
+        }
+      })
+    },
     update() {
       this.$api.dash.submit({ workStatusDescribe: this.status }).then(res => {
         if (res.code === 200) {