|
@@ -186,6 +186,10 @@
|
|
|
<div><span style="color: #606266">时间段</span>
|
|
|
<el-date-picker v-model="createDate" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="billss()" value-format="yyyy-MM-dd" placeholder="选择日期" size="small" clearable style="width:280px"></el-date-picker>
|
|
|
</div>
|
|
|
+ <!-- 从顶顶同步按钮 -->
|
|
|
+ <div style="margin: 0 0 0 20px">
|
|
|
+ <el-button size="small" type="primary" @click="synchronizationDaying = true">从钉钉同步</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<!-- 出差列表 -->
|
|
|
<el-table :data="tableList" style="width: 100%" height="90%">
|
|
@@ -600,6 +604,26 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</el-dialog>
|
|
|
+ <!-- 点击钉钉同步弹窗 -->
|
|
|
+ <el-dialog title="从钉钉同步" :visible.sync="synchronizationDaying" width="480px" :before-close="handleClose">
|
|
|
+ <div>
|
|
|
+ <div class="dingdingtongbu">
|
|
|
+ <span>选择人员</span>
|
|
|
+ <el-select v-model="ownerIdsId" placeholder="请选择人员" clearable style="width:280px" size="small" filterable="true">
|
|
|
+ <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="dingdingtongbu" style="margin-top: 20px">
|
|
|
+ <span>时间段</span>
|
|
|
+ <el-date-picker v-model="createDateList" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" placeholder="选择日期" size="small" clearable style="width:280px"></el-date-picker>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="synchronizationDaying = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="listSynchronize()" :loading="synchronizeLoading">同 步</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</section>
|
|
|
</template>
|
|
|
|
|
@@ -730,7 +754,11 @@ export default {
|
|
|
endDate:[{required: true,message: '请选择结束日期',trigger: 'change'}],
|
|
|
projectId:[{required: true,message: '请选择要关联的项目',trigger: 'change'}],
|
|
|
},
|
|
|
- relationItemTemporaryDate: {}
|
|
|
+ relationItemTemporaryDate: {},
|
|
|
+ synchronizeLoading: false,
|
|
|
+ synchronizationDaying:false,
|
|
|
+ createDateList: [],
|
|
|
+ ownerIdsId: ''
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
@@ -756,6 +784,47 @@ export default {
|
|
|
// console.log("session",this.wuduData);
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 从钉钉同步假期剩余表
|
|
|
+ listSynchronize(){
|
|
|
+ this.synchronizeLoading = true
|
|
|
+ let transmissionObj = {}
|
|
|
+ transmissionObj.userId = this.ownerIdsId
|
|
|
+ if(this.createDateList.length > 0) {
|
|
|
+ transmissionObj.startDate = this.createDateList[0]
|
|
|
+ transmissionObj.endDate = this.createDateList[1]
|
|
|
+ } else {
|
|
|
+ transmissionObj.startDate = this.dayjs().add('-7','day').format("YYYY-MM-DD")
|
|
|
+ transmissionObj.endDate = this.dayjs().format("YYYY-MM-DD")
|
|
|
+ }
|
|
|
+ // console.log(transmissionObj)
|
|
|
+ // return
|
|
|
+ this.http.post('/dingding/syncUserWorkData',transmissionObj,
|
|
|
+ res => {
|
|
|
+ if(res.code == 'ok'){
|
|
|
+ this.synchronizeLoading = false
|
|
|
+ this.synchronizationDaying = false
|
|
|
+ this.$message({
|
|
|
+ message: '同步成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ this.ownerIdsId = ''
|
|
|
+ this.createDateList = []
|
|
|
+ this.getTableList()
|
|
|
+ }else {
|
|
|
+ this.synchronizeLoading = false
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },err => {
|
|
|
+ this.synchronizeLoading = false
|
|
|
+ this.$message({
|
|
|
+ message: err,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
// 钉钉环境交互
|
|
|
DingdingEditor(e){
|
|
|
console.log(e);
|
|
@@ -1691,4 +1760,9 @@ export default {
|
|
|
width: 35%;
|
|
|
text-align: left;
|
|
|
}
|
|
|
+.dingdingtongbu span {
|
|
|
+ display: inline-block;
|
|
|
+ width: 80px;
|
|
|
+ padding-left: 20px;
|
|
|
+}
|
|
|
</style>
|