Browse Source

Merge remote-tracking branch 'origin/master'

liuyang 5 năm trước cách đây
mục cha
commit
625fb9fbb2

+ 8 - 0
backend/src/dashoo.cn/modi_webapi/app/api/course/course.go

@@ -43,6 +43,14 @@ func (c *Controller) GetAllCourse(r *ghttp.Request) {
 		}
 	}
 
+	if Status := r.GetInt("Status"); Status != 0 {
+		if where == "" {
+			where = fmt.Sprintf(" Status = %v", Status)
+		} else {
+			where += fmt.Sprintf(" AND Status = %v", Status)
+		}
+	}
+
 	var result []course.Entity
 	if err := course.GetAllCourse(page, where, &result); err != nil {
 		if err.Error() == "sql: no rows in result set" {

+ 4 - 0
backend/src/dashoo.cn/modi_webapi/app/api/duty/duty.go

@@ -31,6 +31,7 @@ func (c *DutyController) GetPageList(r *ghttp.Request) {
 		Title: "",
 		Year:  0,
 		Term:  0,
+		Status: 0,
 		Common: common.SelectPageReq{
 			Tenant: tenant,
 			Page:   &pageInfo,
@@ -46,6 +47,9 @@ func (c *DutyController) GetPageList(r *ghttp.Request) {
 	if Term := r.GetInt("Term"); Term != 0 {
 		selectPageReq.Term = Term
 	}
+	if Status := r.GetInt("Status"); Status != 0 {
+		selectPageReq.Status = Status
+	}
 
 	if dutyList, total, err := service.GetPageList(&selectPageReq); err != nil {
 		response.Json(r, 1, err.Error())

+ 1 - 0
backend/src/dashoo.cn/modi_webapi/app/model/duty/duty.go

@@ -12,6 +12,7 @@ import (
 // 搜索请求
 type SelectPageReq struct {
 	Title  string `protobuf:"bytes,2,opt,name=Title,proto3" json:"Title,omitempty"`
+	Status int `protobuf:"bytes,2,opt,name=Status,proto3" json:"Status,omitempty"`
 	Year   int    `protobuf:"bytes,2,opt,name=Year,proto3" json:"Year,omitempty"`
 	Term   int    `protobuf:"bytes,2,opt,name=Term,proto3" json:"Term,omitempty"`
 	Common common.SelectPageReq

+ 3 - 0
backend/src/dashoo.cn/modi_webapi/app/service/duty/duty.go

@@ -34,6 +34,9 @@ func (s DutyService) GetPageList(param *duty.SelectPageReq) (list []*duty.Entity
 		if param.Term != 0 {
 			model = model.Where("Term", param.Term)
 		}
+		if param.Status != 0 {
+			model = model.Where("Status", param.Status)
+		}
 	}
 	// 查询总数
 	total, err = model.Where("isDel", 0).Count()

+ 3 - 3
frontend_web/src/router/index.js

@@ -320,9 +320,9 @@ router.beforeEach(async (to, from, next) => {
 })
 
 const originalPush = VueRouter.prototype.push
-VueRouter.prototype.push = function push(location, onResolve, onReject) {
-	if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
-	return originalPush.call(this, location).catch(err => err)
+VueRouter.prototype.push = function push (location, onResolve, onReject) {
+  if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
+  return originalPush.call(this, location).catch(err => err)
 }
 
 router.afterEach(to => {

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

@@ -209,12 +209,12 @@ export default {
     // 周次
     getDayOfWeekList () {
       itemDetailApi.getItemDetailByItemCode({ ItemCode: 'DayOfWeek' })
-              .then(res => {
-                this.DayOfWeekList = res
-              })
-              .catch(err => {
-                console.error(err)
-              })
+        .then(res => {
+          this.DayOfWeekList = res
+        })
+        .catch(err => {
+          console.error(err)
+        })
     },
     // 授课老师
     teacherFormatter (row, column) {
@@ -302,7 +302,7 @@ export default {
           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(",")
+              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 === '') {

+ 18 - 31
frontend_web/src/views/demo/page1/components/informationInfoDialog.vue

@@ -1,42 +1,31 @@
 <template>
-  <el-dialog title="信息发布"
+  <el-dialog :title="information.title"
              :visible.sync="dialogvisible"
              @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="信息标题"
-                        label-width="120px">
-            <el-input v-model="information.title"
-                      :disabled="true"
-                      style="width:100%;font-size:20px"></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="24">
-          <el-form-item label="信息内容"
-                        label-width="120px">
-            <el-input v-model="information.content"
-                      type="textarea"
-                      :rows=5
-                      :disabled="true"
-                      style="width:100%;font-size:20px"></el-input>
-          </el-form-item>
-        </el-col>
-
-      </el-row>
-    </el-form>
+    <div class="content">
+      {{information.content}}
+    </div>
     <span slot="footer">
 
     </span>
   </el-dialog>
 </template>
-
+<style>
+.content {
+  margin: 0 auto;
+  width: 95%;
+  color: #808080;
+  background-color: #fff;
+  padding: 15px 50px;
+  border: 1px solid #e9e9e9;
+  -webkit-box-shadow: 0 1px 50px rgba(0, 0, 0, 0.1);
+  box-shadow: 0 1px 50px rgba(0, 0, 0, 0.1);
+  text-align: left;
+  line-height: 30px;
+}
+</style>
 <script>
 
 import InformationApi from '@/api/information'
@@ -69,12 +58,10 @@ export default {
   methods: {
     dialogOpen () {
       this.information = {}
-      this.$refs.informationForm.resetFields()
       this.getData()
     },
     dialogClose () {
       this.information = {}
-      this.$refs.informationForm.resetFields()
       // this.$emit('handleClose')
       this.dialogVisible = false
     },

+ 2 - 0
frontend_web/src/views/demo/page1/index.vue

@@ -313,6 +313,7 @@ export default {
       searchduty: {
         Term: '',
         Year: '',
+        Status: 1,
         Title: '',
         page: {
           total: 0,
@@ -323,6 +324,7 @@ export default {
       searchcourse: {
         Term: '',
         Year: '',
+        Status: 1,
         ClassId: '',
         page: {
           total: 0,

+ 10 - 12
frontend_web/src/views/micro/student/index.vue

@@ -11,7 +11,7 @@
           <el-input v-model="searchForm.name"
                     placeholder="学生名称"
                     style="width: 140px;"
-                    clearable/>
+                    clearable />
         </el-form-item>
         <el-form-item>
           <el-button type="primary"
@@ -41,13 +41,12 @@
     </template>
     <ag-grid-vue class="table ag-theme-balham ag-title-center"
                  style="width: 100%; height: 100%;"
-      id="myGrid"
-      :gridOptions="gridOptions"
-      @gridReady="onGridReady"
-      :rowData="rowData"
-      :columnDefs="columnDefs"
-      rowSelection="multiple"
-      >
+                 id="myGrid"
+                 :gridOptions="gridOptions"
+                 @gridReady="onGridReady"
+                 :rowData="rowData"
+                 :columnDefs="columnDefs"
+                 rowSelection="multiple">
     </ag-grid-vue>
     <template slot="footer">
       <el-pagination style="margin: -10px;"
@@ -129,7 +128,7 @@ export default {
         cellRenderer: (params) => {
           return params ? params.node.rowIndex + 1 + '' : ''
         }
-      }, 
+      },
       // }, {
       //   headerName: '头像',
       //   field: 'HeaderIcon',
@@ -312,7 +311,6 @@ export default {
 </script>
 
 <style lang="scss">
-
 .el-pagination {
   margin: 1rem 0 2rem;
   text-align: right;
@@ -327,8 +325,8 @@ export default {
   margin-left: 1px;
   padding: 5px 10px 0 0;
 }
-.ag-header-cell-text{
-  text-align: center ;
+.ag-header-cell-text {
+  text-align: center;
   width: 100%;
 }
 </style>

+ 19 - 25
frontend_web/src/views/workflow/edit/components/Generator/add-node-btn.vue

@@ -1,28 +1,22 @@
 <template>
-  <div class="add-node-btn" >
-    <button
-      class="btn"
-      type="button"
-      @click="click"
-    >
-      <span class="iconfont"><svg
-        viewBox="64 64 896 896"
-        focusable="false"
-        class=""
-        data-icon="close"
-        width="1em"
-        height="1em"
-        fill="currentColor"
-      ><path
-        d="M810.666667 554.666667h-256v256h-85.333334v-256H213.333333v-85.333334h256V213.333333h85.333334v256h256v85.333334z"
-      /></svg></span>
+  <div class="add-node-btn">
+    <button class="btn"
+            type="button"
+            @click="click">
+      <span class="iconfont"><svg viewBox="64 64 896 896"
+             focusable="false"
+             class=""
+             data-icon="close"
+             width="1em"
+             height="1em"
+             fill="currentColor">
+          <path d="M810.666667 554.666667h-256v256h-85.333334v-256H213.333333v-85.333334h256V213.333333h85.333334v256h256v85.333334z" />
+        </svg></span>
     </button>
-    <AddNodeDialog
-      :dialog.sync="dialog"
-      :node="node"
-      :imgType="imgType"
-      @addnode="addnode"
-    />
+    <AddNodeDialog :dialog.sync="dialog"
+                   :node="node"
+                   :imgType="imgType"
+                   @addnode="addnode" />
   </div>
 </template>
 <script>
@@ -40,8 +34,8 @@ export default {
   },
   data: () => ({
     dialog: false,
-    showButton:true,
-    imgType:"",
+    showButton: true,
+    imgType: ''
   }),
   methods: {
     click () {

+ 16 - 26
frontend_web/src/views/workflow/edit/components/Generator/col-box.vue

@@ -1,30 +1,20 @@
 <template>
   <div class="col-box">
-    <div
-      v-if="pos == 0"
-      class="top-left-cover-line"
-    />
-    <div
-      v-if="pos == 0"
-      class="bottom-left-cover-line"
-    />
-    <div
-      v-if="pos == (total-1)"
-      class="top-right-cover-line"
-    />
-    <div
-      v-if="pos == (total-1)"
-      class="bottom-right-cover-line"
-    />
-    <Node
-      v-for="(item, index) in items"
-      :key="index"
-      :node="item"
-      @addnode="addnode"
-      @delNode="delNode(item)"
-      @delConditionNode="delConditionNode"
-      @addConditionFactor="addConditionFactor"
-    />
+    <div v-if="pos == 0"
+         class="top-left-cover-line" />
+    <div v-if="pos == 0"
+         class="bottom-left-cover-line" />
+    <div v-if="pos == (total-1)"
+         class="top-right-cover-line" />
+    <div v-if="pos == (total-1)"
+         class="bottom-right-cover-line" />
+    <Node v-for="(item, index) in items"
+          :key="index"
+          :node="item"
+          @addnode="addnode"
+          @delNode="delNode(item)"
+          @delConditionNode="delConditionNode"
+          @addConditionFactor="addConditionFactor" />
   </div>
 </template>
 <script>
@@ -32,7 +22,7 @@ import { iteratorData, addNewNode, delNode } from './process'
 export default {
   name: 'ColBox',
   components: {
-	Node: () => import('./node')
+    Node: () => import('./node')
   },
   props: {
     node: {