web端产品库 vite版本
This commit is contained in:
		| @@ -7,63 +7,67 @@ | ||||
|       <template #content> | ||||
|         <ai-search-bar> | ||||
|           <template slot="left"> | ||||
|             <el-button type="primary" icon="iconfont iconAdd" @click="handleAdd" | ||||
|               >添加</el-button | ||||
|             > | ||||
|             <el-button type="primary" icon="iconfont iconAdd" @click="handleAdd">添加</el-button> | ||||
|           </template> | ||||
|           <template slot="right"> | ||||
|             <el-input | ||||
|               v-model="search.title" | ||||
|               class="search-input" | ||||
|               size="small" | ||||
|               placeholder="请输入课程主题" | ||||
|               clearable | ||||
|               v-throttle=" | ||||
|                 v-model="search.title" | ||||
|                 class="search-input" | ||||
|                 size="small" | ||||
|                 placeholder="请输入课程主题" | ||||
|                 clearable | ||||
|                 v-throttle=" | ||||
|                 () => { | ||||
|                   (search.current = 1), getList(); | ||||
|                 } | ||||
|               " | ||||
|               @clear="(search.current = 1), (search.title = ''), getList()" | ||||
|               suffix-icon="iconfont iconSearch" | ||||
|                 @clear="(search.current = 1), (search.title = ''), getList()" | ||||
|                 suffix-icon="iconfont iconSearch" | ||||
|             > | ||||
|             </el-input> | ||||
|           </template> | ||||
|         </ai-search-bar> | ||||
|         <ai-table | ||||
|           :tableData="tableData" | ||||
|           :col-configs="colConfigs" | ||||
|           stripe | ||||
|           :total="total" | ||||
|           :current.sync="page.current" | ||||
|           :size.sync="page.size" | ||||
|           style="margin-top: 10px" | ||||
|           @getList="getList" | ||||
|             :tableData="tableData" | ||||
|             :col-configs="colConfigs" | ||||
|             stripe | ||||
|             :total="total" | ||||
|             :current.sync="page.current" | ||||
|             :size.sync="page.size" | ||||
|             style="margin-top: 10px" | ||||
|             @getList="getList" | ||||
|             :dict="dict" | ||||
|         > | ||||
|           <el-table-column | ||||
|             slot="options" | ||||
|             label="操作" | ||||
|             align="center" | ||||
|             width="230px" | ||||
|             fixed="right" | ||||
|               slot="options" | ||||
|               label="操作" | ||||
|               align="center" | ||||
|               width="230px" | ||||
|               fixed="right" | ||||
|           > | ||||
|             <div slot-scope="{ row }" class="table-options"> | ||||
|               <el-button | ||||
|                 type="text" | ||||
|                 :title="row.status == 0 ? '发布' : '取消发布'" | ||||
|                 @click="handleChange(row)" | ||||
|                 >{{ row.status == 0 ? "发布" : "取消发布" }}</el-button | ||||
|                   type="text" | ||||
|                   :title="row.status == 0 ? '发布' : '取消发布'" | ||||
|                   @click="handleChange(row)" | ||||
|               >{{ row.status == 0 ? "发布" : "取消发布" }} | ||||
|               </el-button | ||||
|               > | ||||
|               <el-button type="text" title="添加" @click="handleAddSeries(row)" | ||||
|                 >添加剧集</el-button | ||||
|               >添加剧集 | ||||
|               </el-button | ||||
|               > | ||||
|               <el-button type="text" title="详情" @click="handleDetail(row)" | ||||
|                 >详情</el-button | ||||
|               >详情 | ||||
|               </el-button | ||||
|               > | ||||
|               <el-button type="text" title="编辑" @click="handleEdit(row)" | ||||
|                 >编辑</el-button | ||||
|               >编辑 | ||||
|               </el-button | ||||
|               > | ||||
|               <el-button type="text" title="删除" @click="handleDelete(row)" | ||||
|                 >删除</el-button | ||||
|               >删除 | ||||
|               </el-button | ||||
|               > | ||||
|             </div> | ||||
|           </el-table-column> | ||||
| @@ -71,14 +75,14 @@ | ||||
|       </template> | ||||
|     </ai-list> | ||||
|     <component | ||||
|       :is="comp" | ||||
|       v-else | ||||
|       :row="row" | ||||
|       :instance="instance" | ||||
|       :dict="dict" | ||||
|       :permissions="permissions" | ||||
|       @back="back" | ||||
|       :isEdit="isEdit" | ||||
|         :is="comp" | ||||
|         v-else | ||||
|         :row="row" | ||||
|         :instance="instance" | ||||
|         :dict="dict" | ||||
|         :permissions="permissions" | ||||
|         @back="back" | ||||
|         :isEdit="isEdit" | ||||
|     ></component> | ||||
|   </section> | ||||
| </template> | ||||
| @@ -86,12 +90,12 @@ | ||||
| <script> | ||||
| import partyClassAdd from "./components/partyClassAdd"; | ||||
| import seriesManage from "./components/seriesManage"; | ||||
| import { mapState } from "vuex"; | ||||
| import {mapState} from "vuex"; | ||||
|  | ||||
| export default { | ||||
|   name: "AppPartyHistoryClass", | ||||
|   label: "党员学习", | ||||
|   components: { partyClassAdd, seriesManage }, | ||||
|   components: {partyClassAdd, seriesManage}, | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
| @@ -121,37 +125,21 @@ export default { | ||||
|     ...mapState(["user"]), | ||||
|     colConfigs() { | ||||
|       return [ | ||||
|         { label: "课程主题", prop: "title" }, | ||||
|         { | ||||
|           label: "更新状态", | ||||
|           render: (h, { row }) => [ | ||||
|             <span> | ||||
|               {" "} | ||||
|               {this.dict.getLabel( | ||||
|                 "classroomUpdateStatus", | ||||
|                 row.updateStatus | ||||
|               )}{" "} | ||||
|             </span>, | ||||
|           ], | ||||
|         }, | ||||
|         { label: "更新时间", prop: "updateDate" }, | ||||
|         { label: "发布时间", prop: "createDate" }, | ||||
|         { | ||||
|           label: "发布状态", | ||||
|           render: (h, { row }) => [ | ||||
|             <span> {this.dict.getLabel("newsCenterStatus", row.status)} </span>, | ||||
|           ], | ||||
|         }, | ||||
|         { label: "发布组织", prop: "organizationName" }, | ||||
|         { slot: "options" }, | ||||
|         {label: "课程主题", prop: "title"}, | ||||
|         {label: "更新状态", dict: "classroomUpdateStatus", prop: "updateStatus"}, | ||||
|         {label: "更新时间", prop: "updateDate"}, | ||||
|         {label: "发布时间", prop: "createDate"}, | ||||
|         {label: "发布状态", prop: "status", dict: "newsCenterStatus"}, | ||||
|         {label: "发布组织", prop: "organizationName"}, | ||||
|         {slot: "options"}, | ||||
|       ]; | ||||
|     }, | ||||
|   }, | ||||
|   methods: { | ||||
|     handleChange(row) { | ||||
|       this.$confirm(`是否确定要${row.status == 0 ? "发布" : "取消发布"}?`).then( | ||||
|         (_) => { | ||||
|           this.instance | ||||
|           (_) => { | ||||
|             this.instance | ||||
|             .post("/app/apppartyclassroom/addOrUpdate", { | ||||
|               id: row.id, | ||||
|               status: row.status == 0 ? 1 : 0, | ||||
| @@ -159,12 +147,12 @@ export default { | ||||
|             .then((res) => { | ||||
|               if (res.code == 0) { | ||||
|                 this.$message.success( | ||||
|                   `${row.status == 0 ? "发布成功" : "取消发布成功"}` | ||||
|                     `${row.status == 0 ? "发布成功" : "取消发布成功"}` | ||||
|                 ); | ||||
|                 this.getList(); | ||||
|               } | ||||
|             }); | ||||
|         } | ||||
|           } | ||||
|       ); | ||||
|     }, | ||||
|     handleAddSeries(row) { | ||||
| @@ -172,20 +160,20 @@ export default { | ||||
|       this.comp = "seriesManage"; | ||||
|       this.row = row; | ||||
|     }, | ||||
|     handleDelete({ id }) { | ||||
|     handleDelete({id}) { | ||||
|       this.$confirm("确定要删除吗?").then((_) => { | ||||
|         this.instance | ||||
|           .post("/app/apppartyclassroom/delete", null, { | ||||
|             params: { | ||||
|               ids: id, | ||||
|             }, | ||||
|           }) | ||||
|           .then((res) => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success("删除成功"); | ||||
|               this.getList(); | ||||
|             } | ||||
|           }); | ||||
|         .post("/app/apppartyclassroom/delete", null, { | ||||
|           params: { | ||||
|             ids: id, | ||||
|           }, | ||||
|         }) | ||||
|         .then((res) => { | ||||
|           if (res.code == 0) { | ||||
|             this.$message.success("删除成功"); | ||||
|             this.getList(); | ||||
|           } | ||||
|         }); | ||||
|       }); | ||||
|     }, | ||||
|     handleEdit(row) { | ||||
| @@ -228,18 +216,18 @@ export default { | ||||
|     }, | ||||
|     getList() { | ||||
|       this.instance | ||||
|         .post("/app/apppartyclassroom/list", null, { | ||||
|           params: { | ||||
|             ...this.page, | ||||
|             ...this.search, | ||||
|           }, | ||||
|         }) | ||||
|         .then((res) => { | ||||
|           if (res?.data) { | ||||
|             this.tableData = res.data.records; | ||||
|             this.total = res.data.total; | ||||
|           } | ||||
|         }); | ||||
|       .post("/app/apppartyclassroom/list", null, { | ||||
|         params: { | ||||
|           ...this.page, | ||||
|           ...this.search, | ||||
|         }, | ||||
|       }) | ||||
|       .then((res) => { | ||||
|         if (res?.data) { | ||||
|           this.tableData = res.data.records; | ||||
|           this.total = res.data.total; | ||||
|         } | ||||
|       }); | ||||
|     }, | ||||
|   }, | ||||
|   created() { | ||||
|   | ||||
| @@ -70,7 +70,7 @@ export default { | ||||
|     ...mapState(["user"]), | ||||
|     colConfigs() { | ||||
|       return [ | ||||
|         {label: "类型", render: (h, {row}) => [< span> {row.type == 1 ? '单选题' : '多选题'} < /span>]}, | ||||
|         {label: "类型", render: (h, {row}) =>h('p',row.type == 1 ? '单选题' : '多选题')}, | ||||
|         {label: "题目", prop: "title"}, | ||||
|         {label: "创建时间", prop: "createDate"}, | ||||
|         {slot: "options"} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user