Browse Source

Merge remote-tracking branch 'origin/master' into master

zangkai 5 years ago
parent
commit
b0453b002e

+ 104 - 25
frontend_web/src/views/demo/page1/components/courseInfoDialog.vue

@@ -4,32 +4,34 @@
              @opened="dialogOpen"
              @closed="dialogClose"
              width="75%">
-    <!-- <el-form size="mini"
-             :model="information"
-             :rules="rulesinformationForm"
-             label-width="100px"
-             ref="informationForm">
-      <el-row :gutter="24">
-        <el-col :span="24">
-          <el-form-item label="信息标题222"
+    <el-form label-width="100px">
+      <el-row :gutter="20">
+        <el-col :span="6">
+          <el-form-item label="标题"
                         label-width="120px">
-            <el-input v-model="information.title"
-                      :disabled="true"
-                      style="width:100%;font-size:20px"></el-input>
+            {{courselist.Title}}
           </el-form-item>
         </el-col>
-        <el-col :span="24">
-          <el-form-item label="2333"
+        <el-col :span="6">
+          <el-form-item label="学年"
                         label-width="120px">
-            <el-input v-model="information.content"
-                      type="textarea"
-                      :rows=3
-                      :disabled="true"
-                      style="width:100%;font-size:20px"></el-input>
+            {{courselist.Year}}年
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="学期"
+                        label-width="120px">
+            {{this.termName}}
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="班级"
+                        label-width="120px">
+            {{this.className}}
           </el-form-item>
         </el-col>
       </el-row>
-    </el-form> -->
+    </el-form>
     <el-table ref="multipleTable"
               :data="activities"
               border
@@ -56,14 +58,17 @@
                        :formatter="localFormatter"></el-table-column>
       <el-table-column prop="Num"
                        align="center"
-                       min-width="120px"
+                       min-width="80px"
                        label="人数"
                        show-overflow-tooltip></el-table-column>
       <el-table-column prop="CreatedTime"
                        align="center"
-                       min-width="120px"
-                       label="创建时间"
-                       show-overflow-tooltip></el-table-column>
+                       min-width="80px"
+                       label="创建时间"></el-table-column>
+      <el-table-column prop="Section"
+                       align="center"
+                       min-width="180px"
+                       label="节次"></el-table-column>
     </el-table>
     <template slot="footer">
       <el-pagination style="margin: -10px;"
@@ -80,7 +85,7 @@
 </template>
 
 <script>
-
+import ClassApi from '@/api/class'
 import detailApi from '@/api/course/detail'
 import itemDetailApi from '@/api/sysadmin/itemdetail'
 import { searchmanagingroomdata } from '@/api/instrumentroom'
@@ -102,8 +107,11 @@ export default {
         prop: '',
         order: ''
       },
+      TimeList: [], // 节次
       RoomList: [],
+      className: [], //班级名称
       TeacherList: [],
+      termName: '',
       activities: [],
       dialogvisible: false,
       information: {},
