kimi
2020-03-18 fadf2795757ac6df1c792546725ea177c93d9d7a
Merge branch 'master' of http://highdatas.com:9000/r/~kimi/srs

# Conflicts:
# vue.config.js
7个文件已修改
188 ■■■■ 已修改文件
src/components/popup/newProject.vue 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/popup/portion/substepReadOnly.vue 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/popup/prodetail.vue 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/square.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/calendarTask.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/list.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/popup/newProject.vue
@@ -24,6 +24,7 @@
                      </el-form-item>
                        
                      <el-form-item label="起止时间:" prop="items" style="width: 50%;">
                                <!-- :picker-options="pickerOptions01" -->
                            <el-date-picker
                                v-model="ruleForm.items"
                                type="daterange"
@@ -45,7 +46,8 @@
                <substep ref="substep_zj" v-bind:xmId="xmId" v-bind:totalItems="totalItems"></substep>
      </div>
      <div v-if="add_Step == 2" style="width: 100%; height: 100%;" align="center">
        <substepReadOnly v-bind:form_objs="form_objs" v-bind:showData_="showData_"></substepReadOnly>
        <!-- <substepReadOnly v-bind:form_objs="form_objs" v-bind:showData_="showData_"></substepReadOnly> -->
        <substepReadOnly v-bind:xmId="xmId"></substepReadOnly>
      </div>
    </div>
         
@@ -74,6 +76,38 @@
        substepReadOnly
    },
  data () {
        var validateTtems = (rule, value, callback) => {
                    if (value.length > 1) {
                        let a1 = new Date(value[0]);
                        let a2 = new Date(this.ruleForm.items[1]);
                        if (this.rowData.beginDate && !this.rowData.endDate) {
                            let bb0 = new Date(this.rowData.beginDate);
                            let bb0str = this.$moment(bb0).format('YYYY-MM-DD');
                            if (a1 > bb0) {
                                callback(new Error('开始时间应小于' + bb0str));
                            }
                            else if (a2 < bb0) {
                                callback(new Error('结束时间应大于' + bb0str));
                            }
                        }
                        else if (this.rowData.beginDate && this.rowData.endDate) {
                            let bb0 = new Date(this.rowData.beginDate);
                            let bb1 = new Date(this.rowData.endDate);
                            let bb0str = this.$moment(bb0).format('YYYY-MM-DD');
                            let bb1str = this.$moment(bb1).format('YYYY-MM-DD');
                            if (a1 > bb0) {
                                callback(new Error('开始时间应小于' + bb0str));
                            }
                            else if (a2 < bb1) {
                                callback(new Error('结束时间应大于' + bb1str));
                            }
                        }
                        callback();
                    }
          };
    return {
        userId: undefined,
        assign: undefined,
@@ -124,9 +158,10 @@
                items: [
                    {
                        type: "array",
                        validator: validateTtems,
                        required: true,
                        message: "不能为空",
                        trigger: ["change", "blur"]
                        //message: "不能为空",
                        trigger: ["change"]
                    }
                ]
                
@@ -173,8 +208,8 @@
                  }
                });
                if(is_null1) {
                    this.saveStep1();
                  this.loading_save = true;
                 // this.loading_nextStep = true;
                //    this.saveStep1();
                }
                
            //    this.xmId = "c3b7f55c800e4726b53fdc18dd994603";
@@ -227,6 +262,7 @@
                    }).then(data_1 => {
                        if(data_1.data.success) {
                            me.add_Step = 1;
                            me.loading_nextStep = false;
                        }else {
                            this.$message({message:'创建项目失败', type: 'warning'});
                        }
@@ -243,6 +279,7 @@
                    me.xmId = data_.data.data;
                    me.totalItems = ruleForm_.items;
                    me.add_Step = 1;
                    me.loading_nextStep = false;
                }).catch(error =>{
                })
            }
