zengyicheng преди 2 години
родител
ревизия
ede6b04774

+ 2 - 2
src/views/fundManage/makerfund.vue

@@ -246,8 +246,8 @@
         class="pageSubmitData"
         :before-close="init">
         <div class="diaTit1" style="margin-top: 0;">
-            <div class="spans">项目名称:</div><div style="margin-right: 30px;color: #adadad;">{{ ProjectFundData.title }}</div>
-            <div class="spans">项目负责人:</div><div style="color:#adadad">{{ ProjectFundData.pro_leader }}</div>
+            <div class="spans">项目名称:</div><div style="margin-right: 30px;color: #adadad;">{{ ProjectFundData.ptit }}</div>
+            <div class="spans">项目负责人:</div><div style="color:#adadad">{{ ProjectFundData.ppl }}</div>
         </div>
         
 

+ 10 - 0
src/views/projectApply/components/MakerSpaceWord.vue

@@ -80,6 +80,7 @@
         <div class="value">
           <el-date-picker
             v-model="wordData['plannedEnd_at']"
+            @change="checkTime"
             type="date"
             placeholder="请选择项目计划完成时间"
             prefix-icon="none"
@@ -706,6 +707,15 @@ export default {
     };
   },
   methods: {
+    checkTime(){
+      var a = new Date(this.wordData['begin_at']);
+      var b = new Date(this.wordData['plannedEnd_at']);
+      if(b<a){
+        this.$message.error('计划完成时间不得在项目起始时间之前!');
+        this.wordData['plannedEnd_at'] = "";
+        return
+      }
+    },
     getProjectDepartmentData() {
       //获取项目立项申请基础信息页面所在部门数据
       this.loading = true;

+ 10 - 0
src/views/projectApply/components/studentProjectWord.vue

@@ -166,6 +166,7 @@
         <td colspan="2">
           <el-date-picker
             v-model="wordData.endTime"
+            @change="checkTime"
             type="date"
             placeholder="请选择项目计划完成时间"
             prefix-icon="none"
@@ -689,6 +690,15 @@ export default {
     };
   },
   methods: {
+    checkTime(){
+      var a = new Date(this.wordData.beginTime);
+      var b = new Date(this.wordData.endTime);
+      if(b<a){
+        this.$message.error('计划完成时间不得在项目起始时间之前!');
+        this.wordData.endTime = "";
+        return
+      }
+    },
     getText(value) {
       //电话验证
       let verify =

+ 257 - 253
src/views/projectSettlement/components/projectSettlementDetailConclusion.vue

@@ -1,22 +1,21 @@
 <template>
   <!-- 项目管理 项目结题附件 -->
-    <div class="ProjectManagement5" v-loading="loading">
-      <div class="pmInp">
-          <!-- <el-button type="primary" class="btn" @click="addFile" size="mini">上传文件</el-button> -->
-          <!-- <beUpload @getFile="getFile"  :navName="'上传文件'" :accept="accept"></beUpload> -->
-
-        </div>
+  <div class="ProjectManagement5" v-loading="loading">
+    <div class="pmInp">
+      <!-- <el-button type="primary" class="btn" @click="addFile" size="mini">上传文件</el-button> -->
+      <!-- <beUpload @getFile="getFile"  :navName="'上传文件'" :accept="accept"></beUpload> -->
+    </div>
 
-        <!-- 表格部分开始 -->
-        <el-table
-        :data="tableData"
-        tooltip-effect="dark"
-        stripe
-        height="550px"
-        class="fontSize"
-        :header-cell-style="{ background: '#f2f2f2',color:'#000' }"
-        >
-        <!-- <el-table-column
+    <!-- 表格部分开始 -->
+    <el-table
+      :data="tableData"
+      tooltip-effect="dark"
+      stripe
+      height="550px"
+      class="fontSize"
+      :header-cell-style="{ background: '#f2f2f2', color: '#000' }"
+    >
+      <!-- <el-table-column
           prop="projectTitle"
           label="项目名称"
           align="center"
@@ -26,68 +25,64 @@
           </template>
         </el-table-column> -->
 
-        <el-table-column
-          prop="fileName"
-          label="项目结题附件"
-          align="center"
-         >
-        </el-table-column>
-        
-        <el-table-column
-          prop="size"
-          label="大小"
-          align="center"
-          >
-        </el-table-column>
-       
-        <el-table-column
-          prop="uploadTime"
-          label="时间"
-          align="center"
-          >
-        </el-table-column>
+      <el-table-column prop="fileName" label="项目结题附件" align="center">
+      </el-table-column>
 
-        <el-table-column
-          prop="operation"
-          align="center"
-          label="操作"
-          >
-          <template #default="scope">
-              <div class="operations">
-                      <el-button type="primary"  size="mini" @click="checkFile(scope.row.url)" style="background: #477edd">明细查看</el-button>
-              </div>
-          </template>
-        </el-table-column>
-        </el-table>
-      <!-- 展示文档开始 -->
-      <el-dialog
-            title="展示文件"
-            :visible.sync="showFile"
-            width="80vw"
-            class="addDialog showDialog"
-          >
-      
+      <el-table-column prop="size" label="大小" align="center">
+      </el-table-column>
+
+      <el-table-column prop="uploadTime" label="时间" align="center">
+      </el-table-column>
+
+      <el-table-column prop="operation" align="center" label="操作">
+        <template #default="scope">
+          <div class="operations">
+            <el-button
+              type="primary"
+              size="mini"
+              @click="checkFile(scope.row.url)"
+              style="background: #477edd"
+              >明细查看</el-button
+            >
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 展示文档开始 -->
+    <el-dialog
+      title="展示文件"
+      :visible.sync="showFile"
+      width="80vw"
+      class="addDialog showDialog"
+    >
       <div class="showFileArea">
         <!-- <vpdf v-if="/^\s*$/g.test(showFileUrl)&&showFileUrl.split('.')[showFileUrl.split('.').length-1]=='pdf'" :pdfUrl="showFileUrl"></vpdf> -->
         <vword
-            style="width: 100%; height: 100%; overflow: auto"
-            class="fullStyle"
-            v-if="Wordss['type']!='pdf' && Wordss['name']!='图片'"
-            :pdfUrl="'https://view.officeapps.live.com/op/view.aspx?src='+showFileUrl"
+          style="width: 100%; height: 100%; overflow: auto"
+          class="fullStyle"
+          v-if="Wordss['type'] != 'pdf' && Wordss['name'] != '图片'"
+          :pdfUrl="
+            'https://view.officeapps.live.com/op/view.aspx?src=' + showFileUrl
+          "
         ></vword>
         <vpdf
-            style="width: 100%; height: 100%; overflow: auto"
-            class="fullStyle"
-            :pdfUrl="showFileUrl"
-            v-if="Wordss['type']=='pdf'"
+          style="width: 100%; height: 100%; overflow: auto"
+          class="fullStyle"
+          :pdfUrl="showFileUrl"
+          v-if="Wordss['type'] == 'pdf'"
         ></vpdf>
-        <img :src="showFileUrl" alt="图片哦" v-if="Wordss['name']=='图片'" style="width: auto;height: auto;max-width: 100%;max-height: 100%;">
+        <img
+          :src="showFileUrl"
+          alt="图片哦"
+          v-if="Wordss['name'] == '图片'"
+          style="width: auto; height: auto; max-width: 100%; max-height: 100%"
+        />
       </div>
     </el-dialog>
     <!-- 展示文档结束 -->
 
-      <!-- 分页 -->
-      <!-- <el-pagination
+    <!-- 分页 -->
+    <!-- <el-pagination
             @current-change="handleCurrentChange"
             :current-page="table.currentPage"
             :page-size="table.packageSize"
@@ -96,205 +91,214 @@
             class="paginations"
             :total="table.total">
           </el-pagination> -->
-        <!-- 分页结束 -->
-  
-    </div>
-  </template>
+    <!-- 分页结束 -->
+  </div>
+</template>
   
   <script>
-  import beUpload from '@/components/tool/beUpload'
-  import vpdf from "@/components/vpdf.vue";
-  import vword from "@/components/vword.vue";
-      export default {
-        components: { beUpload, vpdf, vword },
-        data() {
-          return {
-          accept:".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
-            // table:{         // 分页数据
-            //   total:0,
-            //   packageSize:8,
-            //   currentPage:1
-            // }, 
-            showFileType: 0,
-            loading:false,
-            tableData:[],  //附件列表
-            file:'',    //上传文件数据
-            showFile: false,
-            showFileUrl: "",
-            Wordss:{type:"",name:""},
-            canonical:{
-                Image:/^https?:\/\/(.+\/)+.+(\.(gif|png|jpg|jpeg|webp|svg|psd|bmp|tif))$/i,
-                File:/^https?:\/\/(.+\/)+.+(\.(docx|xlsx|ppt|pdf))$/i
-            },
-          }
-        },
-        methods:{
-          //展示文件
-          checkFile(url) {
-            this.showFileUrl = url;
-            this.showFile = true;
+import beUpload from "@/components/tool/beUpload";
+import vpdf from "@/components/vpdf.vue";
+import vword from "@/components/vword.vue";
+export default {
+  components: { beUpload, vpdf, vword },
+  data() {
+    return {
+      accept:
+        ".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
+      // table:{         // 分页数据
+      //   total:0,
+      //   packageSize:8,
+      //   currentPage:1
+      // },
+      showFileType: 0,
+      loading: false,
+      tableData: [], //附件列表
+      file: "", //上传文件数据
+      showFile: false,
+      showFileUrl: "",
+      Wordss: { type: "", name: "" },
+      canonical: {
+        Image:
+          /^https?:\/\/(.+\/)+.+(\.(gif|png|jpg|jpeg|webp|svg|psd|bmp|tif))$/i,
+        File: /^https?:\/\/(.+\/)+.+(\.(docx|xlsx|ppt|pdf))$/i,
+      },
+    };
+  },
+  methods: {
+    //展示文件
+    checkFile(url) {
+      this.showFileUrl = url;
+      this.showFile = true;
 
-            if(typeof url=='undefined')return {type:"",name:""};
-                let urlSplit = url.split(".");
-                const type = urlSplit[urlSplit.length-1]
-                if(this.canonical.Image.test(url)){
-                
-                  this.Wordss={type:type,name:"图片"}
-                  return console.log(this.Wordss);
-                }
-                if(this.canonical.File.test(url)){
-                  this.Wordss={type:type,name:"文档"}
-                  return console.log(this.Wordss);
-                }
-                else return this.Wordss={type:type,name:type}
-          },
-          getFile(val) {    //上传文件
-            this.file = val;
-            let oldData = [];
-            this.tableData.forEach(item=>oldData.push(item))
-            oldData.push(val);
-            let param={
-                uid:this.$store.state.userInfo.userid,
-                cid:this.$route.query['pid'],
-                projectFile:JSON.stringify(oldData)
+      if (typeof url == "undefined") return { type: "", name: "" };
+      let urlSplit = url.split(".");
+      const type = urlSplit[urlSplit.length - 1];
+      if (this.canonical.Image.test(url)) {
+        this.Wordss = { type: type, name: "图片" };
+        return console.log(this.Wordss);
+      }
+      if (this.canonical.File.test(url)) {
+        this.Wordss = { type: type, name: "文档" };
+        return console.log(this.Wordss);
+      } else return (this.Wordss = { type: type, name: type });
+    },
+    getFile(val) {
+      //上传文件
+      this.file = val;
+      let oldData = [];
+      this.tableData.forEach((item) => oldData.push(item));
+      oldData.push(val);
+      let param = {
+        uid: this.$store.state.userInfo.userid,
+        cid: this.$route.query["pid"],
+        projectFile: JSON.stringify(oldData),
+      };
+      this.ajax
+        .post(this.$store.state.api + "/AddProjectManageFile", param)
+        .then(
+          (res) => {
+            console.log(res);
+            if (res.data == 1) {
+              this.getData();
+              this.$message.success("上传成功");
+            } else {
+              this.$message.error("上传失败");
             }
-            this.ajax
-                  .post(this.$store.state.api+'/AddProjectManageFile',param)
-                  .then(res=>{
-                    console.log(res);
-                    if (res.data==1) {
-                      this.getData()
-                      this.$message.success('上传成功')
-                    }else{
-                      this.$message.error('上传失败')
-                    }
-                   
-                  },err=>{
-                    console.log(err);
-                  })
           },
-          handleCurrentChange(val) {   //当页数发生改变的时候调用获取列表数据请求
-            // console.log(`当前页: ${val}`);
-            this.table.currentPage=val
-            this.getData()
-          },
-          getData(){       //获取基础信息
-            this.loading = true;
-              let param={
-                uid:this.$store.state.userInfo.userid,
-                pid:this.$route.query['pid'],
-              }
-              this.ajax
-                    .get(this.$store.state.api+'/SelectProjectManageFile',param)
-                    .then(res=>{
-                      this.tableData=JSON.parse(res.data[0][0]['endFile'])
-                      this.loading = false;
-                    },err=>{
-                      console.log(err);
-                    })
+          (err) => {
+            console.log(err);
+          }
+        );
+    },
+    handleCurrentChange(val) {
+      //当页数发生改变的时候调用获取列表数据请求
+      // console.log(`当前页: ${val}`);
+      this.table.currentPage = val;
+      this.getData();
+    },
+    getData() {
+      //获取基础信息
+      this.loading = true;
+      let param = {
+        uid: this.$store.state.userInfo.userid,
+        pid: this.$route.query["pid"],
+      };
+      this.ajax
+        .get(this.$store.state.api + "/SelectProjectManageFile", param)
+        .then(
+          (res) => {
+            this.tableData = JSON.parse(res.data[0][0]["endFile"]);
+            this.loading = false;
           },
-        },
-        mounted(){
-          this.getData()
-        }
-      }
-  </script>
+          (err) => {
+            console.log(err);
+          }
+        );
+    },
+  },
+  mounted() {
+    this.getData();
+  },
+};
+</script>
   
   <style lang="less">
-  .ProjectManagement5{
-    .pagination{
-      float: right;
-      margin: 20px 55px 10px;
+.ProjectManagement5 {
+  .pagination {
+    float: right;
+    margin: 20px 55px 10px;
+  }
+
+  .addDialog {
+    font-size: 18px;
+    .el-dialog {
+      border-radius: 5px;
+      overflow: hidden;
+      height: 100%;
     }
-  
-    .addDialog {
-        font-size: 18px;
-        .el-dialog {
-          border-radius: 5px;
-          overflow: hidden;
-        }
-        .deleteContent {
-          width: 100%;
-          margin: 30px 0;
-          font-size: 22px;
-          color: #000;
-        }
-        .addDialogLogo {
-          width: 60px;
-          height: 30px;
-          display: flex;
-          justify-content: center;
-          line-height: 30px;
-          border-radius: 5px;
-          background: #f2f2f2;
-          position: absolute;
-          left: 20px; top: 15px; 
-        }
-        .el-dialog__header {
-          display: flex;
-          justify-content: center;
-          background: #32455b;
-        }
-        .el-dialog__title {
-          color:#fff;
-          display: flex;
-          justify-content: center;
-          font-size: 18px;
-          position: relative;
-          top: -2px;
-        }
-        .addDialogMid {
-          box-sizing: border-box;
-          padding: 0 60px 0 10px;
-          .addDialogTit {
-            display: flex;
-            span {
-              width: 80px;
-              font-size: 16px;
-              line-height: 40px;
-              text-align: left;
-            }
-          }
-          .addDialogTit1 {
-            display: flex;
-            justify-content: space-between;
-            margin-bottom: 15px;
-          }
-          .addDialogTit2 {
-            margin-top: 10px;
-            font-size: 16px;
-            color: #000;
-            text-indent: 2em;
-          }
-          .addDialogCon {
-            margin-top: 20px;
-          }
-        }
-        .dialog-footer {
-          display: flex;
-          justify-content: center;
-          box-sizing: border-box;
-          // .btn5 {
-          //   font-size: 16px;
-          // }
+    .el-dialog__body {
+      height: 100%;
+    }
+    .deleteContent {
+      width: 100%;
+      margin: 30px 0;
+      font-size: 22px;
+      color: #000;
+    }
+    .addDialogLogo {
+      width: 60px;
+      height: 30px;
+      display: flex;
+      justify-content: center;
+      line-height: 30px;
+      border-radius: 5px;
+      background: #f2f2f2;
+      position: absolute;
+      left: 20px;
+      top: 15px;
+    }
+    .el-dialog__header {
+      display: flex;
+      justify-content: center;
+      background: #32455b;
+    }
+    .el-dialog__title {
+      color: #fff;
+      display: flex;
+      justify-content: center;
+      font-size: 18px;
+      position: relative;
+      top: -2px;
+    }
+    .addDialogMid {
+      box-sizing: border-box;
+      padding: 0 60px 0 10px;
+      .addDialogTit {
+        display: flex;
+        span {
+          width: 80px;
+          font-size: 16px;
+          line-height: 40px;
+          text-align: left;
         }
       }
-    
-
-    .pmInp{
-      width: 100%;
-      margin: 10px 0 10px 0;
-      display: flex;  
-      justify-content: flex-end;
-      .btn{
-        height: 30px;
-        width: 100px;
+      .addDialogTit1 {
+        display: flex;
+        justify-content: space-between;
+        margin-bottom: 15px;
+      }
+      .addDialogTit2 {
+        margin-top: 10px;
         font-size: 16px;
-        background: #477edd;
-        // margin-left: 10px;
+        color: #000;
+        text-indent: 2em;
+      }
+      .addDialogCon {
+        margin-top: 20px;
       }
     }
+    .dialog-footer {
+      display: flex;
+      justify-content: center;
+      box-sizing: border-box;
+      // .btn5 {
+      //   font-size: 16px;
+      // }
+    }
   }
 
-   
-  </style>
+  .pmInp {
+    width: 100%;
+    margin: 10px 0 10px 0;
+    display: flex;
+    justify-content: flex-end;
+    .btn {
+      height: 30px;
+      width: 100px;
+      font-size: 16px;
+      background: #477edd;
+      // margin-left: 10px;
+    }
+  }
+}
+</style>