|
@@ -228,7 +228,7 @@
|
|
|
</el-popover>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column v-if="isDingding" :label="isAuditList ? '审核' : '操作'" width="180" fixed="right" >
|
|
|
+ <el-table-column v-if="!isDingding" :label="isAuditList ? '审核' : '操作'" width="180" fixed="right" >
|
|
|
<template slot-scope="scope">
|
|
|
<div v-if="isAuditList">
|
|
|
<el-button icon="el-icon-check" circle size="mini" @click="approve(scope.row)"></el-button>
|
|
@@ -240,7 +240,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column v-if="!isDingding" label="操作" width="90" fixed="right">
|
|
|
+ <el-table-column v-if="isDingding" label="操作" width="90" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button icon="iconfont firerock-iconguanlian" circle size="mini" @click="DingdingEditor(scope.row)"></el-button>
|
|
|
</template>
|
|
@@ -523,37 +523,48 @@
|
|
|
</el-dialog>
|
|
|
|
|
|
<!-- 钉钉环境交互效果切换 -->
|
|
|
- <el-dialog title="进行项目关联" :visible.sync="DingdingEditDialog" width="800px">
|
|
|
- <el-form ref="DingdingForm" label-width="80px" style="margin:40px 0">
|
|
|
- <el-form-item label="投入项目" style="width:300px;margin-right:30px;display:inline-block;" prop="projectId">
|
|
|
- <el-select style="width:100%" @change="getwuduList(2,1)" v-model="DingdingForm.projectId" filterable clearable placeholder="请选择投入项目">
|
|
|
- <el-option
|
|
|
- v-for="item in projectList"
|
|
|
- :key="item.id"
|
|
|
- :label="item.projectName"
|
|
|
- :value="item.id">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item :label="wuduData.customDegreeName"
|
|
|
- style="width:360px;margin-right:30px;display:inline-block;"
|
|
|
- prop="degreeName">
|
|
|
- <el-select style="width:220px" v-model="DingdingForm.degreeId" filterable clearable placeholder="请选择" >
|
|
|
- <el-option
|
|
|
- v-for="item in wuduList"
|
|
|
- :key="item.id"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- <el-link style="display: inline-block;margin-left: 20px;">添加</el-link>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- </el-form>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="DingdingEditDialog = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="DingdingDetermine()">确 定</el-button>
|
|
|
- </span>
|
|
|
+ <el-dialog title="项目关联信息" v-if="DingdingEditDialog" :close-on-click-modal="false" :visible.sync="DingdingEditDialog" width="800px" customClass="customWidth">
|
|
|
+
|
|
|
+ <el-table data="" :loading="DingdingTableLoading">
|
|
|
+ <el-table-column label="时间段"></el-table-column>
|
|
|
+ <el-table-column label="关联项目"></el-table-column>
|
|
|
+ <el-table-column :label="wuduData.customDegreeName"></el-table-column>
|
|
|
+ <el-table-column label="操作" width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button size="small" type="primary" @click="DingdingAddorMod(scope.row)">编辑</el-button>
|
|
|
+ <el-button size="small" type="danger" @click="DingdingDelete(scope.row)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="DingdingEditDialog = false">关闭</el-button>
|
|
|
+ <el-button type="primary" @click="DingdingAddorMod()">新增关联项目</el-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-dialog append-to-body title="新增/修改关联项目" v-if="appendAddorModDialog" :visible.sync="appendAddorModDialog" width="600px" customClass="customWidth">
|
|
|
+ <el-form label-width="100" :inline="true" style="margin-top:20px">
|
|
|
+ <el-form-item label="开始日期">
|
|
|
+ <el-date-picker
|
|
|
+ style="width:150px"
|
|
|
+ v-model="relationItem.startDate"
|
|
|
+ type="date"
|
|
|
+ placeholder="请选择日期"></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="结束日期" style="margin-left:50px">
|
|
|
+ <el-date-picker
|
|
|
+ style="width:150px"
|
|
|
+ v-model="relationItem.endDate"
|
|
|
+ type="date"
|
|
|
+ placeholder="请选择日期"></el-date-picker>
|
|
|
+ </el-form-item><br>
|
|
|
+ <el-form-item label="关联项目"></el-form-item>
|
|
|
+ <el-form-item label="自定义维度" style="margin-left:50px"></el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="appendAddorModDialog = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="appendAddorModSure()">提交</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</el-dialog>
|
|
|
</section>
|
|
|
</template>
|
|
@@ -670,7 +681,15 @@ export default {
|
|
|
// 钉钉环境交互
|
|
|
isDingding: 0,
|
|
|
DingdingEditDialog: false,
|
|
|
- DingdingForm:{}
|
|
|
+ DingdingTableLoading: false,
|
|
|
+ appendAddorModDialog: false,
|
|
|
+ relationItem: {
|
|
|
+ bustripId: '', //出差记录id
|
|
|
+ startDate: '',
|
|
|
+ endDate: '',
|
|
|
+ projectId: '',
|
|
|
+ degreeId: ''
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
@@ -697,55 +716,56 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
// 钉钉环境交互
|
|
|
- DingdingClear(){
|
|
|
- this.wuduList = []
|
|
|
- this.DingdingForm.degreeId = null
|
|
|
- },
|
|
|
DingdingEditor(e){
|
|
|
this.DingdingEditDialog = true
|
|
|
- if(e.degreeId != null){
|
|
|
- e.degreeId = e.degreeId + ''
|
|
|
- // console.log("e.degreeId",e.degreeId);
|
|
|
- }
|
|
|
- this.DingdingForm = JSON.parse(JSON.stringify(e))
|
|
|
- this.getwuduList(2)
|
|
|
- // console.log('editor',this.DingdingForm);
|
|
|
+ this.DingdingTableLoading = true
|
|
|
+ this.http.post('/bustrip-project/list',{
|
|
|
+ bustripId: e.id
|
|
|
+ },res => {
|
|
|
+ if(res.code == 'ok'){
|
|
|
+ this.DingdingTableLoading = false
|
|
|
+ console.log('getlist',res.data);
|
|
|
+ }else {
|
|
|
+ this.DingdingTableLoading = false
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },err => {
|
|
|
+ this.DingdingTableLoading = false
|
|
|
+ this.$message({
|
|
|
+ message: err,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
- DingdingDetermine(){
|
|
|
- let edddd = {
|
|
|
- id: this.DingdingForm.id,
|
|
|
- projectId: this.DingdingForm.projectId, //项目id
|
|
|
- degreeId:this.DingdingForm.degreeId, //维度id
|
|
|
- degreeName: null
|
|
|
- }
|
|
|
- for(let i=0; i<this.wuduList.length; i++){
|
|
|
- if(this.wuduList[i].id == edddd.degreeId){
|
|
|
- edddd.degreeName = this.wuduList[i].name
|
|
|
+ DingdingAddorMod(){
|
|
|
+ this.appendAddorModDialog = true
|
|
|
+
|
|
|
+ },
|
|
|
+ appendAddorModSure(){
|
|
|
+ this.http.post('/bustrip-project/addOrMod',{
|
|
|
+ bustripId: '', //出差记录id
|
|
|
+ startDate: '',
|
|
|
+ endDate: '',
|
|
|
+ projectId: '',
|
|
|
+ degreeId: ''
|
|
|
+ },res => {
|
|
|
+ if(res.code == 'ok'){
|
|
|
+
|
|
|
+ }else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
}
|
|
|
- }
|
|
|
- this.http.post( '/business-trip/modifyProject', edddd,
|
|
|
- res => {
|
|
|
- if (res.code == "ok") {
|
|
|
- this.DingdingForm = {}
|
|
|
- this.DingdingEditDialog = false
|
|
|
- this.$message({
|
|
|
- message: '修改成功',
|
|
|
- type: 'success'
|
|
|
- })
|
|
|
- this.billss()
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- error => {
|
|
|
- this.$message({
|
|
|
- message: error,
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- });
|
|
|
+ },err => {
|
|
|
+ this.$message({
|
|
|
+ message: err,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
|
|
@@ -1399,13 +1419,13 @@ export default {
|
|
|
}
|
|
|
var pId = this.editItemForm.projectId
|
|
|
}else{
|
|
|
- if(i == 1){
|
|
|
- this.DingdingForm.degreeId = null
|
|
|
- }
|
|
|
- if(this.DingdingForm.projectId == '' || this.DingdingForm.projectId == null){
|
|
|
- return
|
|
|
- }
|
|
|
- var pId = this.DingdingForm.projectId
|
|
|
+ // if(i == 1){
|
|
|
+ // this.DingdingForm.degreeId = null
|
|
|
+ // }
|
|
|
+ // if(this.DingdingForm.projectId == '' || this.DingdingForm.projectId == null){
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // var pId = this.DingdingForm.projectId
|
|
|
}
|
|
|
|
|
|
this.http.post('/project/getDegreeList',{
|