@@ -122,6 +130,7 @@ export default {
     }
   },
   created () {
+    this.getTimeList()
   },
   methods: {
     dialogOpen () {
@@ -131,7 +140,6 @@ export default {
     },
     dialogClose () {
       this.activities = []
-      console.log('---222----')
       // this.$refs.informationForm.resetFields()
       // this.$emit('handleClose')
       this.dialogVisible = false
@@ -168,6 +176,17 @@ export default {
         _this.RoomList = []
       }
     },
+    // 获取班级列表
+    getClassList () {
+      let params = {
+        _currentPage: 1,
+        _size: 9999
+      }
+      ClassApi.getAllClass(params)
+        .then(res => {
+          this.getClassName(res.records)
+        })
+    },
     // 获取教师列表
     getTeacherList (query) {
       let _this = this
@@ -201,9 +220,54 @@ export default {
         }
       }
     },
+    // 获取课程节次列表
+    getTimeList (query) {
+      let _this = this
+      if (query !== '') {
+        itemDetailApi.getItemDetailByItemCode({ ItemCode: 'Time' })
+          .then(res => {
+            _this.TimeList = res
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      } else {
+        _this.TimeList = []
+      }
+    },
+    // 获取学期名称
+    getTermName (termList) {
+      let _this = this
+      termList.forEach(function (value, key) {
+        if (_this.courselist.Term == value.ItemValue) {
+          _this.termName = value.ItemName
+        }
+      })
+    },
+    // 获取学期
+    getTerm () {
+      itemDetailApi.getItemDetailByItemCode({ ItemCode: 'Term' })
+        .then(res => {
+          this.getTermName(res)
+        })
+        .catch(err => {
+          console.error(err)
+        })
+    },
+    // 获取学期名称
+    getClassName (termList) {
+      let _this = this
+      termList.forEach(function (value, key) {
+        if (_this.courselist.ClassId == value.Id) {
+          _this.className = value.Name
+        }
+      })
+    },
     getData () {
       this.getTeacherList()
       this.getRoomList()
+      this.getTerm()
+      this.getClassList()
       let _this = this
       let query = {
         // 分页信息
@@ -214,6 +278,21 @@ export default {
       detailApi.getList(query)
         .then(res => {
           _this.activities = res.records ? res.records : []
+          for (var i = 0; i < _this.activities.length; i++) {
+            _this.activities[i].Section = ''
+            if (_this.activities[i].Time != '') {
+              var section = _this.activities[i].Time.split(",")
+              for (var a = 0; a < _this.TimeList.length; a++) {
+                if (section.indexOf(_this.TimeList[a].ItemValue) > -1) {
+                  if (_this.activities[i].Section === '') {
+                    _this.activities[i].Section = _this.TimeList[a].ItemName
+                  } else {
+                    _this.activities[i].Section = _this.activities[i].Section + ',' + _this.TimeList[a].ItemName
+                  }
+                }
+              }
+            }
+          }
           _this.page.current = res.current
           _this.page.size = res.size
           _this.page.total = res.total

+ 43 - 1
frontend_web/src/views/demo/page1/components/dutyInfoDialog.vue

@@ -4,6 +4,28 @@
              @opened="dialogOpen"
              @closed="dialogClose"
              width="75%">
+    <el-form label-width="100px">
+      <el-row :gutter="20">
+        <el-col :span="8">
+          <el-form-item label="标题"
+                        label-width="120px">
+            {{dutydetail.Title}}
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="学年"
+                        label-width="120px">
+            {{dutydetail.Year}}年
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="学期"
+                        label-width="120px">
+            {{this.termName}}
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
     <el-table ref="multipleTable"
               :data="activities"
               border
@@ -87,6 +109,7 @@ export default {
         prop: '',
         order: ''
       },
+      termName: '',
       LocalList: [],
       PeopleList: [],
       TimeList: [],
@@ -150,6 +173,25 @@ export default {
         }
       }
     },
+    // 获取学期名称
+    getTermName (termList) {
+      let _this = this
+      termList.forEach(function (value, key) {
+        if (_this.dutydetail.Term == value.ItemValue) {
+          _this.termName = value.ItemName
+        }
+      })
+    },
+    // 获取学期
+    getTerm () {
+      itemDetailApi.getItemDetailByItemCode({ ItemCode: 'Term' })
+        .then(res => {
+          this.getTermName(res)
+        })
+        .catch(err => {
+          console.error(err)
+        })
+    },
     // // 获取字典表值班人员
     // getPeople () {
     //   let _this = this
@@ -198,12 +240,12 @@ export default {
     getData () {
       let _this = this
       _this.getLocal()
+      _this.getTerm()
       _this.getDutyTime()
       _this.getPeople()
       DutyApi.getDetailByDutyId({
         DutyId: _this.dutydetail.Id
       }).then(res => {
-        console.log('----res--duty-', res)
         _this.activities = res
       })
     }

+ 44 - 42
frontend_web/src/views/demo/page1/index.vue

@@ -1,6 +1,5 @@
 <template>
   <d2-container>
-
     <!-- <img class="page_logo"
            src="./image/logo.png"
            width="100%"
@@ -31,25 +30,21 @@
                   border
                   fit
                   @row-click="openDetails"
-                  tooltip-effect="dark"
-                  style="width: 100%;margin: 5px;"
+                  style="width: 100%;margin:5px;white-space:pre;"
                   height="280px">
           <el-table-column prop="title"
                            fit
                            min-width="80px"
                            label="信息标题"
-                           align="center"
-                           show-overflow-tooltip></el-table-column>
+                           align="center"></el-table-column>
           <el-table-column prop="content"
                            label="信息内容"
                            align="center"
-                           min-width="160px"
-                           show-overflow-tooltip></el-table-column>
+                           min-width="160px"></el-table-column>
           <el-table-column prop="createdtime"
                            align="center"
-                           min-width="120px"
-                           label="发布时间"
-                           show-overflow-tooltip></el-table-column>
+                           min-width="50px"
+                           label="发布时间"></el-table-column>
         </el-table>
         <el-pagination style="margin: 10px;float:right;"
                        @size-change="handleSizeChange"
@@ -77,7 +72,8 @@
                    style="margin-top: 7px;text-align:right;">
             <el-form-item label="学年">
               <el-select v-model="searchcourse.Year"
-                         style="width: 140px;">
+                         style="width: 140px;"
+                         filterable>
                 <el-option v-for="item in years"
                            :key="item.value"
                            :label="item.label"
@@ -89,7 +85,8 @@
                           class="sbutton_margin">
               <el-select ref="reftube"
                          v-model="searchcourse.ClassId"
-                         placeholder="请选择年级学年"
+                         filterable
+                         placeholder="请选择"
                          style="width:100%">
                 <el-option v-for="item in classList"
                            :key="item.Id"
@@ -172,9 +169,12 @@
                    :inline="true"
                    class="sbutton_padding"
                    style="margin-top: 7px;text-align:right;">
-            <el-form-item label="学年">
+            <el-form-item label="学年"
+                          class="sbutton_margin">
+
               <el-select v-model="searchduty.Year"
-                         style="width: 140px;">
+                         placeholder="请选择年级学年"
+                         filterable>
                 <el-option v-for="item in years"
                            :key="item.value"
                            :label="item.label"
@@ -182,19 +182,24 @@
                 </el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="班级"
+            <el-form-item label="学期"
                           class="sbutton_margin">
-              <el-select ref="reftube"
-                         v-model="searchduty.ClassId"
-                         placeholder="请选择年级学年"
-                         style="width:100%">
-                <el-option v-for="item in classList"
-                           :key="item.Id"
-                           :label="item.Name"
-                           :value="parseInt(item.Id)">
+              <el-select v-model="searchduty.Term"
+                         style="width: 140px;"
+                         filterable>
+                <el-option v-for="item in termList"
+                           :key="item.ItemValue"
+                           :label="item.ItemName"
+                           :value="parseInt(item.ItemValue)">
                 </el-option>
               </el-select>
             </el-form-item>
+            <el-form-item label="标题"
+                          class="sbutton_margin">
+              <el-input style="width: 140px;"
+                        v-model="searchduty.Title"
+                        placeholder="请输入标题"></el-input>
+            </el-form-item>
             <el-button size="mini"
                        type="primary"
                        @click="initDatas_duty()"
@@ -250,17 +255,14 @@
 
     <!-- 信息发布 -->
     <informationInfoDialog ref="informationDialog"
-                           @handleClose="handleClose"
                            :informationId="informationId"
                            width="75"></informationInfoDialog>
     <!-- 课程管理 -->
     <courseInfoDialog ref="courseDialog"
-                      @handleClose="handleClose"
                       :courselist="courselist"
                       width="75"></courseInfoDialog>
     <!-- 值班表 -->
     <dutyInfoDialog ref="dutyDialog"
-                    @handleClose="handleClose"
                     :dutydetail="dutydetail"
                     width="75"></dutyInfoDialog>
   </d2-container>
@@ -349,12 +351,12 @@ export default {
     }
   },
   mounted () {
+    this.getTerm()
     this.initDatas()
     this.initDatasCourse()
     this.initSelectYear()
     this.initDatas_duty()
     // this.initDatas_class()
-    this.getTerm()
     this.getClassList()
   },
   methods: {
@@ -362,10 +364,11 @@ export default {
       this.informationId = row.id
       this.$refs.informationDialog.dialogvisible = true
     },
+    //课程
     openCourseDetails (row) {
-      this.courselist = []
       this.courselist.CourseId = row.Id
       this.courselist.Year = row.Year
+      this.courselist.Title = row.Title
       this.courselist.Term = row.Term
       this.courselist.ClassId = row.ClassId
       this.$refs.courseDialog.dialogvisible = true
@@ -373,17 +376,16 @@ export default {
     openDutyDetails (row) {
       this.dutydetail = []
       this.dutydetail.Id = row.Id
-      // this.courselist.Year = row.Year
-      // this.courselist.Term = row.Term
-      // this.courselist.ClassId = row.ClassId
+      this.dutydetail.Title = row.Title
+      this.dutydetail.Year = row.Year
+      this.dutydetail.Term = row.Term
       this.$refs.dutyDialog.dialogvisible = true
     },
-    // 获取字典表
-    getTerm () {
+    // 获取学期
+    getTerm1 () {
       itemDetailApi.getItemDetailByItemCode({ ItemCode: 'Term' })
         .then(res => {
           this.term = res
-          // this.initDatas()
         })
         .catch(err => {
           console.error(err)
@@ -524,13 +526,12 @@ export default {
     //   this.$refs.informationDialog.dialogvisible = true
     // },
     // 新增修改弹窗关闭 返回页面
-    handleClose () {
-      this.informationId = -1
-      this.$refs.informationDialog.dialogvisible = false
-      this.initPageInfo()
-      this.initDatas()
-      console.log('handleClose informationId' + this.informationId)
-    },
+    // handleClose () {
+    //   this.informationId = -1
+    //   this.$refs.informationDialog.dialogvisible = false
+    //   this.initPageInfo()
+    //   this.initDatas()
+    // },
     publish (information) {
       information.status = 1
       InformationApi.save(information)
@@ -583,7 +584,8 @@ export default {
     },
     clearSearchduty () {
       this.searchduty.Year = ''
-      this.searchduty.ClassId = ''
+      this.searchduty.Term = ''
+      this.searchduty.Title = ''
       this.initDatas_duty()
     },
 

+ 0 - 41
frontend_web/src/views/instrument/confirmandscrap/_opera/add.vue

@@ -87,43 +87,6 @@
                         style="width:100%"></el-input>
             </el-form-item>
           </el-col>
-
-          <el-col :span="8">
-            <el-form-item label="附件上传"
-                          label-width="90px">
-              <el-button size="mini"
-                         type="primary"
-                         style="width: 100px"
-                         @click="maintainlogattr()">上传附件</el-button>
-            </el-form-item>
-          </el-col>
-
-        </el-row>
-        <el-row>
-          <el-col :span="8">
-            <el-form-item class="maintainlog"
-                          label=""
-                          label-width="120px">
-              <div style="overflow: auto;">
-                <template>
-                  <el-row>
-                    <el-col :span="24"
-                            v-for="(v,K) in maintainlogattrlist"
-                            :key="v">
-                      <a>{{ v.FileName }}</a>
-                      <span>
-                        <el-button size="mini"
-                                   type="text"
-                                   icon="el-icon-delete"
-                                   title="删除"
-                                   @click="deletedata(K)"></el-button>
-                      </span>
-                    </el-col>
-                  </el-row>
-                </template>
-              </div>
-            </el-form-item>
-          </el-col>
         </el-row>
       </el-form>
       <span slot="footer">
@@ -234,10 +197,6 @@ export default {
         .then(res => {
           // response
           if (res.info.code === 0) {
-            if (this.maintainlogattrlist !== '') {
-              _this.savedataOne(res.info.item)
-            }
-
             _this.$message({
               type: 'success',
               message: res.info.message

+ 0 - 39
frontend_web/src/views/instrument/confirmandscrap/_opera/edit.vue

@@ -88,43 +88,6 @@
                         style="width:100%"></el-input>
             </el-form-item>
           </el-col>
-
-          <el-col :span="24">
-            <el-form-item label="附件上传"
-                          label-width="90px">
-              <el-button size="mini"
-                         type="primary"
-                         @click="maintainlogattr()">上传附件</el-button>
-            </el-form-item>
-          </el-col>
-
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item class="maintainlog"
-                          label=""
-                          label-width="80px">
-              <div style="overflow: auto;">
-                <template>
-                  <!-- <el-row> -->
-                  <el-col :span="24"
-                          v-for="(v,K) in maintainlogattrlist"
-                          :key="v.Id">
-                    <a @click="clickachment(v.Host, v.FileId)">{{ v.FileName }}</a>
-                    <span>
-                      <el-button size="mini"
-                                 type="text"
-                                 icon="el-icon-delete"
-                                 title="删除"
-                                 @click="deletedata(K)"></el-button>
-                    </span>
-                  </el-col>
-                  <!-- </el-row> -->
-                </template>
-              </div>
-            </el-form-item>
-          </el-col>
-
         </el-row>
       </el-form>
       <span slot="footer">
@@ -238,9 +201,7 @@ export default {
         .then(res => {
           // response
           if (res.info.code === 0) {
-            _this.deleteinstrument()
             if (this.maintainlogattrlist.length !== 0) {
-              _this.savedataOne(_this.testlistform.Id)
             } else {
               _this.$message({
                 type: 'success',

+ 2 - 2
frontend_web/src/views/instrument/confirmandscrap/index.vue

@@ -33,7 +33,7 @@
                     placeholder="输入操作人"></el-input>
         </el-form-item> -->
         <el-col :span="6"></el-col>
-        <el-form-item label="操作日期"
+        <!-- <el-form-item label="操作日期"
                       class="sbutton_margin">
           <el-date-picker style="width:220px"
                           v-model="OperaOn"
@@ -41,7 +41,7 @@
                           range-separator="至"
                           start-placeholder="开始日期"
                           end-placeholder="结束日期"></el-date-picker>
-        </el-form-item>
+        </el-form-item> -->
         <el-button size="mini"
                    type="primary"
                    style="margin-left:10px;"

+ 6 - 12
frontend_web/src/views/instrument/maintainlog/_opera/add.vue

@@ -86,7 +86,7 @@
             </el-form-item>
           </el-col>
 
-          <el-col :span="24">
+          <!-- <el-col :span="24">
             <el-form-item label="附件上传"
                           label-width="80px">
               <el-button size="mini"
@@ -94,15 +94,11 @@
                          style="width: 100px"
                          @click="maintainlogattr()">上传附件</el-button>
             </el-form-item>
-          </el-col>
+          </el-col> -->
 
         </el-row>
         <el-row>
           <el-col :span="12">
-            <!-- <el-form-item class="maintainlog"
-                          label=""
-                          label-width="80px">
-              <div style="overflow: auto;"> -->
             <template>
               <el-row>
                 <el-col :span="24"
@@ -232,9 +228,9 @@ export default {
         .then(res => {
           // response
           if (res.info.code === 0) {
-            if (this.maintainlogattrlist !== '') {
-              _this.savedataOne(res.info.item)
-            }
+            // if (this.maintainlogattrlist !== '') {
+            //   _this.savedataOne(res.info.item)
+            // }
 
             _this.$message({
               type: 'success',
@@ -280,12 +276,10 @@ export default {
       let _this = this
       this.$refs[formName].validate((valid) => {
         if (valid) {
-          // request
           InstrumenCode(_this.testlistform.InstrumenId)
-            // this.$axios
-            //   .get("instrument/getInstrumenCode?Id=" + _this.testlistform.InstrumenId, {})
             .then(function (response) {
               _this.testlistform.InstrumenCode = response.info.items.Code
+              console.log('---response.info.items.Code----', response.info.items.Code)
               _this.savedata()
             })
             .catch(err => {

+ 0 - 36
frontend_web/src/views/instrument/maintainlog/_opera/edit.vue

@@ -86,42 +86,8 @@
                         style="width:100%"></el-input>
             </el-form-item>
           </el-col>
-
-          <el-col :span="24">
-            <el-form-item label="附件上传"
-                          label-width="80px">
-              <el-button size="mini"
-                         type="primary"
-                         @click="maintainlogattr()">上传附件</el-button>
-            </el-form-item>
-          </el-col>
-
         </el-row>
         <el-row>
-          <el-col :span="24">
-            <el-form-item class="maintainlog"
-                          label=""
-                          label-width="80px">
-              <div style="overflow: auto;">
-                <template>
-                  <el-row>
-                    <el-col :span="24"
-                            v-for="(v,K) in maintainlogattrlist"
-                            :key="v.Id">
-                      <a @click="clickachment(v.Host, v.FileId)">{{ v.FileName }}</a>
-                      <span>
-                        <el-button size="mini"
-                                   type="text"
-                                   icon="el-icon-delete"
-                                   title="删除"
-                                   @click="deletedata(K)"></el-button>
-                      </span>
-                    </el-col>
-                  </el-row>
-                </template>
-              </div>
-            </el-form-item>
-          </el-col>
 
         </el-row>
       </el-form>
@@ -230,9 +196,7 @@ export default {
         .then(res => {
           // response
           if (res.info.code === 0) {
-            _this.deleteinstrument()
             if (this.maintainlogattrlist.length !== 0) {
-              _this.savedataOne(_this.testlistform.Id)
             } else {
               _this.$message({
                 type: 'success',