소스 검색

人员 实验室的一些问题

all 5 년 전
부모
커밋
bf4678b4e5

+ 0 - 1
backend/src/dashoo.cn/modi_webapi/app/api/instrument/instrument.go

@@ -32,7 +32,6 @@ func (c *Controller) GetAllInstrument(r *ghttp.Request) {
 			where += fmt.Sprintf(" AND Name LIKE '%%%v%%'", name)
 		}
 	}
-
 	var result []instrument.Entity
 	if err := instrument.GetAllInstrument(page, where, &result); err != nil {
 		if err.Error() == "sql: no rows in result set" {

+ 2 - 1
backend/src/dashoo.cn/modi_webapi/app/service/personnel/personnel_entity.go

@@ -20,7 +20,7 @@ type Entity struct {
 	Mailbox              string    `xorm:"VARCHAR(255)"`     //邮箱
 	CardId                   string    `xorm:"VARCHAR(255)"`     //身份证号
 	Address                   string    `xorm:"VARCHAR(255)"`     //地址
-	Website          string    `xorm:"VARCHAR(255)"`     //网站地址
+	Website                string    `xorm:"VARCHAR(255)"`     //网站地址
 	DepartmentId                string    `xorm:"VARCHAR(50)"`      //组织id
 	DepartmentName                 string    `xorm:"VARCHAR(255)"`     //组织名称
 	Type                    string    `xorm:"VARCHAR(50)"`       //类型
@@ -30,6 +30,7 @@ type Entity struct {
 	ModifiedOn              *gtime.Time `xorm:"DATETIME updated"`
 	ModifiedUserId          int       `xorm:"INT(10)"`
 	ModifiedBy              string    `xorm:"VARCHAR(50)"`
+	Remarks                 string    `xorm:"VARCHAR(50)"`
 }
 
 // OmitEmpty sets OPTION_OMITEMPTY option for the model, which automatically filers

BIN
frontend_web/src/views/demo/page1/image/background.png


+ 3 - 3
frontend_web/src/views/demo/page1/index.vue

@@ -6,7 +6,7 @@
            width="100%"
            height="115"
            style="margin:0px"> -->
-    <div class="container1">
+    <div class="background_css">
       <el-row style="height:100%">
         <el-col :span="20">
           &nbsp;
@@ -473,9 +473,9 @@ export default {
 </script>
 
 <style lang="scss">
-.container1 {
+.background_css {
   text-align: center;
-  background: url("./image/backg.png");
+  background: url("./image/background.png");
   width: 100%;
   min-height: 135px;
   height: 135px;

+ 1 - 143
frontend_web/src/views/instrument/components/instrumentadd.vue

@@ -10,23 +10,6 @@
              ref="testlistform">
       <el-row :gutter="20"
               class="donorsaddformcss">
-        <!-- <el-col :span="8">
-          <el-form-item label="设备大类"
-                        prop="Classification"
-                        label-width="120px">
-            <el-select ref="reftube"
-                       v-model="testlistform.Classification"
-                       placeholder="请选择设备大类"
-                       style="width:100%">
-              <el-option v-for="item in classificationlist"
-                         :label="item.Value"
-                         :value="item.Value"
-                         :key="item.Value">
-              </el-option>
-            </el-select>
-
-          </el-form-item>
-        </el-col> -->
         <el-col :span="8">
           <el-form-item label="设备编码"
                         prop="Code"
@@ -56,17 +39,6 @@
                       style="width:100%"></el-input>
           </el-form-item>
         </el-col>
-
-        <!-- <el-col :span="8">
-          <el-form-item label="规格"
-                        prop="Spec"
-                        label-width="120px">
-            <el-input v-model="testlistform.Spec"
-                      placeholder="请输入规格"
-                      style="width:100%"></el-input>
-          </el-form-item>
-        </el-col> -->
-
         <el-col :span="8">
           <el-form-item label="品牌名称"
                         prop="Brand"
@@ -85,34 +57,6 @@
                       placeholder="请输入出厂编号"></el-input>
           </el-form-item>
         </el-col>
-
-        <!-- <el-col :span="8">
-          <el-form-item label="供应商"
-                        prop="SupplierId"
-                        label-width="120px">
-            <el-select ref="reftube"
-                       v-model="testlistform.SupplierId"
-                       clearable
-                       placeholder="请选择供应商"
-                       style="width:100%">
-              <el-option v-for="item in getsupplierlist"
-                         :label="item.CustomerName"
-                         :value="item.Id"
-                         :key="item.Id">
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-col> -->
-
-        <!-- <el-col :span="8">
-          <el-form-item label="设备状态" required prop="State" label-width="120px">
-            <el-select   v-model="testlistform.State" placeholder="请选择设备状态" style="width:100%">
-              <el-option v-for="item in statelist" :key="item.Id" :label="item.stateName" :value="item.Id">
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-col> -->
-
         <el-col :span="8">
           <el-form-item label="校验日期"
                         label-width="120px"
@@ -124,7 +68,6 @@
             </el-date-picker>
           </el-form-item>
         </el-col>
-
         <el-col :span="8">
           <el-form-item label="校验使用期限"
                         label-width="120px">
@@ -143,12 +86,6 @@
 
           </el-form-item>
         </el-col>
-        <!-- <el-col :span="8">
-          <el-form-item label="位置" prop="Location" label-width="120px">
-            <el-input    v-model="testlistform.Location" placeholder="请输入设备所在位置"></el-input>
-          </el-form-item>
-        </el-col> -->
-
         <el-col :span="8">
           <el-form-item label="责任人"
                         label-width="120px">
@@ -157,15 +94,6 @@
             </el-input>
           </el-form-item>
         </el-col>
-
-        <!-- <el-col :span="8">
-          <el-form-item label="位置"
-                        prop="Location"
-                        label-width="120px">
-            <el-input v-model="testlistform.Location"
-                      placeholder="请输入设备所在位置"></el-input>
-          </el-form-item>
-        </el-col> -->
         <el-col :span="8">
           <el-form-item label="实验室位置"
                         prop="RoomType"
@@ -180,61 +108,6 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <!-- <el-col :span="8">
-          <el-form-item label="校验有效期提醒"
-                        label-width="120px">
-            <el-switch style="margin-left:30px"
-                       v-model="TimeNotification"
-                       active-color="#13ce66"
-                       inactive-color="#CCCCCC">
-            </el-switch>
-          </el-form-item>
-        </el-col> -->
-
-        <!-- <el-col :span="8">
-          <el-form-item label="维护保养周期"
-                        label-width="120px"
-                        prop="Cycle">
-            <el-input-number v-model="testlistform.MaintenCycle"
-                             :min="1"
-                             style="width:59%"></el-input-number>
-            <el-select v-model="testlistform.CycleType"
-                       style="width:39%;float:right">
-              <el-option label="天"
-                         :value="1"></el-option>
-              <el-option label="周"
-                         :value="2"></el-option>
-              <el-option label="月"
-                         :value="3"></el-option>
-              <el-option label="年"
-                         :value="4"></el-option>
-            </el-select>
-          </el-form-item>
-        </el-col> -->
-
-        <!-- <el-col :span="2">
-          <el-form-item label-width="0px">
-
-          </el-form-item>
-        </el-col> -->
-
-        <!-- <el-col :span="24">
-          <el-form-item label="操作规程"
-                        label-width="120px">
-            <el-upload style="height:65px"
-                       ref="uploader"
-                       action=""
-                       :file-list="fileList"
-                       :on-success="handleUploadSuccess"
-                       :on-remove="handleRemove"
-                       :http-request="uploadrequest"
-                       :limit="1">
-              <el-button size="mini"
-                         type="primary">点击上传</el-button>
-            </el-upload>
-          </el-form-item>
-        </el-col> -->
-
         <el-col :span="24">
           <el-form-item label="备注信息"
                         label-width="120px">
@@ -443,24 +316,9 @@ export default {
     savedata () {
       InstrumentApi.AddInstrument(this.testlistform, {})
         .then(res => {
-          // response
-          console.log('--------', res)
-          // if (res.info.code === 0) {
-          //   _this.$message({
-          //     type: 'success',
-          //     message: res.info.message
-
-          //   })
-          //   // window.history.go(-1)
-          // } else {
-          //   _this.$message({
-          //     type: 'warning',
-          //     message: res.info.message
-          //   })
-          // }
-          // this.handleCloseAdd()
           this.$emit('closeAddDialog')
           this.dialogvisible = false
+          this.testlistform = []
           this.fileList = []
           // 刷新
         })

+ 5 - 113
frontend_web/src/views/instrument/index.vue

@@ -98,16 +98,6 @@
                        align="center"
                        min-width="120px"
                        show-overflow-tooltip></el-table-column>
-      <!-- <el-table-column prop="Spec"
-                       align="center"
-                       min-width="120px"
-                       label="规格"
-                       show-overflow-tooltip></el-table-column> -->
-      <el-table-column prop="Classification"
-                       align="center"
-                       min-width="120px"
-                       label="设备大类"
-                       show-overflow-tooltip></el-table-column>
       <el-table-column prop="Brand"
                        label="品牌"
                        align="center"
@@ -118,21 +108,6 @@
                        align="center"
                        min-width="120px"
                        show-overflow-tooltip></el-table-column>
-
-      <!-- <el-table-column prop="CalibrationTime"
-                         sortable
-                         label="校准时间"
-                         align="center"
-                         width="140px"
-                         show-overflow-tooltip>
-          <template slot-scope="scope">{{ jstimehandle(scope.row.CalibrationTime +'') }}</template>
-        </el-table-column> -->
-
-      <!-- <el-table-column prop="CalibrationDeadline"
-                         sortable
-                         align="center"
-                         width="100px"
-                         label="校准期限"></el-table-column> -->
       <el-table-column prop="Responsible"
                        align="center"
                        min-width="100px"
@@ -163,53 +138,6 @@
                     center></el-alert>
         </template>
       </el-table-column>
-
-      <!-- <el-table-column prop="Type"
-                       label="有效期状态"
-                       align="center"
-                       min-width="100"
-                       show-overflow-tooltip>
-        <template slot-scope="scope">
-          <el-alert v-if="scope.row.tYPE==1"
-                    :closable="false"
-                    style="background:rgba(255,255,255,0.2)"
-                    title="校准正常"
-                    type="success"
-                    center></el-alert>
-          <el-alert v-if="scope.row.tYPE==2"
-                    :closable="false"
-                    style="background:rgba(255,255,255,0.2)"
-                    title="即将到期"
-                    type="warning"
-                    center></el-alert>
-          <el-alert v-if="scope.row.tYPE==3"
-                    :closable="false"
-                    style="background:rgba(255,255,255,0.2)"
-                    title="过期提醒"
-                    type="info"
-                    center></el-alert>
-        </template>
-      </el-table-column> -->
-      <!-- <el-table-column prop="TimeNotification"
-                       label="校准提醒"
-                       align="center"
-                       min-width="100"
-                       show-overflow-tooltip>
-        <template slot-scope="scope">
-          <el-alert v-if="scope.row.TimeNotification==2"
-                    :closable="false"
-                    style="background:rgba(255,255,255,0.2)"
-                    title="是"
-                    type="success"
-                    center></el-alert>
-          <el-alert v-if="scope.row.TimeNotification !=2"
-                    :closable="false"
-                    style="background:rgba(255,255,255,0.2)"
-                    title="否"
-                    type="warning"
-                    center></el-alert>
-        </template>
-      </el-table-column> -->
       <el-table-column prop="Remarks"
                        min-width="160px"
                        label="备注"
@@ -350,57 +278,21 @@ export default {
       //   CalibrationTime.push(_this.formatDateTime(_this.CalibrationTime[1]))
       // }
       let params = {
-        _currentPage: this.currpage,
-        _size: this.size,
+        current: this.currpage,
+        size: this.size,
         Code: this.search.Code,
-        Classification: this.search.classification,
         Name: this.search.Name,
         Order: this.Column.Order,
         Prop: this.Column.Prop
       }
       InstrumentApi.getAllInstrument(params)
         .then(res => {
+          console.log('-----res---', res)
           _this.activities = res.records
-          //   for (let i = 0; i < _this.activities.length; i++) {
-          //     var addTime = _this.addDate(_this.activities[i].CalibrationTime, 2)
-          //     var tdate = 0
-          //     if (_this.activities[i].CalibrationDeadlineType === 1) {
-          //       addTime = _this.addDate(_this.activities[i].CalibrationTime, _this.activities[i].CalibrationDeadline)
-          //       tdate = _this.count(new Date(addTime))
-          //       _this.activities[i].CalibrationDeadlineType = '天'
-          //     } else if (_this.activities[i].CalibrationDeadlineType === 2) {
-          //       addTime = _this.addDate(_this.activities[i].CalibrationTime, (_this.activities[i].CalibrationDeadline) * 7)
-          //       tdate = _this.count(new Date(addTime))
-          //       _this.activities[i].CalibrationDeadlineType = '周'
-          //     } else if (_this.activities[i].CalibrationDeadlineType === 3) {
-          //       addTime = _this.addDate(_this.activities[i].CalibrationTime, (_this.activities[i].CalibrationDeadline) * 30)
-          //       tdate = _this.count(new Date(addTime))
-          //       _this.activities[i].CalibrationDeadlineType = '月'
-          //     } else if (_this.activities[i].CalibrationDeadlineType === 4) {
-          //       addTime = _this.addDate(_this.activities[i].CalibrationTime, (_this.activities[i].CalibrationDeadline) * 365)
-          //       tdate = _this.count(new Date(addTime))
-          //       _this.activities[i].CalibrationDeadlineType = '年'
-          //     }
-          //     if (tdate >= 30) {
-          //       _this.activities[i].tYPE = 1
-          //     } else if (tdate < 30 && tdate >= 0) {
-          //       _this.activities[i].tYPE = 2
-          //     } else if (tdate < 0) {
-          //       _this.activities[i].tYPE = 3
-          //     }
-          //   }
-
-          //   for (let i = 0; i < _this.activities.length; i++) {
-          //     // _this.activities[i].CalibrationDeadline = _this.activities[i].CalibrationDeadline + ''
-          //     _this.activities[i].CalibrationDeadline = _this.activities[i].CalibrationDeadline + '' + _this.activities[i].CalibrationDeadlineType
-          //   }
-
-          //   _this.totalsize = response.info.currentItemCount
-          // })
-          // .catch(function (error) {
-          //   console.log(error)
+          _this.totalsize = res.total
         })
     },
+
     handleSizeChange (val) {
       this.size = val
       this.currpage = 1

+ 1 - 1
frontend_web/src/views/instrument/maintainlog/index.vue

@@ -237,9 +237,9 @@ export default {
         TypeCode: 2
       }
       searchdatazl(params)
-
         .then(function (response) {
           _this.activities = response.info.items
+          console.log('----response---', response)
           _this.totalsize = response.info.currentItemCount
         })
         .catch(function (error) {

+ 2 - 2
frontend_web/src/views/managingrooms/_opera/add.vue

@@ -43,7 +43,7 @@
               <el-option v-for="item in typeList"
                          :key="item.Key"
                          :label="item.Key"
-                         :value="item.Value"></el-option>
+                         :value="item.Key"></el-option>
             </el-select>
           </el-form-item>
         </el-col>
@@ -140,7 +140,7 @@ export default {
     // 保存实验室信息
     savedata () {
       let _this = this
-
+      console.log('-----_this.testlistform-----', _this.testlistform)
       saveroomdata(_this.testlistform)
         .then(res => {
           // if (res.info.code === 0) {

+ 3 - 7
frontend_web/src/views/managingrooms/index.vue

@@ -46,11 +46,7 @@
                        min-width="10px"
                        align="center"
                        label="实验室类型"
-                       show-overflow-tooltip>
-        <template slot-scope="scope">
-          {{ typeList[scope.row.RoomType] }}
-        </template>
-      </el-table-column>
+                       show-overflow-tooltip></el-table-column>
       <el-table-column prop="RoomDescribe"
                        min-width="10px"
                        align="center"
@@ -94,13 +90,13 @@
                      style="margin-left:5px"
                      icon="el-icon-delete"
                      circle></el-button>
-          <el-button size="mini"
+          <!-- <el-button size="mini"
                      @click="openRoleUserDialog(scope.row)"
                      type="warning"
                      title="设备关联"
                      style="margin-left:5px"
                      icon="el-icon-star-off"
-                     circle></el-button>
+                     circle></el-button> -->
         </template>
       </el-table-column>
     </el-table>

+ 48 - 8
frontend_web/src/views/personnel/components/personneladd.vue

@@ -157,12 +157,56 @@ export default {
   created () {
   },
   methods: {
+    // 操作规程文件上传
+    uploadrequest (option) {
+      let _this = this
+      axios.post(this.$uploadFile, {})
+        .then(function (res) {
+          if (res.data && res.data.fid && res.data.fid !== '') {
+            option.action = `http://${res.data.url}/${res.data.fid}`
+            _this.uploadFile = {
+              uid: option.file.uid,
+              url: res.data.publicUrl,
+              fid: res.data.fid
+            }
+            uploadajax(option)
+          } else {
+            _this.$message({
+              type: 'warning',
+              message: '未上传成功!请刷新界面重新上传!'
+            })
+          }
+        })
+        .catch(function (error) {
+          console.log(error)
+          _this.$message({
+            type: 'warning',
+            message: '未上传成功!请重新上传!'
+          })
+        })
+    },
     savedata () {
       PersonnelApi.AddPersonnel(this.testlistform, {})
         .then(res => {
-          this.$emit('closeAddDialog')
+          // response
+          // this.testlistform = []
+          console.log('--------', this.testlistform)
+          // if (res.info.code === 0) {
+          //   _this.$message({
+          //     type: 'success',
+          //     message: res.info.message
+
+          //   })
+          //   // window.history.go(-1)
+          // } else {
+          //   _this.$message({
+          //     type: 'warning',
+          //     message: res.info.message
+          //   })
+          // }
+          this.handleCloseAdd()
+          // this.$emit('closeAddDialog')
           this.dialogvisible = false
-          this.fileList = []
           // 刷新
         })
         .catch(err => {
@@ -177,12 +221,8 @@ export default {
     },
     handleCloseAdd () {
       this.$refs['testlistform'].resetFields()
-      this.testlistform.PersonnelName = ''
-      this.testlistform.PersonneCode = ''
-      this.testlistform.Telephone = ''
-      this.testlistform.Mailbox = ''
-      this.testlistform.CardId = ''
-      this.testlistform.Address = ''
+      this.testlistform.Remarks = ''
+      this.dialogvisible = false
       this.$emit('closeAddDialog')
     },
 

+ 0 - 3
frontend_web/src/views/personnel/index.vue

@@ -89,9 +89,7 @@
                        align="center"
                        min-width="100px"
                        label="地址"></el-table-column>
-
     </el-table>
-    <!-- </el-card> -->
     <addpersonnellog ref="addpersonnel"
                      @closeAddDialog="handleCloseAdd"
                      @refreshData="initDatas"
@@ -101,7 +99,6 @@
                          :PersonnelId="selectedPersonnelId"
                          @refreshData="initDatas"
                          width="80%"></addpersonneleditlog>
-    <!-- </div> -->
     <template slot="footer">
       <el-pagination style="margin: -10px;"
                      @size-change="handleSizeChange"