|
|
|
|
@ -8,8 +8,8 @@
|
|
|
|
|
<slot>
|
|
|
|
|
<div>
|
|
|
|
|
<!-- <Button type="primary" @click="load" style="margin-left: 10px">查询</Button> -->
|
|
|
|
|
<Button type="primary" @click="edit()" style="margin:0 10px">立即同步</Button>
|
|
|
|
|
<span>最后同步时间:</span>
|
|
|
|
|
<Button type="primary" @click="departmentShow = true" style="margin:0 10px">立即同步</Button>
|
|
|
|
|
<span>最后同步时间:{{syncAt}}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</slot>
|
|
|
|
|
</LxHeader>
|
|
|
|
|
@ -76,6 +76,14 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog title="同步部门信息" :visible.sync="departmentShow" width="30%">
|
|
|
|
|
<div style="font-size: 20px;">是否确认同步管党治党平台的部门信息?</div>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="departmentShow = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="getSyncDepartment">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
@ -83,7 +91,9 @@
|
|
|
|
|
import {
|
|
|
|
|
listdept,
|
|
|
|
|
save,
|
|
|
|
|
del
|
|
|
|
|
del,
|
|
|
|
|
lastSyncAt,
|
|
|
|
|
syncDepartment
|
|
|
|
|
} from "../../api/system/department.js";
|
|
|
|
|
import {
|
|
|
|
|
listuser
|
|
|
|
|
@ -96,11 +106,14 @@
|
|
|
|
|
created() {
|
|
|
|
|
this.initLoad();
|
|
|
|
|
this.load();
|
|
|
|
|
this.getLastAt()
|
|
|
|
|
},
|
|
|
|
|
mounted() {},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
dialogFormVisible: false,
|
|
|
|
|
departmentShow:false,
|
|
|
|
|
syncAt:'',
|
|
|
|
|
formLabelWidth: "120px",
|
|
|
|
|
form: {
|
|
|
|
|
name: "",
|
|
|
|
|
@ -171,6 +184,18 @@
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
getLastAt(){
|
|
|
|
|
lastSyncAt().then(res=>{
|
|
|
|
|
this.syncAt = res.msg?res.msg:''
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getSyncDepartment(){
|
|
|
|
|
syncDepartment().then(res=>{
|
|
|
|
|
this.load()
|
|
|
|
|
this.getLastAt()
|
|
|
|
|
this.departmentShow = false
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
edit(obj) {
|
|
|
|
|
this.form = this.$options.data().form
|
|
|
|
|
if (obj) {
|
|
|
|
|
|