Sfoglia il codice sorgente

点播小程序加了个状态

xw 3 giorni fa
parent
commit
7739cb7c86
1 ha cambiato i file con 66 aggiunte e 2 eliminazioni
  1. 66 2
      src/views/course/coursePlaySourceConfig/index.vue

+ 66 - 2
src/views/course/coursePlaySourceConfig/index.vue

@@ -39,6 +39,21 @@
           size="small"
           @keyup.enter.native="handleQuery"
         />
+      </el-form-item>
+            <el-form-item label="状态" prop="status">
+        <el-select
+          v-model="queryParams.status"
+          placeholder="请选择状态"
+          clearable
+          size="small"
+        >
+          <el-option
+            v-for="item in statusOptions"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          />
+        </el-select>
       </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -141,6 +156,15 @@
         <template slot-scope="scope">
           <el-tag prop="isMall" v-for="(item, index) in isMallOptions" v-if="scope.row.isMall==item.dictValue">{{item.dictLabel}}</el-tag>
         </template>
+      </el-table-column>
+            <el-table-column label="状态" align="center" prop="status" width="100px">
+        <template slot-scope="scope">
+          <el-tag
+            :type="scope.row.status === 0 ? 'success' : scope.row.status === 1 ? 'warning' : 'danger'"
+          >
+            {{ getStatusLabel(scope.row.status) }}
+          </el-tag>
+        </template>
       </el-table-column>
       <el-table-column label="创建时间" align="center" prop="createTime" />
       <el-table-column label="修改时间" align="center" prop="updateTime" />
@@ -241,6 +265,22 @@
               :value="item.dictValue"
             />
           </el-select>
+        </el-form-item>
+                <el-form-item label="状态" prop="status">
+          <el-select
+            v-model="form.status"
+            placeholder="请选择状态"
+            style="width: 220px"
+            clearable
+            size="small"
+          >
+            <el-option
+              v-for="item in statusOptions"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            />
+          </el-select>
         </el-form-item>
         <el-form-item label="图标" prop="img">
           <image-upload v-model="form.img" :file-type='["png", "jpg", "jpeg"]' :limit="1"/>
@@ -308,7 +348,8 @@ export default {
         pageNum: 1,
         pageSize: 10,
         name: null,
-        appid: null
+        appid: null,
+        status: null
       },
       showSearch: true,
       single: true,
@@ -318,6 +359,20 @@ export default {
       list: [],
       total: 0,
       typesOptions: [],
+            statusOptions: [
+        {
+          label: "正常",
+          value: 0
+        },
+        {
+          label: "半封禁",
+          value: 1
+        },
+        {
+          label: "封禁",
+          value: 2
+        }
+      ],
       isMallOptions:[
         {
           dictLabel: "是",
@@ -567,9 +622,18 @@ export default {
         token: 'cbnd7lJvkripVOpyTFAna6NAWCxCrvC',
         aesKey: 'HlEiBB55eaWUaeBVAQO3cWKWPYv1vOVQSq7nFNICw4E',
         msgDataFormat: 'JSON',
-        type: '1'
+        type: '1',
+        status: 0
       }
       this.resetForm("form");
+          },
+    getStatusLabel(status) {
+      const statusMap = {
+        0: '正常',
+        1: '半封禁',
+        2: '封禁'
+      };
+      return statusMap[status] || '未知';
     }
   },
 }