|
@@ -1,118 +1,51 @@
|
|
|
+
|
|
|
<template>
|
|
|
- <div class="task__pane;">
|
|
|
- <normalLayout>
|
|
|
- <div slot="titleRight">
|
|
|
- <add-task></add-task>
|
|
|
- </div>
|
|
|
- <div class="container" slot="content">
|
|
|
- <el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
- <el-tab-pane label="我创建的" name="5"></el-tab-pane>
|
|
|
- <el-tab-pane label="我负责的" name="1"></el-tab-pane>
|
|
|
- <el-tab-pane label="我参与的" name="2"></el-tab-pane>
|
|
|
- <el-tab-pane label="我下属负责的" name="3"></el-tab-pane>
|
|
|
- <el-tab-pane label="我下属参与的" name="4"></el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
+ <div>
|
|
|
+ <basicLayout
|
|
|
+ ref="basicLayout"
|
|
|
+ :oldFormPath="{
|
|
|
+ add:'HManagement/task/modules',
|
|
|
+ edit:'HManagement/task/modules'
|
|
|
+ }"
|
|
|
+ tableName="sys_task"
|
|
|
+ idName="sys_taskid"
|
|
|
+ :apiId="{query:20220901162901,del:20221211112601}"
|
|
|
+ :options="options"
|
|
|
+ :detailPath="{
|
|
|
+ path:'/task_detail'
|
|
|
+ }">
|
|
|
+ <div slot="custom"></div>
|
|
|
+ <template v-slot:tbList="scope">
|
|
|
<div>
|
|
|
- <el-card v-for="item in list" :key="item.index" class="normal-margin" :body-style="{padding:'10px'}">
|
|
|
- <div slot="header" class="flex-align-center">
|
|
|
- <p class="avatar">{{item.createby.substr(0, 1)}}</p> 
|
|
|
- <p class="task__label">{{item.createby}}</p> 
|
|
|
- <el-tag size="small" type="primary">{{item.status}}</el-tag> <span class="task__label">{{item.starttime}}</span>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <p><span class="task__label">标题: </span>{{item.title}}</p>
|
|
|
- <p><span class="task__label">描述: </span>{{item.remaks}}</p>
|
|
|
- </div>
|
|
|
- </el-card>
|
|
|
- </div>
|
|
|
- <div class="container normal-panel" style="text-align:right">
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage"
|
|
|
- :page-sizes="[20, 50, 100, 200]"
|
|
|
- layout="total,sizes, prev, pager, next, jumper"
|
|
|
- :total="total">
|
|
|
- </el-pagination>
|
|
|
+ {{scope.data.column.data[[scope.data.column.columnname]]}}
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </normalLayout>
|
|
|
+ </template>
|
|
|
+ <template v-slot:tbOpreation="scope">
|
|
|
+ </template>
|
|
|
+ </basicLayout>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import addTask from './modules/add.vue'
|
|
|
+/**
|
|
|
+ * @basicLayout 提供this.$ref['basicLayout'].listData()方法查询列表信息
|
|
|
+ * @param {string} formPath 新建,编辑组件所在文件夹名称,以后所有列表新增修改文件统一放入Form文件夹下面,并创建与开发应用相同的名称的子文件夹
|
|
|
+ * @param {string} tableName 开发端配置的表格名称
|
|
|
+ * @param {String} idName 数据主id名称
|
|
|
+ * @param {object} apiId:{query:查询的接口id,del:删除的接口id}
|
|
|
+ * @param {Array} options:{label:描述,value:值}
|
|
|
+ */
|
|
|
export default {
|
|
|
- components:{
|
|
|
- addTask
|
|
|
- },
|
|
|
data () {
|
|
|
return {
|
|
|
- activeName:'5',
|
|
|
- param:{
|
|
|
- "id":20220901162901,
|
|
|
- "content": {
|
|
|
- "pageNumber": 1,
|
|
|
- "pageSize": 20,
|
|
|
- "type":this.activeName,
|
|
|
- "where":{
|
|
|
- "condition":"",
|
|
|
- "status":""
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- list:[],
|
|
|
- total:0,
|
|
|
- currentPage:0
|
|
|
+ options:[]
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
- handleClick (val) {
|
|
|
- this.param.content.type = this.activeName
|
|
|
- this.listData()
|
|
|
- },
|
|
|
- async listData () {
|
|
|
- const res = await this.$api.requested(this.param)
|
|
|
- this.list = res.data
|
|
|
- this.total = res.total
|
|
|
- this.currentPage = res.pageNumber
|
|
|
- },
|
|
|
- handleSizeChange(val) {
|
|
|
- // console.log(`每页 ${val} 条`);
|
|
|
- this.param.content.pageSize = val
|
|
|
- this.listData()
|
|
|
- },
|
|
|
- handleCurrentChange(val) {
|
|
|
- // console.log(`当前页: ${val}`);
|
|
|
- this.param.content.pageNumber = val
|
|
|
- this.listData()
|
|
|
- },
|
|
|
- },
|
|
|
- mounted () {
|
|
|
- this.listData()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
<style>
|
|
|
-</style>
|
|
|
-<style scoped>
|
|
|
-.task__pane{
|
|
|
- vertical-align:-webkit-baseline-middle;
|
|
|
-}
|
|
|
-.avatar{
|
|
|
- width: 30px;
|
|
|
- height: 30px;
|
|
|
- text-align: center;
|
|
|
- line-height: 30px;
|
|
|
- font-size: 1rem;
|
|
|
- color:#fff;
|
|
|
- border-radius: 100%;
|
|
|
- background: #3874F6;
|
|
|
-}
|
|
|
-.task__label{
|
|
|
- color:rgb(173, 172, 172);
|
|
|
- font-size: 14px;
|
|
|
-}
|
|
|
</style>
|