|  | @@ -3,7 +3,7 @@
 | 
	
		
			
				|  |  |      <el-row :gutter="20">
 | 
	
		
			
				|  |  |        <!--机构数据-->
 | 
	
		
			
				|  |  |        <el-col :span="4" :xs="24">
 | 
	
		
			
				|  |  | -        <org-tree v-model="queryParams.orgId" @defaultKey="getDefaultKey" @checkChange="checkChange"
 | 
	
		
			
				|  |  | +        <org-tree v-model="queryParams.orgId" @defaultKey="getDefaultKey" @defaultOrg="getDefaultOrg" @checkChange="checkChange"
 | 
	
		
			
				|  |  |                      @click="clickTreeNode"></org-tree>
 | 
	
		
			
				|  |  |        </el-col>
 | 
	
		
			
				|  |  |        <el-col :span="20" :xs="24">
 | 
	
	
		
			
				|  | @@ -64,7 +64,7 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <el-row :gutter="10" class="mb8">
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -<!--      <el-col :span="1.5">
 | 
	
		
			
				|  |  | +     <el-col :span="1.5">
 | 
	
		
			
				|  |  |          <el-button
 | 
	
		
			
				|  |  |            type="primary"
 | 
	
		
			
				|  |  |            plain
 | 
	
	
		
			
				|  | @@ -73,7 +73,7 @@
 | 
	
		
			
				|  |  |            @click="handleExport"
 | 
	
		
			
				|  |  |            v-hasPermi="['core:task:export']"
 | 
	
		
			
				|  |  |          >导出</el-button>
 | 
	
		
			
				|  |  | -      </el-col>-->
 | 
	
		
			
				|  |  | +      </el-col>
 | 
	
		
			
				|  |  |        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
	
		
			
				|  |  |      </el-row>
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -89,7 +89,7 @@
 | 
	
		
			
				|  |  |          <template slot-scope="scope">
 | 
	
		
			
				|  |  |            <dict-tag :options="dict.type.sys_access_cycle" :value="scope.row.cycle" />
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  | -      </el-table-column>>
 | 
	
		
			
				|  |  | +      </el-table-column>
 | 
	
		
			
				|  |  |        <el-table-column label="开始时间" align="center" prop="planStartTime" width="180">
 | 
	
		
			
				|  |  |  <!--        <template slot-scope="scope">
 | 
	
		
			
				|  |  |            <span>{{ parseTime(scope.row.planStartTime, '{y}-{m}-{d}') }}</span>
 | 
	
	
		
			
				|  | @@ -148,10 +148,11 @@
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  | -import { listTask, getTask, delTask, addTask, updateTask,roleList } from "@/api/core/task";
 | 
	
		
			
				|  |  | +import { listTask, getTask, delTask, addTask, updateTask,roleList,exportExcel } from "@/api/core/task";
 | 
	
		
			
				|  |  |  import OrgTree from "@/components/orgTree";
 | 
	
		
			
				|  |  |  import DialogInfo from "./dialog.info";
 | 
	
		
			
				|  |  |  import {listPlanRole} from "@/api/core/edu/plan";
 | 
	
		
			
				|  |  | +import {formatTime} from "@/utils/ruoyi";
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    components: {OrgTree,DialogInfo},
 | 
	
		
			
				|  |  |    name: "Task",
 | 
	
	
		
			
				|  | @@ -192,6 +193,7 @@ export default {
 | 
	
		
			
				|  |  |        rules: {
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        roleList: [],
 | 
	
		
			
				|  |  | +      orgName:'',
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    created() {
 | 
	
	
		
			
				|  | @@ -208,6 +210,19 @@ export default {
 | 
	
		
			
				|  |  |          this.loading = false;
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +/*    handleExport() {
 | 
	
		
			
				|  |  | +      console.log(this,'this')
 | 
	
		
			
				|  |  | +      this.$http()
 | 
	
		
			
				|  |  | +        .post('/core/task/export',this.queryParams)
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +     /!* exportExcel(this.queryParams).then(res => {
 | 
	
		
			
				|  |  | +        let file = new File([res],res.getHeader())
 | 
	
		
			
				|  |  | +        console.log(res,'res111')
 | 
	
		
			
				|  |  | +      });*!/
 | 
	
		
			
				|  |  | +    },*/
 | 
	
		
			
				|  |  | +    getDefaultOrg(org){
 | 
	
		
			
				|  |  | +      this.orgName = org.name;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      initRoleList() {
 | 
	
		
			
				|  |  |        roleList({}).then(response => {
 | 
	
		
			
				|  |  |          this.roleList = response.data;
 | 
	
	
		
			
				|  | @@ -224,6 +239,7 @@ export default {
 | 
	
		
			
				|  |  |      // 节点单击事件
 | 
	
		
			
				|  |  |      clickTreeNode(data) {
 | 
	
		
			
				|  |  |        this.queryParams.orgId = data.id;
 | 
	
		
			
				|  |  | +      this.orgName = data.name;
 | 
	
		
			
				|  |  |        this.handleQuery();
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      /** 下穿状态改变*/
 | 
	
	
		
			
				|  | @@ -297,10 +313,10 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      /** 导出按钮操作 */
 | 
	
		
			
				|  |  | -    handleExport() {
 | 
	
		
			
				|  |  | +   handleExport() {
 | 
	
		
			
				|  |  |        this.download('core/retrievalTask/export', {
 | 
	
		
			
				|  |  |          ...this.queryParams
 | 
	
		
			
				|  |  | -      }, `task_${new Date().getTime()}.xlsx`)
 | 
	
		
			
				|  |  | +      }, `${this.orgName+'-监控调阅任务记录-'+this.formatTime(new Date(),'YYYYMMhh')}.xlsx`)
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  };
 |