src/components/popup/portion/substepReadOnly.vue
@@ -1181,14 +1181,23 @@
<script>
  export default {
        props:{
            showData_: {
            /* showData_: {
                type: Object,
                required: true
            },
            form_objs: {
               type: Object,
               required: true
            }, */
            xmId: {
               type: String,
               required: true
            },
            /* totalItems: {
                type: Array,
                required: true
            } */
        },
    data() {
      return {
@@ -1480,6 +1489,40 @@
            },
            
            getDetailed() {
                let me = this;
                let url = "/api/detail/parent/" + this.xmId;
                this.$axios.get(url).then(data_ => {
                    me.defaultCheckedKeys = [];
                    me.showData = {};
                    let details_ = data_.data.data;
                    me.money = 0;
                    if(details_.length > 0) {//如果存在明细
                        for(let i=0; i<details_.length; i++) {
                            let detail_ = details_[i];
                            //设置树的选中
                            me.defaultCheckedKeys.push(detail_.type);
                            //展开所有树节点对应的from
                            me.showData[detail_.type] = true;
                            //给所有的from的数据赋值
                            me.form_[detail_.type] = detail_;
                            me.form_[detail_.type].userIds = [];
                            me.form_[detail_.type].userIds.push(detail_.roleName);
                            me.form_[detail_.type].userIds.push(detail_.userId);
                            me.money += parseFloat(detail_.budget);
                        }
                    }
                }).catch(error =>{
                })
            },
            /* getDetailed() {
                this.showData = this.showData_;
                this.form_= this.form_objs;
                this.money = 0;
@@ -1489,7 +1532,7 @@
                    form_obj = this.form_objs[itm_k];
                    this.money += parseFloat(form_obj.budget); 
                }
            },
            }, */
            
            //单一事件
            title_titleType(val) {
src/components/popup/prodetail.vue
@@ -1,23 +1,18 @@
<template>
  <div class="class_dataImport">
     <div style="height: 55vh; padding:0px; box-sizing:boder-box;">
       <div style="width: 1px; height: 1px;" align="center">
           <substep  v-if="isShow1" ref="substep_zj" v-bind:xmId="xmId" v-bind:totalItems="totalItems"></substep>
       </div>
      <div style="width: 100%; height: 100%;" align="center">
        <substepReadOnly v-if="isShow" v-bind:form_objs="form_objs" v-bind:showData_="showData_"></substepReadOnly>
      </div>
            <div style="width: 100%; height: 100%;" align="center">
              <substepReadOnly v-bind:xmId="rowData.id"></substepReadOnly>
            </div>
    </div>
         
  </div>
</template>
<script>
import substep from './portion/substep.vue'
import substepReadOnly from './portion/substepReadOnly.vue'
export default {
  name: 'dataImport',
 name: 'dataImport',
 props:{
       rowData:{
           type: Object,
@@ -26,33 +21,20 @@
 },
    components: {
        substepReadOnly,
        substep
    },
  data () {
    return {
        userId: undefined,
        assign: undefined,
            loading_nextStep: false,
            isShow1: false,
            isShow: false,
            loading_cancel: false,
            ruleForm: {},
            xmId: null,
            totalItems: [],
            showData_: {},
            form_objs: {},
            userId: null,
            assign: null,
        }
  },
mounted() {
    this.userId = localStorage.getItem('userId');
    this.assign = localStorage.getItem('assign');
    this.loadData();
    //this.loadData();
},
  methods:{
        loadData() {
        /* loadData() {
            
            this.xmId = this.rowData.id;
            this.isShow1 = true;
@@ -69,7 +51,7 @@
                
            },1000);
            
        },
        }, */
  }
}
</script>
src/components/square.vue
@@ -30,7 +30,7 @@
            <div v-for="one in dataList" :key="one.id" class="list-item">
                <el-row >
                  <el-col :span="18"><div class="grid-content z_grid-content1 grid-content_text" @click="showItem(one)">{{one.title}}</div></el-col>
                  <el-col :span="3"><div class="grid-content z_grid-content1 grid-content_exam" @click="showLinkItem(one)">{{formatter(one.examine)}}</div></el-col>
                  <el-col :span="3"><div class="grid-content z_grid-content1 grid-content_exam" @click="showLinkItem(one)">{{formatter(one)}}</div></el-col>
                  <el-col :span="3"><div class="grid-content z_grid-content1 grid-content_time">{{one.time}}</div></el-col>
                </el-row>
                
@@ -261,17 +261,17 @@
                this.selectOne = one;
            },
            showLinkItem(one) {
                this.dialogProdetail = true;
                this.rowData = {
                    id: one.linkId,
                }
                this.dialogProdetail = true;
            },
            createNew() {
                this.form = {};
                this.dialogFormVisible = true;
            },
            formatter(exam){
                if(exam){
            formatter(one){
                if(one.examine && one.linkId){
                    return "已关联项目";
                }
            },
@@ -312,7 +312,7 @@
                let pageno = this.pagenum;
                let url = "/api/topic/page/" + this.pageno;
                let params =  {};
                if(query){
                if(query && query != {}){
                    params.title = query.title;
                    params.desp = query.desp;
                }
src/views/calendarTask.vue
@@ -30,12 +30,14 @@
                <el-upload
                    class="upload-demo"
                    :action="upload_url"
                    :data="upData"
                    :limit="1"
                    :file-list="fileList"
                    :auto-upload='false'
                    ref="upload"
                    :on-success="upSuccess"
                    :on-error="upError"
                    >
                    <el-button size="medium" type="text">选择文件</el-button>
                    <div slot="tip" class="el-upload__tip">文件不超过50M</div>
@@ -133,11 +135,15 @@
                    doHandleTask() {
                        //此id的明细任务完成
                        let id = this.handleTaskType.id;
                        if (!this.desc_task) {
                            this.$message('请填写描述');
                            return
                        }
                        this.upData = {//设置要传的参数
                            desp: this.desc_task
                        };
                        if(this.handleTaskType.mustAttach) {
                            this.upData = {//设置要传的参数
                                desp: this.desc_task
                            },
                            this.$refs.upload.submit();//开始上传
                        }
                        else {
@@ -167,15 +173,23 @@
                        }
                    },
                    
                    // submitUpload() {
                    //     this.handleTaskType; //要处理的明细数据
                submitUpload() {
                    this.handleTaskType; //要处理的明细数据
                    this.upData = {//设置要传的参数
                        
                    //     this.upData = {//设置要传的参数
                    //     },
                    //     this.upload_url = ""; //设置上传接口
                    //   this.$refs.upload.submit();//开始上传
                    // },
                    },
                    this.upload_url; //设置上传接口
                     this.$refs.upload.submit();//开始上传
                 },
                 upSuccess(response, file, fileList) {
                     this.$message('上传成功');
                 },
                 upError(err, file, fileList) {
                     this.$message('上传失败');
                 },
                    
                    Cancel() {
                        this.dialog_1 = false;
src/views/list.vue
@@ -230,14 +230,16 @@
                this.rowData = {};
            },
            editProject() {
                if(!this.selected || this.selected.status != "edit"){
                if(!this.selected || this.selected.status == "finish"){
                    
                    this.$message({message:'请选中一条未启动的项目', type: 'warning'});
                    this.$message({message:'请选中一条未完成的项目', type: 'warning'});
                }else {
                    this.rowData = {
                        id:this.selected.id,
                        desp:this.selected.desp,
                        name: this.selected.name,
                        beginDate: this.selected.beginDate,
                        endDate: this.selected.endDate,
                        objective:this.selected.reseachType,
                        items:[this.$moment(this.selected.startTime).format('YYYY-MM-DD'),this.$moment(this.selected.endTime).format('YYYY-MM-DD')]
                    }
vue.config.js
@@ -7,7 +7,7 @@
        proxy: {
            '/api/api': {
                //target: 'http://srs.highdatas.com:8090',
                target: 'http://localhost:9010',
                target: 'http://fcfhyi.natappfree.cc',
                                
                changeOrigin: true,
                ws: true,