yuanyiming 2 lat temu
rodzic
commit
28c9d8ae3f
1 zmienionych plików z 650 dodań i 0 usunięć
  1. 650 0
      src/components/markeractivityWord.vue

+ 650 - 0
src/components/markeractivityWord.vue

@@ -0,0 +1,650 @@
+<template>
+    <div id="MakerSpaceWord">
+        <div id="title">
+            <div class="school">深圳技师学院</div>
+            <div class="wordTitle">创客专项资金及项目申请表(创客活动)</div>
+            <div class="date">申请日期:{{wordData.applicationDate}}</div>
+        </div>
+        <table border="1" cellspacing="0" class="table">
+            <tr>
+                <td colspan="4">活动名称</td>
+                <td colspan="5">
+                    <el-input
+                        type="textarea"
+                        autosize
+                        resize="none"
+                        placeholder="请输入项目名称"
+                        v-model="input">
+                    </el-input>
+                </td>
+                <td colspan="3">预算经费</td>
+                <td colspan="4">
+                    <el-input
+                        type="textarea"
+                        autosize
+                        resize="none"
+                        placeholder="请输入预算经费"
+                        v-model="input">
+                    </el-input>
+                </td>
+            </tr>
+            <tr>
+                <td colspan="4">项目负责人</td><td colspan="3">
+                    <el-input
+                        type="textarea"
+                        autosize
+                        resize="none"
+                        placeholder="请输入负责人"
+                        v-model="input">
+                    </el-input>
+                </td><td colspan="2">所在部门</td><td colspan="3">
+                    <el-input
+                        type="textarea"
+                        autosize
+                        resize="none"
+                        placeholder="请输入所在部门"
+                        v-model="input">
+                    </el-input>
+                </td><td colspan="2">联系电话</td><td colspan="3">
+                    <el-input
+                        type="textarea"
+                        autosize
+                        resize="none"
+                        placeholder="请输入联系电话"
+                        v-model="input">
+                    </el-input>
+                </td>
+            </tr>
+            <tr>
+                <td colspan="4">活动时间</td>
+                <td colspan="5">
+                    <el-date-picker
+                        v-model="wordData.endTime"
+                        type="date"
+                        placeholder="请选择活动时间"
+                        prefix-icon="none"
+                        value-format="yyyy-MM-dd HH:mm:ss">
+                    </el-date-picker>
+                </td>
+                <td colspan="3">参与学生人数</td><td colspan="5">
+                    <el-input
+                        type="number"
+                        autosize
+                        style="width: 100%;"
+                        resize="none"
+                        placeholder=""
+                        v-model="input">
+                      </el-input>
+                </td>
+            </tr>
+            
+            <tr>
+                <td colspan="2" rowspan="6"><p>活</p> <p>动</p> <p>指</p> <p>导</p> <p>老</p> <p>师</p></td><td colspan="2">姓名</td><td colspan="3">工作单位/部门</td><td colspan="9">项目分工</td>
+            </tr>
+            <tr v-for="(item,index) in wordData.member" :key="index+'b'">
+                <td colspan="2" style="border-left: none;">
+                    <el-input
+                        type="textarea"
+                        autosize
+                        resize="none"
+                        placeholder="请输入姓名"
+                        v-model="input">
+                    </el-input>
+                </td><td colspan="3">
+                    <el-input
+                        type="textarea"
+                        autosize
+                        resize="none"
+                        placeholder="请输入工作单位/部门"
+                        v-model="input">
+                    </el-input>
+                </td><td colspan="10">
+                    <el-input
+                        type="textarea"
+                        autosize
+                        resize="none"
+                        placeholder="请输入项目分工"
+                        v-model="input">
+                    </el-input>
+                </td>
+            </tr>
+            <tr class="textLeft">
+                <td colspan="2"><p>活动</p><br> <p>计划</p></td><td style="text-align: left;" colspan="15">
+                    <el-input
+                      type="textarea"
+                      :rows="12"
+                      style="width: 100%;"
+                      resize="none"
+                      v-model="input">
+                    </el-input>
+                </td>
+            </tr>
+            <tr class="textLeft">
+                <td colspan="2"><p>预期</p><br><p>目标</p> </td><td colspan="15" style="text-align: left;">
+                    <el-input
+                      type="textarea"
+                      :rows="10"
+                      style="width: 100%;"
+                      resize="none"
+                      v-model="input">
+                    </el-input>
+                </td>
+            </tr>
+            <tr class="textLeft">
+                <td colspan="2"><p>活动受</p><br> <p>众面</p></td><td style="text-align: left;" colspan="15">
+                    <p>参与学生范围:</p>
+                    <el-input
+                      type="textarea"
+                      :rows="12"
+                      style="width: 100%;"
+                      resize="none"
+                      v-model="input">
+                    </el-input>
+                </td>
+            </tr>
+            <!-- <tr class="textLeft">
+                <td colspan="15" style="text-align: left;border-left: none;">
+                  <p>二、创新点</p>
+                    <el-input
+                      type="textarea"
+                      :rows="6"
+                      style="width: 100%;"
+                      resize="none"
+                      v-model="input">
+                    </el-input>
+                </td>
+            </tr> -->
+
+           
+            <tr class="textLeft">
+                <td colspan="2"><p>经费</p><br><p>支出</p> <br><p>计划</p></td><td colspan="15" style="text-align: left;">
+                    <el-input
+                      type="textarea"
+                      :rows="10"
+                      style="width: 100%;"
+                      resize="none"
+                      v-model="input">
+                    </el-input>
+                </td>
+            </tr>
+            <tr>
+                <td rowspan="11"><p>预</p> <p>算</p> <p>经</p> <p>费</p></td>
+            </tr>
+            <tr>
+                <td rowspan="4" style="border-left: none;">总经费</td><td rowspan="4" colspan="2" >元</td>
+            </tr>
+            <tr>
+                <td colspan="12" style="border-left: none;">经费月支出计划</td>
+            </tr>
+            <tr>
+                <td style="border-left: none;">1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td>
+            </tr>
+            <tr>
+                <td v-for="(item,index) in 12" :key="index+'a'" style="border-left: none;">
+                  <el-input
+                    type="number"
+                    autosize
+                    style="width: 100%;"
+                    resize="none"
+                    v-model="input">
+                  </el-input>
+                </td>
+            </tr>
+            <tr>
+                <td colspan="4" style="border-left: none;">支出类别</td><td colspan="5">支出项目</td><td colspan="4">金额(元)</td><td colspan="2">备注</td>
+            </tr>
+            <tr v-for="(item,index) in wordData.member" :key="index">
+                <td colspan="4" style="border-left: none;">
+                  <el-input
+                        type="textarea"
+                        autosize
+                        resize="none"
+                        placeholder="请输入支出类别"
+                        v-model="input">
+                    </el-input>
+                  </td><td colspan="5">
+                    <el-input
+                        type="textarea"
+                        autosize
+                        resize="none"
+                        placeholder="请输入支出项目"
+                        v-model="input">
+                    </el-input>
+                    </td><td colspan="4">
+                      <el-input
+                        type="number"
+                        autosize
+                        style="width: 100%;"
+                        resize="none"
+                        placeholder="请输入金额"
+                        v-model="input">
+                      </el-input>
+                    </td><td colspan="2">
+                      <el-input
+                        type="textarea"
+                        autosize
+                        resize="none"
+                        placeholder="备注"
+                        v-model="input">
+                    </el-input>
+                    </td>
+            </tr>
+
+
+            <tr class="textLeft">
+                <td><p>所在部</p> <p>门意见</p></td><td colspan="15">
+                  <el-input
+                      type="textarea"
+                      :rows="10"
+                      style="width: 100%;"
+                      resize="none"
+                      v-model="input">
+                    </el-input>
+                    <div style="text-align: right;font-size: 18px;width: 80%;margin-bottom: 20px;">负责人签章:</div>
+                    <div style="text-align: right;font-size: 18px;width: 90%;">年&nbsp;&nbsp;&nbsp; 月 &nbsp;&nbsp;&nbsp;日</div>
+                </td>
+            </tr>
+            <!-- <tr>
+                <td><p>主管部</p> <p>门审核</p><p>意见</p></td><td colspan="15">
+                  <el-input
+                      type="textarea"
+                      :rows="10"
+                      style="width: 100%;"
+                      resize="none"
+                      v-model="input">
+                    </el-input>
+                    <div style="text-align: right;font-size: 18px;width: 80%;margin-bottom: 20px;">负责人签章:</div>
+                    <div style="text-align: right;font-size: 18px;width: 90%;">年&nbsp;&nbsp;&nbsp; 月 &nbsp;&nbsp;&nbsp;日</div>
+                </td>
+            </tr> -->
+            <tr>
+                <td v-for="(item,index) in 16" :key="index+'c'" style="border: none;"></td>
+            </tr>
+        </table>
+          <div class="notes">
+            <span>备注:</span>
+            <span>如表格不够可顺延或另附页。</span>
+            <div style="width: 300px;margin: 20px auto;display: flex;justify-content: space-between;">
+                <el-button style="width: 120px;margin: 20px auto;"  type="primary">提交项目</el-button>
+                <el-button style="width: 120px;margin: 20px auto;" type="primary">下载表单</el-button>
+            </div>
+          </div>
+    </div>
+    </template>
+      
+    <script>
+    import {getNowDate} from '@/components/tool/Date.js'
+    
+      export default {
+        // props:['data'],
+        data() {
+          return {
+            // teacher:[],
+            // student:[],
+            allFund:'',
+            input:"",
+            DepartmentData:[],
+    
+            wordData:{
+              applicationDate:getNowDate(1),//申请日期
+              projectName:'',
+              radio: '',
+              checkList:[],
+              schoolRadio:'',
+              applyParsonRadio:'',
+              applyParsonName:'',
+              college:'',
+              tel:'',
+              beginTime:'',
+              endTime:'',
+              member:[
+                {sort:'',project:'',fund:''},
+                {sort:'',project:'',fund:''},
+                {sort:'',project:'',fund:''},
+                {sort:'',project:'',fund:''},
+                {sort:'',project:'',fund:''},
+
+                
+              ],
+              fund:[
+                {name:'',collage:'',work:''},
+                {name:'',collage:'',work:''},
+              ],
+              brief:'',
+              introduce:{
+                back:'',
+                innovate:'',
+                path:'',
+                scene:'',
+                worth:'',
+                team:'',
+                cost:'',
+                expectResults:'',
+                expectResultsTeacher:'',
+                expectConversion:'',
+                plan:''
+              },
+              // fund:{
+              //   facility:'',
+              //   materials:'',
+              //   process:'',
+              //   assist:'',
+              //   authenticate:'',
+              //   match:'',
+              //   activity:'',
+              //   affair:''
+              // }
+            }
+              
+    
+            //total:总经费     
+            //小型仪器设备费:device        deviceRemarks
+            //材料费:Material             MaterialRemarks
+            //测试化验加工费:processing    processingRemarks
+            //项目协作费:Collaboration     CollaborationRemarks
+            //项目成果鉴定费:APPRAISAL     APPRAISALRemarks
+            //参展参赛费:entery            enteryRemarks
+            //创客交流活动费:activities    activitiesRemarks
+            //知识产权事务费:Transaction   TransactionRemarks
+            }
+        },
+        methods: {
+          getText(value) {     //电话验证
+              let verify = /^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/; //获取正则表达式 存放到verify变量中
+              let result = verify.test(value.trim()); //判断输入框内容是否符合 正则表达式
+              if(!result) return this.$message.error('请输入正确联系号码格式')
+            },
+          addStudent(){   //添加学生
+            this.wordData.studentS.push({name:"",collage:"",work:""});
+          },
+          DelStudent(index){   //删除学生
+            this.wordData.studentS.splice(index,1)
+          },
+          getProjectDepartmentData(){  //获取项目立项申请基础信息页面所在部门数据
+            this.ajax.get(this.$store.state.api+'/SelectAllDepartment',{
+              uid:this.$store.state.userInfo.userid
+            }).then(res=>{
+              this.DepartmentData = res.data[0]
+            },err=>{
+              console.log(err);
+            })
+          },
+          submitWord(){
+            const cEmpty = /^\s*$/g;
+            for (let i in this.wordData){
+              // console.log(this.wordData[i],i);
+              switch(i){
+                case 'projectName':
+                    if (cEmpty.test(this.wordData[i])) {
+                      this.$message.error('请输入项目名称')
+                      // this.$refs.projectName.style.background='rgb(236, 141, 141)'
+                      // setTimeout(() => {
+                      //   this.$refs.projectName.style.background='#ffffff'
+                      // }, 2000);
+                      document.querySelector('#projectName').scrollIntoView({ behavior: "smooth" });
+                      return false
+                    }
+                  break;
+                case 'radio':
+                    if (cEmpty.test(this.wordData[i])) {
+                      this.$message.error('请选择项目分组')
+                      document.querySelector('#radio').scrollIntoView({ behavior: "smooth" });
+                      return false
+                    }
+                  break;
+                case 'checkList':
+                    if (this.wordData[i].length==0) {
+                      this.$message.error('优先支持项目')
+                      document.querySelector('#checkList').scrollIntoView({ behavior: "smooth" });
+                      return false
+                    }
+                break;
+                case 'schoolRadio':
+                    if (cEmpty.test(this.wordData[i])) {
+                      this.$message.error('请选择美丽校园改造项目')
+                      document.querySelector('#schoolRadio').scrollIntoView({ behavior: "smooth" });
+                      return false
+                    }
+                break;
+                case 'applyParsonRadio':
+                    if (cEmpty.test(this.wordData[i])) {
+                      this.$message.error('请选择项目申请人')
+                      document.querySelector('#applyParsonRadio').scrollIntoView({ behavior: "smooth" });
+                      return false
+                    }
+                break;
+                case 'applyParsonName':
+                    if (cEmpty.test(this.wordData[i])) {
+                      this.$message.error('请填写申请人姓名')
+                      document.querySelector('#applyParsonName').scrollIntoView({ behavior: "smooth" });
+                      return false
+                    }
+                break;
+                case 'college':
+                    if (cEmpty.test(this.wordData[i])) {
+                      this.$message.error('请选择所在学院')
+                      document.querySelector('#applyParsonName').scrollIntoView({ behavior: "smooth" });
+                      return false
+                    }
+                break;
+                case 'tel':
+                    if (cEmpty.test(this.wordData[i])) {
+                      this.$message.error('请填写联系方式')
+                      document.querySelector('#applyParsonName').scrollIntoView({ behavior: "smooth" });
+                      return false
+                    }
+                break;
+                case 'beginTime':
+                    if (cEmpty.test(this.wordData[i])) {
+                      this.$message.error('请选择项目起始时间')
+                      document.querySelector('#beginTime').scrollIntoView({ behavior: "smooth" });
+                      return false
+                    }
+                break;
+                case 'endTime':
+                    if (cEmpty.test(this.wordData[i])) {
+                      this.$message.error('请选择计划完成时间')
+                      document.querySelector('#beginTime').scrollIntoView({ behavior: "smooth" });
+                      return false
+                    }
+                break;
+                case 'studentS':
+                    // if(this.wordData[i].length<5){
+                    //   this.$message.error('学生团队应5人以上')
+                    //   document.querySelector('#studentS').scrollIntoView({ behavior: "smooth" });
+                    //   return false;
+                    // }else{
+                      let snum = 0;
+                      this.wordData[i].forEach(item=>{
+                        for(let j in item){
+                          if(cEmpty.test(item[j])){
+                            snum++;
+                          }
+                        }
+                      })
+                      if(snum>0){
+                        this.$message.error("请填完学生信息");
+                        document.querySelector('#studentS').scrollIntoView({ behavior: "smooth" });
+                        return false;
+                      }
+                    // }
+                break;
+                case 'teacherS':
+                      let num = 0;
+                      this.wordData[i].forEach(item=>{
+                        for(let j in item){
+                          if(cEmpty.test(item[j])){
+                            num++;
+                          }
+                        }
+                      })
+                      if(num>0){
+                        this.$message.error("请填完老师信息");
+                        document.querySelector('#teacherS').scrollIntoView({ behavior: "smooth" });
+                        return false;
+                      }
+                break;
+                case 'brief':
+                    if (cEmpty.test(this.wordData[i])) {
+                      this.$message.error('请填写项目简介')
+                      // this.$refs.brief.style.background='rgb(236, 141, 141)'
+                      // setTimeout(() => {
+                      //   this.$refs.brief.style.background='#ffffff'
+                      // }, 2000);
+                      document.querySelector('#brief').scrollIntoView({ behavior: "smooth" });
+                      return false
+                    }
+                break;
+                case 'fund':
+                    let mon=this.wordData.fund.facility*1 + this.wordData.fund.materials*1+this.wordData.fund.process*1+ this.input*1+this.wordData.fund.authenticate*1+ this.wordData.fund.match*1+this.wordData.fund.activity*1+this.wordData.fund.affair*1
+                    if(mon==0){
+                      document.querySelector('#fund').scrollIntoView({ behavior: "smooth" });
+                      return this.$message.error('请输入经费')
+                    }
+                break;
+              }
+            }
+          //   let param={
+          //     projectName
+          //   }
+          //   this.ajax
+          //     .post(this.$store.state.api+'/SelectAllType',param)
+          //     .then(err,res)
+          },
+          
+        },
+        computed:{   //经费总合
+          reversedMessage: function () {
+            return (this.wordData.fund.facility*1 + this.wordData.fund.materials*1+this.wordData.fund.process*1+ this.input*1+this.wordData.fund.authenticate*1+ this.wordData.fund.match*1+this.wordData.fund.activity*1+this.wordData.fund.affair*1)/10000
+          }
+        },
+        mounted(){
+          this.getProjectDepartmentData()
+        }
+      };
+    </script>
+      
+    <style lang="less" scope>
+            .textLeft{
+              .el-textarea__inner{
+                // padding: 0;
+                border: none ;
+                border-radius: 0px;
+                text-align: left !important;
+                font-size: 16px;
+              }
+            }
+          .table{
+            border: none;
+            border-top: solid 1px black;
+            // border-right:  solid 1px black;
+            // border-left:  solid 1px black;
+
+
+            tr td{
+              border: none;
+              border-bottom: solid 1px black;
+              // border-left: solid 1px black;
+              border-right: solid 1px black;
+              height: 50px;
+              text-align: center;
+              line-height: 30px;
+              width: 80px;
+              &:nth-child(1){
+                border-left:  solid 1px black;
+              }
+              p{
+                font-weight: 600;
+              }
+              .el-select .el-input .el-select__caret{
+                display: none;
+              }
+              .el-textarea__inner{
+                // padding: 0;
+                border: none ;
+                border-radius: 0px;
+                text-align: center;
+                font-size: 16px;
+              }
+              .el-input__inner{
+                border: none ;
+                border-radius: 0px;
+                text-align: center;
+                font-size: 16px;
+              }
+            }
+          }
+          .twoCol{
+            column-span: 2;
+          }
+          .operate{
+                right:-85px;
+                width:85px;
+                height: 50px;
+                display:flex;
+                justify-content:space-between;
+                align-items:center;
+                position:absolute;
+                .el-button{
+                  max-width:10px;
+                  display:flex;
+                  justify-content:center;
+                  align-items:center;
+                  margin-left:10px;
+                }
+              }
+    
+              //在style里面添加此段代码即可
+     
+              input::-webkit-outer-spin-button,
+                  input::-webkit-inner-spin-button {
+                  -webkit-appearance: none;
+              }
+              input[type="number"]{
+                  -moz-appearance: textfield;
+              }
+    
+    #MakerSpaceWord{
+        width: 100%;
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+        background-color: #ffff;
+        margin: 0;
+        padding:100px;
+        box-sizing:border-box;
+    
+    }
+        #title{
+            width: 100%;
+            display: flex;
+            flex-direction: column;
+            align-items: center;
+            position: relative;
+            // margin-top: 40px;
+            .school{
+                font-size: 2.5em;
+                font-weight: 500;
+                letter-spacing: 20px;
+            }
+            .wordTitle{
+                font-size: 2em;
+                letter-spacing: .15em;
+                margin-bottom:40px ;
+            }
+            .date{
+    
+                font-size: 1em;
+                position: absolute;
+                bottom: 0;
+                right: 100px;
+                font-weight: bold;
+            }
+        }
+      .notes{
+        width: 100%;
+        display: flex;
+        flex-direction:column;
+      }
+    
+    </style>