zhanghua
2025-07-16 7c20fd15b7fbc2bd5756b39d5ab655cc849ffcc3
src/views/operate/rectification/taskList/index.vue
@@ -6,7 +6,7 @@
        <main>
            <div class="mainHeader">
                <div class="add">
                    <el-button type="primary" icon="el-icon-plus">新增任务</el-button>
                    <el-button type="primary" icon="el-icon-plus" @click="addTask()">新增任务</el-button>
                </div>
                <div class="date-search">
                    <span>按天查询:</span>
@@ -27,32 +27,31 @@
                </div>
            </div>
            <div class="mainContent">
                <!-- @selection-change="handleSelectionChange" -->
                <!-- 数据渲染 -->
                <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
                    :header-cell-style="{background:'#06122c','font-size':'12px',color:'#4b9bb7','font-weight':'650','line-height':'45px'}"
                    :header-cell-style="{background:'#06122c','font-weight':'650','line-height':'45px'}"
                    :row-class-name="tableRowClassName">
                    <el-table-column type="selection" width="55">
                    </el-table-column>
                    <el-table-column label="任务编号" prop="applicationName" min-width="10">
                    <el-table-column prop="number" label="任务编号"  min-width="10">
                    </el-table-column>
                    <el-table-column prop="applicationType" label="标题" min-width="10">
                    <el-table-column prop="title" label="标题" min-width="10">
                    </el-table-column>
                    <el-table-column prop="websiteUrl" label="类型" min-width="10">
                    <el-table-column prop="type" label="类型" min-width="10">
                    </el-table-column>
                    <el-table-column prop="applicationType" label="级别" min-width="10">
                    <el-table-column prop="level" label="级别" min-width="10">
                    </el-table-column>
                    <el-table-column prop="applicationType" label="街道" min-width="10">
                    <el-table-column prop="streetId" label="街道" min-width="10">
                    </el-table-column>
                    <el-table-column prop="applicationType" label="社区" min-width="10">
                    <el-table-column prop="communityId" label="社区" min-width="10">
                    </el-table-column>
                    <el-table-column prop="applicationType" label="开始时间" min-width="10">
                    <el-table-column prop="startTime" label="开始时间" min-width="10">
                    </el-table-column>
                    <el-table-column prop="applicationType" label="结束时间" min-width="10">
                    <el-table-column prop="endTime" label="结束时间" min-width="10">
                    </el-table-column>
                    <el-table-column prop="applicationType" label="任务描述" min-width="10">
                    <el-table-column prop="description" label="任务描述" min-width="10">
                    </el-table-column>
                    <el-table-column prop="applicationType" label="状态" min-width="10">
                    <el-table-column prop="status" label="状态" min-width="10">
                    </el-table-column>
                    <el-table-column label="操作" min-width="10">
                        <template slot-scope="scope">
@@ -62,18 +61,11 @@
                        </template>
                    </el-table-column>
                </el-table>
                <!-- 分页 -->
                <!-- <div class="pagination">
                    <el-pagination background :current-page="currentPage" layout="prev, pager, next" :total="totalNum"
                        :page-size="pageSize" @current-change="changeCurrentPage" @prev-click="handlePrev"
                        @next-click="handleNext">
                    </el-pagination>
                </div> -->
            </div>
        </main>
        <footer>
            <!-- 创建弹窗 -->
            <el-dialog :visible.sync="dialogCreate" title="新增第三方接口" width="45%" v-if="dialogCreate"
            <el-dialog :visible.sync="dialogCreate" title="新增任务" width="45%" v-if="dialogCreate"
                :before-close="handleClose">
                <createInterface />
            </el-dialog>
@@ -101,35 +93,55 @@
            updateFlag: false,
            userInfo: '',
            date:'',
            // totalNum: 200,
            // pageSize: 10,
            // currentPage: 1,
            totalNum: 200,
            pageSize: 10,
            currentPage: 1,
        }
    },
    created() {
        this.getUserList();
    async created() {
            const arr = await this.getUserList();
            this.tableData = arr.records;
            this.totalNum = arr.total;
    },
    methods: {
     addTask() {
            this.dialogCreate = true;
       },
        // 获取接口列表
        getUserList() {
            const that = this;
            // const { currentPage, pageSize, search } = this;
            this.dialogCreate = false;
            this.$axios.get("sccg/system/portal/thirdApp/search").then(res => {
                const { code, data } = res;
                if (code == 200) {
                    this.tableData = data;
      async  getUserList() {
            let arr = [];
            const { currentPage, pageSize,context,messageStatus,messageKind } = this;
            await this.$axios({
                method: 'post',
                url: '/sccg/task/list',
                data: {
                    body: "",
                    channelCode: "",
                    createUser: '',
                    current: currentPage,
                    head: context,
                    messageType: "",
                    pageSize: pageSize,
                    randomCode: "",
                    remark: "",
                    sendTime: "",
                    status:"",
                    targetFrom: "",
                    targetTo: ""
                }
            })
                .then(res => {
                     arr = res.data;
                })
            return arr;
        },
        // 设置表格斑马纹
        tableRowClassName({ row, rowIndex }) {
            if ((rowIndex + 1) % 2 == 0) {
            if ((rowIndex + 1) % 2 === 0) {
                return 'warning-row';
            } else {
                return 'success-row';
            }
            return '';
        },
        // 打开新增界面
        handleAdd() {
@@ -152,34 +164,16 @@
        },
        // 删除第三方接口
        handleDelete({ id }) {
            console.log(id);
            this.$axios.delete('sccg/system/portal/thirdApp/delete', {
                params: {
                    id
                }
            }).then(res => {
                console.log(res);
            })
        }
        // // 当前页改变触发事件
        // changeCurrentPage(page) {
        //     this.currentPage = page;
        //     this.getUserList();
        // },
        // // 上一页点击事件
        // handlePrev(page) {
        //     this.currentPage = page;
        //     this.getUserList();
        // },
        // // 下一页点击事件
        // handleNext(page) {
        //     this.currentPage = page;
        //     this.getUserList();
        // },
    }
}
</script>
<!-- sccg/system/portal/thirdApp/search -->
<style lang="scss" scoped>
.otherInterface {
    header {
@@ -205,7 +199,7 @@
            display: flex;
            line-height: 60px;
            color: #4b9bb7;
            background-color: #09152f;
            // background-color: #09152f;
            display: flex;
            .add,.search,.btn{
                flex:1;
@@ -225,11 +219,11 @@
                height: 35px;
                margin-left: 10px;
                &::v-deep .el-input__inner {
                    background-color: #09152f;
                    border: 1px solid #17324c;
                    font-size: 12px;
                }
                // &::v-deep .el-input__inner {
                //     background-color: #09152f;
                //     border: 1px solid #17324c;
                //     font-size: 12px;
                // }
            }
        }
@@ -237,7 +231,7 @@
            margin-top: 20px;
            .el-table {
                color: #4b9bb7;
                // color: #4b9bb7;
                &::v-deep .el-table__empty-block {
                    background-color: #06122c;