Przeglądaj źródła

新增有效,失效功能

xiaoxin 2 lat temu
rodzic
commit
df462d6262
2 zmienionych plików z 15 dodań i 5 usunięć
  1. 13 3
      src/views/project-management/index.vue
  2. 2 2
      vue.config.js

+ 13 - 3
src/views/project-management/index.vue

@@ -218,10 +218,19 @@
             <el-button type="success" plain @click="handleCheckDetail(row)">
             <el-button type="success" plain @click="handleCheckDetail(row)">
               详情
               详情
             </el-button>
             </el-button>
-            <el-button type="primary" @click="handleValid(row, 1)">
+            <el-button
+              v-if="row.status != 1 && row.status != 3"
+              type="primary"
+              @click="handleValid(row, 1)"
+            >
               有效
               有效
             </el-button>
             </el-button>
-            <el-button type="warning" plain @click="handleValid(row, 2)">
+            <el-button
+              v-if="row.status != 1 && row.status != 3"
+              type="warning"
+              plain
+              @click="handleValid(row, 2)"
+            >
               失效
               失效
             </el-button>
             </el-button>
             <el-button
             <el-button
@@ -364,7 +373,7 @@
           :rows="10"
           :rows="10"
           resize="none"
           resize="none"
           type="textarea"
           type="textarea"
-          placeholder="请输入备注"
+          placeholder="请输入备注 (每个项目只能更改一次项目状态,请谨慎操作)"
         />
         />
       </div>
       </div>
       <template #footer>
       <template #footer>
@@ -518,6 +527,7 @@ const handleCheckDetail = (row) => {
 const handleValid = (row, type) => {
 const handleValid = (row, type) => {
   // 1为有效,2为失效
   // 1为有效,2为失效
   console.log(row)
   console.log(row)
+  textareaValue.value = ''
   chooseObj.value = row
   chooseObj.value = row
   if (type === 1) {
   if (type === 1) {
     titleStatus.value = '有效'
     titleStatus.value = '有效'

+ 2 - 2
vue.config.js

@@ -11,8 +11,8 @@ module.exports = defineConfig({
       // 当地址中有/api的时候会触发代理机制
       // 当地址中有/api的时候会触发代理机制
       '/reporting/': {
       '/reporting/': {
         // 要代理的服务器地址  这里不用写 api
         // 要代理的服务器地址  这里不用写 api
-        // target: 'https://jiangxih3cpartner.com/',
-        target: 'http://172.16.20.80:8888',
+        target: 'https://jiangxih3cpartner.com/',
+        // target: 'http://172.16.20.80:8888',
         changeOrigin: true // 是否跨域
         changeOrigin: true // 是否跨域
       }
       }
     }
     }