Bladeren bron

运行记录 维护保养

all 5 jaren geleden
bovenliggende
commit
023b57cc0d

+ 38 - 8
frontend_web/src/router/routes.js

@@ -242,15 +242,45 @@ const frameIn = [
         component: _import('sysadmin/item/index')
       },
        // 房间管理
-     {
-      path: 'managingrooms',
-      name: 'managingrooms',
-      meta: {
-        title: '房间管理',
-        auth: true
+       {
+        path: 'managingrooms',
+        name: 'managingrooms',
+        meta: {
+          title: '房间管理',
+          auth: true
+        },
+        component: _import('managingrooms')
       },
-      component: _import('managingrooms')
-    },
+        // 运行记录
+        {
+          path: 'instrument/instrumenrunrecord',
+          name: 'instrument/instrumenrunrecord',
+          meta: {
+            title: '运行记录',
+            auth: true
+          },
+          component: _import('instrument/instrumenrunrecord')
+        },
+         // 维护保养
+        {
+          path: 'instrument/maintainlog',
+          name: 'instrument/maintainlog',
+          meta: {
+            title: '维护保养',
+            auth: true
+          },
+          component: _import('instrument/maintainlog')
+        },
+        //确认及报废
+        {
+          path: 'instrument/confirmandscrap',
+          name: 'instrument/confirmandscrap',
+          meta: {
+            title: '确认及报废',
+            auth: true
+          },
+          component: _import('instrument/confirmandscrap')
+        },
       // ================== add 字典分类 08-12 e ====================
 
     ]

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

@@ -0,0 +1,385 @@
+<template>
+  <div>
+    <el-dialog title="添加记录"
+               :visible.sync="dialogvisible"
+               width="50%"
+               :before-close="handleCloseAdd">
+      <el-form size="mini"
+               :model="testlistform"
+               :rules="rulestestlistform"
+               label-width="130px"
+               height="600px"
+               ref="testlistform">
+        <el-row :gutter="20"
+                class="donorsaddformcss">
+
+          <el-col :span="24">
+            <el-form-item label="设备名称"
+                          required
+                          prop="InstrumenId"
+                          label-width="90px">
+              <el-select ref="InstrumenId"
+                         v-model="testlistform.InstrumenId"
+                         placeholder="设备名称"
+                         style="width: 100%">
+                <el-option v-for="item in InstrumenNamelist"
+                           :key="item.id"
+                           :label="item.name"
+                           :value="item.id">
+                  <span style="float: left">{{ item.name }}</span>
+                  <span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}&nbsp;{{item.brand}}&nbsp;{{item.model}}</span>
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="24">
+            <el-form-item label="操作人"
+                          required
+                          prop="OperaUser"
+                          label-width="90px">
+              <el-input v-model="testlistform.OperaUser"
+                        placeholder="请输入操作人"
+                        style="width:100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="24">
+            <el-form-item label="操作类型"
+                          required
+                          prop="OperaTpye"
+                          label-width="90px">
+              <el-select ref="reftube"
+                         v-model="testlistform.OperaTpye"
+                         placeholder="请输入操作类型"
+                         style="width:100%">
+                <!-- <el-option v-for="item in classificationlist"
+                           :label="item.Value"
+                           :value="item.Value"
+                           :key="item.Id">
+                </el-option> -->
+                <el-option value="设备确认"></el-option>
+                <el-option value="设备报废"></el-option>
+              </el-select>
+
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="24">
+            <el-form-item label="操作日期"
+                          label-width="90px"
+                          prop="OperaOn">
+              <el-date-picker v-model="testlistform.OperaOn"
+                              type="datetime"
+                              style="width:100%"
+                              placeholder="请选择操作日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="24">
+            <el-form-item label="操作说明"
+                          label-width="90px">
+              <el-input v-model="testlistform.OperaRemark"
+                        type="textarea"
+                        :rows=3
+                        placeholder="请输入操作说明"
+                        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">
+        <el-button size="mini"
+                   type="primary"
+                   @click="getInstrumenCode('testlistform')">保存</el-button>
+        <el-button size="mini"
+                   @click="handleCloseAdd">关闭</el-button>
+      </span>
+    </el-dialog>
+
+    <maintainlogdialog @close="attachmentclose"
+                       :attrinfo="attrinfo"
+                       :visible.sync="dialoguploadVisible"
+                       :modal="false"></maintainlogdialog>
+  </div>
+</template>
+
+<script>
+// import {
+//   mapGetters
+// } from 'vuex'
+import {
+  maintainsavedata,
+  OperaTpyelist,
+  selectinstrument,
+  InstrumenCode,
+  savedataOne
+} from '@/api/instrumentroom'
+import maintainlogdialog from '@/components/samples/maintainlogdialog'
+export default {
+  name: 'materialdetect',
+  components: {
+    maintainlogdialog
+  },
+  data () {
+    return {
+      dialogvisible: false,
+      waituploads: [], // 等待上传的附件列表
+      formtype: '1',
+      dialoguploadVisible: false, // 上传附 件
+      testlistform: {
+        InstrumenId: '',
+        InstrumenName: '',
+        InstrumenCode: '',
+        OperaRemark: '',
+        OperaTpye: '',
+        OperaUser: '',
+        OperaOn: new Date(),
+        uploadeds: [], // 已上传的附件
+        TypeCode: 1
+      },
+      attrinfo: {
+        ID: 0
+      }, // 附件参数信息
+      ID: '',
+      InstrumenNamelist: [],
+      maintainlogattrlist: [],
+      classificationlist: [],
+
+      rulestestlistform: {
+
+        InstrumenId: [{
+          required: true,
+          message: '请输入设备名称',
+          trigger: 'blur'
+        }],
+        OperaTpye: [{
+          required: true,
+          message: '请输入操作类型',
+          trigger: 'blur'
+        }],
+        OperaUser: [{
+          required: true,
+          message: '请输入操作人',
+          trigger: 'blur'
+        }],
+        OperaOn: [{
+          required: true,
+          message: '请输入品牌名称',
+          trigger: 'blur'
+        }]
+
+      }
+    }
+  },
+  mounted () {
+    selectinstrument()
+    InstrumenCode()
+    if (this.$route.query.pid) {
+      let pid = parseInt(this.$route.query.pid)
+      if (pid > 0) {
+        this.testlistform.InstrumenId = pid
+      }
+    }
+    // this.getOperaTpyelist()
+    this.getselectinstrument()
+  },
+  methods: {
+    // 保存
+    savedata () {
+      let _this = this
+      _this.testlistform.TypeCode = 1
+      _this.testlistform.InstrumenName = _this.$refs.InstrumenId.selectedLabel
+      _this.testlistform.InstrumenId = parseInt(_this.testlistform.InstrumenId)
+      maintainsavedata(_this.testlistform)
+        // _this.$axios.post('instrument/addinstrumenMaintainLog', _this.testlistform)
+        .then(res => {
+          // response
+          if (res.info.code === 0) {
+            if (this.maintainlogattrlist !== '') {
+              _this.savedataOne(res.info.item)
+            }
+
+            _this.$message({
+              type: 'success',
+              message: res.info.message
+            })
+          } else {
+            _this.$message({
+              type: 'warning',
+              message: res.info.message
+            })
+          }
+          this.handleCloseAdd()
+        })
+        .catch(err => {
+          // handle error
+          console.error(err)
+        })
+    },
+    getOperaTpyelist () {
+      // 获取样本单位
+      let _this = this
+      let params = {
+        code: 'OperaTpye'
+      }
+      OperaTpyelist(params)
+        // _this.$axios.get('/items/worditem?code=OperaTpye', {})
+        .then(res => {
+          _this.classificationlist = res.info
+        })
+    },
+    // 上传附件
+    maintainlogattr () {
+      let _this = this
+      _this.attrinfo.ID = _this.ID
+      _this.dialoguploadVisible = true
+    },
+    attachmentclose (attrlist) {
+      let _this = this
+      for (let i = 0; i < attrlist.length; i++) {
+        _this.maintainlogattrlist.push(attrlist[i])
+      }
+    },
+    // 获取设备名称下拉
+    getselectinstrument () {
+      let _this = this
+      selectinstrument()
+        // _this.$axios.get('/instrument/selectlist', {})
+        .then(res => {
+          // response
+          _this.InstrumenNamelist = res.info.items
+        })
+    },
+    // 根据设备名称ID查询 设备编号
+    getInstrumenCode (formName) {
+      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
+              _this.savedata()
+            })
+            .catch(err => {
+              // handle error
+              console.error(err)
+            })
+        } else {
+          return false
+        }
+      })
+    },
+    // 保存附件
+    savedataOne (pid) {
+      let _this = this
+      let params = {
+        AttachmodelList: _this.maintainlogattrlist,
+        MaintainLogId: pid
+
+      }
+      savedataOne(params)
+        // _this.$axios.put('/instrument/savesampleattach', params)
+        .then(res => {
+          if (res.info.code === 0) {
+            _this.$message({
+              type: 'success',
+              message: res.info.message
+            })
+          } else {
+            _this.$message({
+              type: 'warning',
+              message: res.info.message
+            })
+          }
+        })
+        .catch(() => { })
+    },
+
+    deletedata (index) {
+      let _this = this
+      _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '关闭',
+        type: 'warning'
+      })
+        .then(() => {
+          this.maintainlogattrlist.splice(index, 1)
+        })
+        .catch(() => { })
+    },
+    handleCloseAdd () {
+      this.$emit('closeAddDialog')
+      this.testlistform.InstrumenId = ''
+      this.testlistform.OperaUser = ''
+      this.testlistform.OperaTpye = ''
+      this.testlistform.OperaRemark = ''
+      this.maintainlogattrlist = ''
+      this.$refs['testlistform'].resetFields()
+    }
+  }
+}
+
+</script>
+
+<style lang="scss">
+.button {
+  padding: 0;
+  float: right;
+}
+
+.donorsaddformcss .el-col-8 {
+  height: 58px;
+}
+
+.maintainlog div {
+  margin-top: -4px;
+  color: #4f94cd;
+  cursor: pointer;
+}
+
+.maintainlog div span {
+  float: right;
+}
+</style>

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

@@ -0,0 +1,425 @@
+<template>
+  <div>
+    <el-dialog title="编辑记录"
+               :visible.sync="dialogvisible"
+               width="50%"
+               :before-close="handleCloseEdit">
+      <el-form size="mini"
+               :model="testlistform"
+               :rules="rulestestlistform"
+               label-width="130px"
+               height="600px"
+               ref="testlistform">
+        <el-row :gutter="20"
+                class="donorsaddformcss">
+
+          <el-col :span="24">
+            <el-form-item label="设备名称"
+                          required
+                          prop="InstrumenId"
+                          label-width="90px">
+              <el-select ref="InstrumenId"
+                         disabled
+                         v-model="testlistform.InstrumenId"
+                         placeholder="设备名称"
+                         style="width: 100%">
+                <el-option v-for="item in InstrumenNamelist"
+                           :key="item.id"
+                           :label="item.name"
+                           :value="item.id">
+                  <span style="float: left">{{ item.name }}</span>
+                  <span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}&nbsp;{{item.brand}}&nbsp;{{item.model}}</span>
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="24">
+            <el-form-item label="操作人"
+                          required
+                          prop="OperaUser"
+                          label-width="90px">
+              <el-input v-model="testlistform.OperaUser"
+                        placeholder="请输入操作人"
+                        style="width:100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="24">
+            <el-form-item label="操作类型"
+                          required
+                          prop="OperaTpye"
+                          label-width="90px">
+              <el-select ref="reftube"
+                         v-model="testlistform.OperaTpye"
+                         placeholder="请输入操作类型"
+                         style="width:100%">
+                <!-- <el-option v-for="item in classificationlist"
+                           :label="item.Value"
+                           :value="item.Value"
+                           :key="item.Value">
+                </el-option> -->
+                <el-option value="设备确认"></el-option>
+                <el-option value="设备报废"></el-option>
+              </el-select>
+
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="24">
+            <el-form-item label="操作日期"
+                          label-width="90px"
+                          prop="OperaOn">
+              <el-date-picker v-model="testlistform.OperaOn"
+                              type="datetime"
+                              style="width:100%"
+                              placeholder="请选择操作日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="24">
+            <el-form-item label="操作说明"
+                          label-width="90px">
+              <el-input v-model="testlistform.OperaRemark"
+                        type="textarea"
+                        :rows=3
+                        placeholder="请输入操作说明"
+                        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">
+        <el-button size="mini"
+                   type="primary"
+                   @click="getInstrumenCode('testlistform')">保存</el-button>
+        <el-button size="mini"
+                   @click="handleCloseEdit">关闭</el-button>
+      </span>
+    </el-dialog>
+    <maintainlogdialog @close="attachmentclose"
+                       :attrinfo="attrinfo"
+                       :visible.sync="dialoguploadVisible"></maintainlogdialog>
+  </div>
+</template>
+
+<script>
+import {
+  // OperaTpyelist,
+  selectinstrument,
+  DonorsInfoAttachment,
+  initDatamaintainlog,
+  savedataOne,
+  saveeditmaintainlog,
+  InstrumenCode,
+  deleteInstrument
+} from '@/api/instrumentroom'
+import maintainlogdialog from '@/components/samples/maintainlogdialog'
+export default {
+  name: 'materialdetect',
+  props: {
+    maintainlogId: {
+      type: Number,
+      default: 0
+    }
+  },
+  components: {
+    maintainlogdialog
+  },
+  // watch: {
+  //   'maintainlogId': function (newVal) {
+  //     this.initData(newVal)
+  //   }
+  // },
+  data () {
+    return {
+      MaintainLogId: 0,
+      dialogvisible: false,
+      list: [],
+      waituploads: [], // 等待上传的附件列表
+      formtype: '1',
+      dialoguploadVisible: false, // 上传附 件
+      testlistform: {
+        InstrumenId: '',
+        InstrumenName: '',
+        InstrumenCode: '',
+        OperaRemark: '',
+        OperaTpye: '',
+        OperaUser: '',
+        OperaOn: new Date(),
+        uploadeds: [] // 已上传的附件
+      },
+      attrinfo: {
+        ID: 0
+      }, // 附件参数信息
+      ID: '',
+      InstrumenNamelist: [],
+      maintainlogattrlist: [],
+      classificationlist: [],
+
+      rulestestlistform: {
+
+        InstrumenId: [{
+          required: true,
+          message: '请输入设备名称',
+          trigger: 'blur'
+        }],
+        OperaTpye: [{
+          required: true,
+          message: '请输入操作类型',
+          trigger: 'blur'
+        }],
+        OperaUser: [{
+          required: true,
+          message: '请输入操作人',
+          trigger: 'blur'
+        }],
+        OperaOn: [{
+          required: true,
+          message: '请输入品牌名称',
+          trigger: 'blur'
+        }]
+
+      }
+    }
+  },
+  mounted () {
+    // selectinstrument()
+    // initDatamaintainlog()
+    // this.getDonorsInfoAttachment()
+    // this.initData(this.maintainlogId)
+    // this.getOperaTpyelist()
+    this.getselectinstrument()
+  },
+  methods: {
+    // 保存
+    savedata () {
+      let _this = this
+      saveeditmaintainlog(_this.testlistform.Id, _this.testlistform)
+        // _this.$axios.put('/instrument/saveeditmaintainlog/' + _this.testlistform.Id, _this.testlistform)
+        .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',
+                message: res.info.message
+              })
+            }
+          } else {
+            _this.$message({
+              type: 'warning',
+              message: res.info.message
+            })
+          }
+          this.handleCloseEdit()
+        })
+        .catch(err => {
+          // handle error
+          console.error(err)
+        })
+    },
+    // 保存
+    getInstrumenCode (formName) {
+      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
+              _this.savedata()
+            })
+            .catch(err => {
+              // handle error
+              console.error(err)
+            })
+        } else {
+          return false
+        }
+      })
+    },
+    initData (pid) {
+      let _this = this
+      initDatamaintainlog(pid)
+        .then(function (response) {
+          _this.testlistform = response.info
+          // _this.testlistform.OperaOn = new Date(response.OperaOn)
+        })
+    },
+    // getOperaTpyelist () {
+    //   // 获取样本单位
+    //   let _this = this
+    //   let params = {
+    //     code: 'OperaTpye'
+    //   }
+    //   OperaTpyelist(params)
+    //     // _this.$axios.get('/items/worditem?code=OperaTpye', {})
+    //     .then(res => {
+    //       _this.classificationlist = res.info
+    //     })
+    // },
+    // 上传附件
+    maintainlogattr () {
+      let _this = this
+      _this.attrinfo.ID = _this.ID
+      _this.dialoguploadVisible = true
+    },
+    attachmentclose (attrlist) {
+      let _this = this
+      for (let i = 0; i < attrlist.length; i++) {
+        _this.maintainlogattrlist.push(attrlist[i])
+      }
+    },
+    // 获取设备名称下拉
+    getselectinstrument () {
+      let _this = this
+      selectinstrument()
+        // _this.$axios.get('/instrument/selectlist', {})
+        .then(res => {
+          // response
+          _this.InstrumenNamelist = res.info.items
+        })
+    },
+
+    // 保存附件
+    savedataOne (pid) {
+      let _this = this
+      let params = {
+        AttachmodelList: _this.maintainlogattrlist,
+        MaintainLogId: pid
+      }
+      savedataOne(params)
+        // _this.$axios.put('/instrument/savesampleattach', params)
+        .then(res => {
+          if (res.info.code === 0) {
+            _this.$message({
+              type: 'success',
+              message: res.info.message
+            })
+          } else {
+            _this.$message({
+              type: 'warning',
+              message: res.info.message
+            })
+          }
+        })
+        .catch(() => { })
+    },
+    // 返回
+    handleCloseEdit () {
+      this.$emit('closeAddDialog')
+      this.$refs['testlistform'].resetFields()
+    },
+    deletedata (index) {
+      let _this = this
+      _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '关闭',
+        type: 'warning'
+      })
+        .then(() => {
+          this.maintainlogattrlist.splice(index, 1)
+        })
+        .catch(() => { })
+    },
+    // 获取附件
+    getDonorsInfoAttachment (pid) {
+      let _this = this
+      _this.maintainlogattrlist = []
+      DonorsInfoAttachment(pid)
+        .then(res => {
+          _this.list = res.info.items
+          if (_this.list !== null) {
+            for (let i = 0; i < _this.list.length; i++) {
+              // hivfujian
+              _this.maintainlogattrlist.push(_this.list[i])
+            }
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+    },
+    clickachment (host, fid) {
+      window.open(`http://${host}/${fid}`)
+    },
+    // 根据维护记录表Id删除质量附件表
+    deleteinstrument () {
+      // let _this = this
+      deleteInstrument(this.maintainlogId)
+        // this.$axios.delete('/instrument/maintainLogAttachmentdeletearrt/' + this.operaid)
+        .then(function (response) {
+        })
+        .catch(function (error) {
+          console.log(error)
+        })
+    }
+  }
+
+}
+
+</script>
+
+<style lang="scss">
+.button {
+  padding: 0;
+  float: right;
+}
+
+.donorsaddformcss .el-col-8 {
+  height: 58px;
+}
+
+.maintainlog div {
+  margin-top: -4px;
+  color: #4f94cd;
+  cursor: pointer;
+}
+
+.maintainlog div span {
+  float: right;
+}
+</style>

+ 370 - 0
frontend_web/src/views/instrument/confirmandscrap/index.vue

@@ -0,0 +1,370 @@
+<template>
+  <d2-container>
+    <template slot="header"
+              style="padding: 5px;">
+      <el-form size="mini"
+               ref="form"
+               :inline="true"
+               class="sbutton_padding"
+               style="margin-top: -7px;text-align:right;">
+
+        <el-form-item label="设备名称"
+                      class="sbutton_margin">
+          <el-input style="width: 140px;"
+                    v-model="search.InstrumenName"
+                    placeholder="请输入设备名称"></el-input>
+        </el-form-item>
+        <el-form-item label="操作类型"
+                      class="sbutton_margin">
+          <el-select v-model="search.OperaTpye"
+                     placeholder="请输入操作类型"
+                     clearable
+                     style="width:140px;">
+            <el-option v-for="item in classificationlist"
+                       :label="item.Value"
+                       :value="item.Value"
+                       :key="item.Value"></el-option>
+          </el-select>
+        </el-form-item>
+        <!-- <el-form-item label="操作人">
+          <el-input v-model="search.OperaUser"
+                    style="width: 165px;"
+                     
+                    placeholder="输入操作人"></el-input>
+        </el-form-item> -->
+        <el-col :span="6"></el-col>
+        <el-form-item label="操作日期"
+                      class="sbutton_margin">
+          <el-date-picker style="width:220px"
+                          v-model="OperaOn"
+                          type="daterange"
+                          range-separator="至"
+                          start-placeholder="开始日期"
+                          end-placeholder="结束日期"></el-date-picker>
+        </el-form-item>
+        <el-button size="mini"
+                   type="primary"
+                   style="margin-left:10px;"
+                   @click="searchdata()"
+                   class="sbutton_margin">查询</el-button>
+        <el-button size="mini"
+                   type="primary"
+                   @click="clearSearch"
+                   class="sbutton_margin">重置</el-button>
+        <el-button size="mini"
+                   type="primary"
+                   style="margin-right:6px;"
+                   @click="maintainlogadd()"
+                   class="sbutton_margin">添加</el-button>
+      </el-form>
+    </template>
+    <el-table ref="multipleTable"
+              :data="activities"
+              border
+              stripe
+              tooltip-effect="dark"
+              style="width: 100%"
+              @sort-change="orderby"
+              height="100%">
+      <el-table-column label="操作"
+                       align="center"
+                       width="100px"
+                       fixed='right'>
+        <template slot-scope="scope">
+          <el-button size="mini"
+                     type="primary"
+                     title="编辑"
+                     @click="editmaintain(scope.row.Id)"
+                     icon="el-icon-edit"
+                     circle></el-button>
+          <el-button size="mini"
+                     @click="deleteinstrument(scope.row)"
+                     type="danger"
+                     title="删除"
+                     style="margin-left:5px"
+                     icon="el-icon-delete"
+                     circle></el-button>
+        </template>
+      </el-table-column>
+
+      <el-table-column prop="InstrumenCode"
+                       align="center"
+                       label="设备编号"
+                       min-width="160"
+                       show-overflow-tooltip></el-table-column>
+      <el-table-column prop="InstrumenName"
+                       align="center"
+                       label="设备名称"
+                       min-width="120"
+                       show-overflow-tooltip></el-table-column>
+      <el-table-column prop="OperaTpye"
+                       align="center"
+                       label="操作类型"
+                       min-width="120"
+                       show-overflow-tooltip></el-table-column>
+      <el-table-column prop="OperaUser"
+                       align="center"
+                       label="操作人"
+                       show-overflow-tooltip></el-table-column>
+      <el-table-column prop="OperaRemark"
+                       align="center"
+                       label="操作说明"
+                       show-overflow-tooltip
+                       min-width="160px"></el-table-column>
+      <el-table-column prop="OperaOn"
+                       sortable
+                       label="操作日期"
+                       align="center"
+                       show-overflow-tooltip
+                       min-width="120">
+        <template slot-scope="scope">{{ jstimehandle(scope.row.OperaOn +'') }}</template>
+      </el-table-column>
+    </el-table>
+    <!-- </el-card> -->
+    <addmaintainlog ref="addmaintain"
+                    @closeAddDialog="handleCloseAdd"></addmaintainlog>
+    <editmiantainlog ref="editmaintainlog"
+                     @closeAddDialog="handleCloseEdit"
+                     :maintainlogId="selectedMaintainLogId"></editmiantainlog>
+    <!-- </div> -->
+    <template slot="footer">
+      <el-pagination style="margin: -10px;"
+                     @size-change="handleSizeChange"
+                     @current-change="handleCurrentChange"
+                     :current-page="currpage"
+                     :page-sizes="[10, 15, 20]"
+                     :page-size="size"
+                     layout="total, sizes, prev, pager, next, jumper"
+                     :total="totalsize">
+      </el-pagination>
+    </template>
+  </d2-container>
+</template>
+
+<script>
+import {
+  searchdatazl,
+  OperaTpyelist,
+  deleteinstrumentzl
+} from '@/api/instrumentroom'
+import addmaintainlog from './_opera/add'
+import editmiantainlog from './_opera/edit'
+export default {
+  components: {
+    addmaintainlog,
+    editmiantainlog
+  },
+  name: 'instrument',
+  data () {
+    return {
+      selectedMaintainLogId: 0,
+      dialogvisible: false,
+      name: '',
+      totalsize: 0,
+      currpage: 1,
+      size: 10,
+      OperaOn: [], // 录入时期
+      activities: [],
+      search: {
+        OperaTpye: '',
+        InstrumenName: '',
+        InstrumenCode: '',
+        OperaUser: ''
+      },
+      classificationlist: [],
+      InstrumenName: '',
+      InstrumenCode: '',
+      addparam: '',
+      paramid: '',
+      OperaUser: '',
+      // 列表排序
+      Column: {
+        Order: '',
+        Prop: ''
+      }
+    }
+  },
+  mounted () {
+    // searchdatazl()
+
+    if (this.$route.query.id) {
+      this.addparam = '?pid=' + this.$route.query.id
+      this.paramid = this.$route.query.id
+      this.search.InstrumenCode = ''
+      this.search.InstrumenName = ''
+    }
+    this.searchdata()
+    this.getOperaTpyelist()
+  },
+  methods: {
+    maintainlogadd () {
+      this.$refs.addmaintain.dialogvisible = true
+    },
+    editmaintain (maintainlogId) {
+      this.$refs.editmaintainlog.getDonorsInfoAttachment(maintainlogId)
+      this.$refs.editmaintainlog.dialogvisible = true
+      this.$refs.editmaintainlog.initData(maintainlogId)
+      this.selectedMaintainLogId = maintainlogId
+    },
+    // 添加  返回当前页面
+    handleCloseAdd () {
+      this.$refs.addmaintain.dialogvisible = false
+      this.searchdata()
+    },
+    // 编辑  返回当前页面
+    handleCloseEdit () {
+      this.$refs.editmaintainlog.dialogvisible = false
+      this.searchdata()
+    },
+    // 初始化列表数据
+    searchdata () {
+      let _this = this
+      let OperaOn = []
+      // let paramid
+      if (!_this.OperaOn) {
+        _this.OperaOn = []
+      }
+      // 解析时间
+      if (_this.OperaOn.length === 2) {
+        _this.OperaOn[1].setHours(23)
+        _this.OperaOn[1].setMinutes(59)
+        _this.OperaOn[1].setSeconds(59)
+        OperaOn.push(_this.formatDateTime(_this.OperaOn[0]))
+        OperaOn.push(_this.formatDateTime(_this.OperaOn[1]))
+      }
+      let params = {
+        _currentPage: this.currpage,
+        _size: this.size,
+        InstrumenCode: this.search.InstrumenCode,
+        InstrumenName: this.search.InstrumenName,
+        OperaTpye: this.search.OperaTpye,
+        OperaUser: this.search.OperaUser,
+        paramid: this.paramid,
+        Order: this.Column.Order,
+        Prop: this.Column.Prop,
+        TypeCode: 1
+      }
+      searchdatazl(params)
+
+        .then(function (response) {
+          _this.activities = response.info.items
+          _this.totalsize = response.info.currentItemCount
+        })
+        .catch(function (error) {
+          console.log(error)
+        })
+    },
+    // 清除查询条件
+
+    handleSizeChange (val) {
+      this.size = val
+      this.currpage = 1
+      this.searchdata()
+    },
+    handleCurrentChange (val) {
+      this.currpage = val
+      this.searchdata()
+    },
+    jstimehandle (val) {
+      if (val === '') {
+        return '----'
+      } else if (val === '0001-01-01T08:00:00+08:00') {
+        return '----'
+      } else if (val === '5000-01-01T23:59:59+08:00') {
+        return '永久'
+      } else {
+        if (val === '0001-01-01T00:00:00Z') {
+          return '----'
+        } else val = val.replace('T', ' ')
+        return val.substring(0, 19)
+      }
+    },
+    // 删除设备信息
+    deleteinstrument (val) {
+      let _this = this
+      _this
+        .$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '关闭',
+          type: 'warning'
+        })
+        .then(() => {
+          deleteinstrumentzl(val.Id)
+            .then(function (response) {
+              // response
+              if (response.info.code === 0) {
+                _this.$message({
+                  type: 'success',
+                  message: response.info.message
+                })
+                // 更新界面
+                _this.searchdata()
+              } else {
+                _this.$message({
+                  type: 'warning',
+                  message: response.info.message
+                })
+              }
+            })
+            .catch(function (error) {
+              console.log(error)
+            })
+        })
+        .catch(() => { })
+    },
+    getOperaTpyelist () {
+      // 获取样本单位
+      let _this = this
+      let params = {
+
+        code: 'OperaTpye'
+      }
+      OperaTpyelist(params)
+        .then(res => {
+          _this.classificationlist = res.info
+        })
+    },
+    // 列表排序功能
+    orderby (column) {
+      if (column.order === 'ascending') {
+        this.Column.Order = 'asc'
+      } else if (column.order === 'descending') {
+        this.Column.Order = 'desc'
+      }
+      this.Column.Prop = column.prop
+      this.searchdata()
+    },
+    formatDateTime (date) {
+      var y = date.getFullYear()
+      var m = date.getMonth() + 1
+      m = m < 10 ? '0' + m : m
+      var d = date.getDate()
+      d = d < 10 ? '0' + d : d
+      // var h = date.getHours();
+      // var minute = date.getMinutes();
+      // minute = minute < 10 ? ('0' + minute) : minute;
+      return y + '-' + m + '-' + d // + ' ' + h + ':' + minute;
+    },
+    clearSearch () {
+      this.search.InstrumenCode = ''
+      this.search.InstrumenName = ''
+      this.search.OperaTpye = ''
+      this.search.OperaUser = ''
+      this.OperaOn = []
+      this.searchdata()
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+.el-pagination {
+  margin: 1rem 0 2rem;
+  text-align: right;
+}
+
+.plab {
+  font-size: 13px;
+  color: #999;
+}
+</style>

+ 156 - 0
frontend_web/src/views/instrument/instrumenrunrecord/_opera/add.vue

@@ -0,0 +1,156 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/instrument/instrumenrunrecord' }">运行记录</el-breadcrumb-item>
+      <el-breadcrumb-item>添加运行记录</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card class="box-card">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 运行记录
+        </span>
+        <span style="float: right;">
+          <el-button size="mini" type="primary" @click="savedata('testlistform')" class="el-button--small">保存</el-button>
+          <el-button size="mini" type="primary" class="el-button--small" onclick="window.history.go(-1)">返回</el-button>
+        </span>
+      </div>
+       <el-form size="mini" :model="testlistform" :rules="rulestestlistform" label-width="130px" height="600px" ref="testlistform">
+        <el-row :gutter="20" class="donorsaddformcss">
+          <el-col :span="8">
+             <el-form-item label="设备名称" required prop="InstrumenName" label-width="120px">
+              <el-input v-model="testlistform.InstrumenName" placeholder="请输入设备名称" style="width:100%"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="设备编号" required prop="InstrumenCode" label-width="120px">
+              <el-input v-model="testlistform.InstrumenCode" placeholder="请输入设备编号" style="width:100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+            <!-- <el-col :span="8">
+            <el-form-item label="操作人" required prop="OperaUser" label-width="120px">
+              <el-input v-model="testlistform.CreateBy" placeholder="请输入操作人" style="width:100%"></el-input>
+            </el-form-item>
+          </el-col> -->
+
+          <el-col :span="8">
+            <el-form-item label="合同编号" required prop="InstrumenCode" label-width="120px">
+              <el-input v-model="testlistform.ContractNo" placeholder="请输入合同编号" style="width:100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+            <!-- <el-col :span="8">
+          <el-form-item label="操作日期" label-width="120px" prop="OperaOn">
+                  <el-date-picker  v-model="testlistform.OperaOn" type="datetime" style="width:100%" >
+                  </el-date-picker>
+                </el-form-item>
+          </el-col> -->
+
+          <el-col :span="24">
+             <el-form-item label="运行说明" label-width="120px">
+              <el-input v-model="testlistform.RecordRemark" type="textarea" :rows=3 placeholder="请输入运行说明" style="width:100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+        </el-row>
+      </el-form>
+    </el-card>
+  </div>
+
+</template>
+
+<script>
+export default {
+  name: 'instrumentadd',
+  data () {
+    return {
+      formtype: '1',
+      disabledbarcode: false,
+      testlistform: {
+        InstrumenId: 0,
+        InstrumenName: '',
+        InstrumenCode: '',
+        RecordRemark: '',
+        ContractNo: ''
+
+      },
+
+      classificationlist: [],
+
+      rulestestlistform: {
+
+        InstrumenName: [{
+          required: true,
+          message: '请输入设备名称',
+          trigger: 'blur'
+        }],
+        InstrumenCode: [{
+          required: true,
+          message: '请输入设备编号',
+          trigger: 'blur'
+        }],
+        // RecordRemark: [{
+        //   required: true,
+        //   message: '请输入运行说明',
+        //   trigger: 'blur'
+        // }],
+        ContractNo: [{
+          required: true,
+          message: '请输入合同编号',
+          trigger: 'blur'
+        }]
+
+      }
+    }
+  },
+  created () {
+    // let _this = this
+  },
+  methods: {
+    savedata (formName) {
+      let _this = this
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          _this.$axios.post('instrument/addinstrumenrunrecord', _this.testlistform)
+            .then(res => {
+              // response
+              if (res.data.code === 0) {
+                _this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+                window.history.go(-1)
+              } else {
+                _this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            })
+            .catch(err => {
+              // handle error
+              console.error(err)
+            })
+        } else {
+          return false
+        }
+      })
+    }
+
+  }
+}
+
+</script>
+
+<style lang="scss">
+  .button {
+    padding: 0;
+    float: right;
+  }
+
+  .donorsaddformcss .el-col-8 {
+    height: 58px;
+  }
+
+</style>

+ 168 - 0
frontend_web/src/views/instrument/instrumenrunrecord/_opera/edit.vue

@@ -0,0 +1,168 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/instrument/instrumenrunrecord' }">运行记录</el-breadcrumb-item>
+      <el-breadcrumb-item>添加运行记录</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card class="box-card">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 运行记录
+        </span>
+        <span style="float: right;">
+          <el-button size="mini" type="primary" @click="savedata('testlistform')" class="el-button--small">保存</el-button>
+          <el-button size="mini" type="primary" class="el-button--small" onclick="window.history.go(-1)">返回</el-button>
+        </span>
+      </div>
+       <el-form size="mini" :model="testlistform" :rules="rulestestlistform" label-width="130px" height="600px" ref="testlistform">
+        <el-row :gutter="20" class="donorsaddformcss">
+          <el-col :span="8">
+             <el-form-item label="设备名称" required prop="InstrumenName" label-width="120px">
+              <el-input v-model="testlistform.InstrumenName" placeholder="请输入设备名称" style="width:100%"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="设备编号" required prop="InstrumenCode" label-width="120px">
+              <el-input v-model="testlistform.InstrumenCode" placeholder="请输入设备编号" style="width:100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+            <!-- <el-col :span="8">
+            <el-form-item label="操作人" required prop="OperaUser" label-width="120px">
+              <el-input v-model="testlistform.CreateBy" placeholder="请输入操作人" style="width:100%"></el-input>
+            </el-form-item>
+          </el-col> -->
+
+          <el-col :span="8">
+            <el-form-item label="合同编号"  prop="ContractNo" label-width="120px">
+              <el-input v-model="testlistform.ContractNo" placeholder="请输入合同编号" style="width:100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+            <!-- <el-col :span="8">
+          <el-form-item label="操作日期" label-width="120px" prop="OperaOn">
+                  <el-date-picker  v-model="testlistform.OperaOn" type="datetime" style="width:100%" >
+                  </el-date-picker>
+                </el-form-item>
+          </el-col> -->
+
+          <el-col :span="24">
+             <el-form-item label="运行说明" label-width="120px">
+              <el-input v-model="testlistform.RecordRemark" type="textarea" :rows=3 placeholder="请输入运行说明" style="width:100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+        </el-row>
+      </el-form>
+    </el-card>
+  </div>
+
+</template>
+
+<script>
+export default {
+  name: 'instrumentadd',
+  data () {
+    return {
+      formtype: '1',
+      disabledbarcode: false,
+      testlistform: {
+        InstrumenId: 0,
+        InstrumenName: '',
+        InstrumenCode: '',
+        RecordRemark: '',
+        ContractNo: ''
+
+      },
+
+      classificationlist: [],
+
+      rulestestlistform: {
+
+        InstrumenName: [{
+          required: true,
+          message: '请输入设备名称',
+          trigger: 'blur'
+        }],
+        InstrumenCode: [{
+          required: true,
+          message: '请输入设备编号',
+          trigger: 'blur'
+        }]
+        //  ContractNo: [{
+        //   required: true,
+        //   message: '请输入设备编号',
+        //   trigger: 'blur'
+        // }],
+        // RecordRemark: [{
+        //   required: true,
+        //   message: '请输入运行说明',
+        //   trigger: 'blur'
+        // }]
+
+      }
+    }
+  },
+  created () {
+    // let _this = this
+    this.operaid = this.$route.params.opera
+
+    this.initData(this.operaid)
+  },
+  methods: {
+    savedata (formName) {
+      let _this = this
+      // _this.testlistform.InstrumenId =parseInt(_this.operaid)
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          _this.$axios.put('/instrument/saveeditinstrumenrunrecord/' + _this.testlistform.Id, _this.testlistform)
+            .then(res => {
+              // response
+              if (res.data.code === 0) {
+                _this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+                window.history.go(-1)
+              } else {
+                _this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            })
+            .catch(err => {
+              // handle error
+              console.error(err)
+            })
+        } else {
+          return false
+        }
+      })
+    },
+    initData (pid) {
+      let _this = this
+      _this.$axios.get('/instrument/getinstrumenrunrecord/' + pid)
+        .then(function (response) {
+          _this.testlistform = response.data
+          // _this.testlistform.OperaOn = new Date(res.data.items.OperaOn)
+        })
+    }
+
+  }
+}
+
+</script>
+
+<style lang="scss">
+  .button {
+    padding: 0;
+    float: right;
+  }
+
+  .donorsaddformcss .el-col-8 {
+    height: 58px;
+  }
+
+</style>

+ 254 - 0
frontend_web/src/views/instrument/instrumenrunrecord/index.vue

@@ -0,0 +1,254 @@
+<template>
+  <d2-container>
+    <template slot="header"
+              style="padding: 5px;">
+      <el-form size="mini"
+               ref="form"
+               :inline="true"
+               class="sbutton_padding"
+               style=" margin-top: -7px;text-align:right;">
+        <el-form-item label="设备名称"
+                      class="sbutton_margin">
+          <el-input v-model="search.InstrumenCode"
+                    style="width:140px"
+                    placeholder="请输入设备名称"></el-input>
+        </el-form-item>
+        <el-form-item label="操作人"
+                      class="sbutton_margin">
+          <el-input v-model="search.CreateBy"
+                    style="width:140px"
+                    placeholder="输入操作人"></el-input>
+        </el-form-item>
+        <el-form-item label="创建时间"
+                      class="sbutton_margin">
+          <el-date-picker v-model="CreateOn"
+                          style="width:220px"
+                          type="daterange"
+                          range-separator="至"
+                          start-placeholder="开始时间"
+                          end-placeholder="结束日期"></el-date-picker>
+        </el-form-item>
+        <el-button size="mini"
+                   type="primary"
+                   style="margin-left:10px"
+                   @click="searchdata()"
+                   class="sbutton_margin">查 询</el-button>
+        <el-button size="mini"
+                   type="primary"
+                   @click="clearSearch"
+                   style="margin-right:6px"
+                   class="sbutton_margin">重 置</el-button>
+      </el-form>
+    </template>
+    <el-table ref="multipleTable"
+              :data="activities"
+              border
+              tooltip-effect="dark"
+              style="width: 100%"
+              @sort-change="orderby"
+              height="100%">
+      <el-table-column prop="InstrumenCode"
+                       align="center"
+                       min-width="160px"
+                       label="设备编号"
+                       show-overflow-tooltip></el-table-column>
+      <el-table-column prop="InstrumenName"
+                       align="center"
+                       min-width="120px"
+                       label="设备名称"
+                       show-overflow-tooltip></el-table-column>
+      <el-table-column prop="CreateOn"
+                       label="操作日期"
+                       min-width="120px"
+                       align="center"
+                       show-overflow-tooltip
+                       width="180">
+        <template slot-scope="scope">
+          {{ jstimehandle(scope.row.CreateOn + "") }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="CreateBy"
+                       align="center"
+                       min-width="120px"
+                       label="操作人"
+                       show-overflow-tooltip></el-table-column>
+      <el-table-column prop="RecordRemark"
+                       align="center"
+                       min-width="160px"
+                       label="运行说明"
+                       show-overflow-tooltip
+                       width="270"></el-table-column>
+      <el-table-column prop="ContractNo"
+                       align="center"
+                       min-width="120px"
+                       label="项目编号"
+                       show-overflow-tooltip></el-table-column>
+    </el-table>
+    <!-- </el-card> -->
+    <template slot="footer">
+      <el-pagination style="margin: -10px;"
+                     @size-change="handleSizeChange"
+                     @current-change="handleCurrentChange"
+                     :current-page="currpage"
+                     :page-sizes="[10, 15, 20]"
+                     :page-size="size"
+                     layout="total, sizes, prev, pager, next, jumper"
+                     :total="totalsize">
+      </el-pagination>
+    </template>
+    <!-- </div> -->
+  </d2-container>
+</template>
+
+<script>
+import { searchdatayx } from '@/api/instrumentroom'
+export default {
+  name: 'instrument',
+  data () {
+    return {
+      name: '',
+      totalsize: 0,
+      currpage: 1,
+      size: 10,
+      activities: [],
+      search: {},
+      InstrumenName: '',
+      InstrumenCode: '',
+      paramid: '',
+      CreateBy: '',
+      starttime: null,
+      endtime: null,
+      CreateOn: [], // 录入时期
+      // 列表排序
+      Column: {
+        Order: '',
+        Prop: ''
+      }
+    }
+  },
+  mounted () {
+    // searchdatayx()
+    // if (this.$route.query.id) {
+    // this.paramid = '347'
+    // }
+    this.searchdata()
+  },
+  methods: {
+    // 初始化列表数据
+    searchdata () {
+      let _this = this
+      // let paramid
+      let params = {
+        _currentPage: this.currpage,
+        _size: this.size,
+        InstrumenCode: this.search.InstrumenCode,
+        CreateBy: this.search.CreateBy,
+        paramid: this.paramid,
+        Order: this.Column.Order,
+        Prop: this.Column.Prop
+      }
+      if (this.CreateOn && this.CreateOn.length === 2) {
+        let params2 = {
+          CreateOnstart: this.CreateOn[0] / 1000,
+          CreateOnend: this.CreateOn[1] / 1000
+        }
+        params = Object.assign(params2)
+      }
+      searchdatayx(params)
+        .then(function (response) {
+          _this.activities = response.info.items
+
+          _this.totalsize = response.info.currentItemCount
+        })
+        .catch(function (error) {
+          console.log(error)
+        })
+    },
+    handleSizeChange (val) {
+      this.size = val
+      this.currpage = 1
+      this.searchdata()
+    },
+    handleCurrentChange (val) {
+      this.currpage = val
+      this.searchdata()
+    },
+    jstimehandle (val) {
+      if (val === '') {
+        return '----'
+      } else if (val === '0001-01-01T08:00:00+08:00') {
+        return '----'
+      } else if (val === '5000-01-01T23:59:59+08:00') {
+        return '永久'
+      } else {
+        if (val === '0001-01-01T00:00:00Z') {
+          return '----'
+        } else val = val.replace('T', ' ')
+        return val.substring(0, 19)
+      }
+    },
+    // 删除设备信息
+    deleteinstrument (val) {
+      let _this = this
+      _this
+        .$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '关闭',
+          type: 'warning'
+        })
+        .then(() => {
+          this.$axios
+            .delete('/instrument/deleteinstrumenrunrecord/' + val.Id)
+            .then(function (response) {
+              // response
+              if (response.data.code === 0) {
+                _this.$message({
+                  type: 'success',
+                  message: response.data.message
+                })
+                // 更新界面
+                _this.searchdata()
+              } else {
+                _this.$message({
+                  type: 'warning',
+                  message: response.data.message
+                })
+              }
+            })
+            .catch(function (error) {
+              console.log(error)
+            })
+        })
+        .catch(() => { })
+    },
+    // 列表排序功能
+    orderby (column) {
+      if (column.order === 'ascending') {
+        this.Column.Order = 'asc'
+      } else if (column.order === 'descending') {
+        this.Column.Order = 'desc'
+      }
+      this.Column.Prop = column.prop
+      this.searchdata()
+    },
+    clearSearch () {
+      this.search.InstrumenCode = ''
+      this.search.CreateBy = ''
+      this.CreateOn = []
+      this.searchdata()
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+.el-pagination {
+  margin: 1rem 0 2rem;
+  text-align: right;
+}
+
+.plab {
+  font-size: 13px;
+  color: #999;
+}
+</style>

+ 383 - 0
frontend_web/src/views/instrument/maintainlog/_opera/add.vue

@@ -0,0 +1,383 @@
+<template>
+  <div>
+    <el-dialog title="添加记录"
+               :visible.sync="dialogvisible"
+               width="50%"
+               :before-close="handleCloseAdd">
+      <el-form size="mini"
+               :model="testlistform"
+               :rules="rulestestlistform"
+               label-width="130px"
+               height="600px"
+               ref="testlistform">
+        <el-row :gutter="20"
+                class="donorsaddformcss">
+
+          <el-col :span="24">
+            <el-form-item label="设备名称"
+                          required
+                          prop="InstrumenId"
+                          label-width="80px">
+              <el-select ref="InstrumenId"
+                         v-model="testlistform.InstrumenId"
+                         placeholder="设备名称"
+                         style="width: 100%">
+                <el-option v-for="item in InstrumenNamelist"
+                           :key="item.id"
+                           :label="item.name"
+                           :value="item.id">
+                  <span style="float: left">{{ item.name }}</span>
+                  <span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}&nbsp;{{item.brand}}&nbsp;{{item.model}}</span>
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="24">
+            <el-form-item label="操作人"
+                          required
+                          prop="OperaUser"
+                          label-width="80px">
+              <el-input v-model="testlistform.OperaUser"
+                        placeholder="请输入操作人"
+                        style="width:100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="24">
+            <el-form-item label="操作类型"
+                          required
+                          prop="OperaTpye"
+                          label-width="80px">
+              <el-select ref="reftube"
+                         v-model="testlistform.OperaTpye"
+                         placeholder="请输入操作类型"
+                         style="width:100%">
+                <el-option v-for="item in classificationlist"
+                           :label="item.Value"
+                           :value="item.Value"
+                           :key="item.Id">
+                </el-option>
+              </el-select>
+
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="24">
+            <el-form-item label="操作日期"
+                          label-width="80px"
+                          prop="OperaOn">
+              <el-date-picker v-model="testlistform.OperaOn"
+                              type="datetime"
+                              style="width:100%"
+                              placeholder="请选择操作日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="24">
+            <el-form-item label="操作说明"
+                          label-width="80px">
+              <el-input v-model="testlistform.OperaRemark"
+                        type="textarea"
+                        :rows=3
+                        placeholder="请输入操作说明"
+                        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"
+                         style="width: 100px"
+                         @click="maintainlogattr()">上传附件</el-button>
+            </el-form-item>
+          </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"
+                        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">
+        <el-button size="mini"
+                   type="primary"
+                   @click="getInstrumenCode('testlistform')">保存</el-button>
+        <el-button size="mini"
+                   @click="handleCloseAdd">关闭</el-button>
+      </span>
+    </el-dialog>
+
+    <maintainlogdialog @close="attachmentclose"
+                       :attrinfo="attrinfo"
+                       :visible.sync="dialoguploadVisible"
+                       :modal="false"></maintainlogdialog>
+  </div>
+</template>
+
+<script>
+// import {
+//   mapGetters
+// } from 'vuex'
+import {
+  maintainsavedata,
+  OperaTpyelist,
+  selectinstrument,
+  InstrumenCode,
+  savedataOne
+} from '@/api/instrumentroom'
+import maintainlogdialog from '@/components/samples/maintainlogdialog'
+export default {
+  name: 'materialdetect',
+  components: {
+    maintainlogdialog
+  },
+  data () {
+    return {
+      dialogvisible: false,
+      waituploads: [], // 等待上传的附件列表
+      formtype: '1',
+      dialoguploadVisible: false, // 上传附 件
+      testlistform: {
+        InstrumenId: '',
+        InstrumenName: '',
+        InstrumenCode: '',
+        OperaRemark: '',
+        OperaTpye: '',
+        OperaUser: '',
+        OperaOn: new Date(),
+        uploadeds: [], // 已上传的附件
+        TypeCode: 2 // 1 确认及报废  2 维护保养
+      },
+      attrinfo: {
+        ID: 0
+      }, // 附件参数信息
+      ID: '',
+      InstrumenNamelist: [],
+      maintainlogattrlist: [],
+      classificationlist: [],
+
+      rulestestlistform: {
+
+        InstrumenId: [{
+          required: true,
+          message: '请输入设备名称',
+          trigger: 'blur'
+        }],
+        OperaTpye: [{
+          required: true,
+          message: '请输入操作类型',
+          trigger: 'blur'
+        }],
+        OperaUser: [{
+          required: true,
+          message: '请输入操作人',
+          trigger: 'blur'
+        }],
+        OperaOn: [{
+          required: true,
+          message: '请输入品牌名称',
+          trigger: 'blur'
+        }]
+
+      }
+    }
+  },
+  mounted () {
+    selectinstrument()
+    InstrumenCode()
+    if (this.$route.query.pid) {
+      let pid = parseInt(this.$route.query.pid)
+      if (pid > 0) {
+        this.testlistform.InstrumenId = pid
+      }
+    }
+    // this.getOperaTpyelist()
+    this.getselectinstrument()
+  },
+  methods: {
+    // 保存
+    savedata () {
+      let _this = this
+      _this.testlistform.TypeCode = 2
+      _this.testlistform.InstrumenName = _this.$refs.InstrumenId.selectedLabel
+      _this.testlistform.InstrumenId = parseInt(_this.testlistform.InstrumenId)
+      maintainsavedata(_this.testlistform)
+        // _this.$axios.post('instrument/addinstrumenMaintainLog', _this.testlistform)
+        .then(res => {
+          // response
+          if (res.info.code === 0) {
+            if (this.maintainlogattrlist !== '') {
+              _this.savedataOne(res.info.item)
+            }
+
+            _this.$message({
+              type: 'success',
+              message: res.info.message
+            })
+          } else {
+            _this.$message({
+              type: 'warning',
+              message: res.info.message
+            })
+          }
+          this.handleCloseAdd()
+        })
+        .catch(err => {
+          // handle error
+          console.error(err)
+        })
+    },
+    getOperaTpyelist () {
+      // 获取样本单位
+      let _this = this
+      let params = {
+        code: 'OperaTpye'
+      }
+      OperaTpyelist(params)
+        // _this.$axios.get('/items/worditem?code=OperaTpye', {})
+        .then(res => {
+          _this.classificationlist = res.info
+        })
+    },
+    // 上传附件
+    maintainlogattr () {
+      let _this = this
+      _this.attrinfo.ID = _this.ID
+      _this.dialoguploadVisible = true
+    },
+    attachmentclose (attrlist) {
+      let _this = this
+      for (let i = 0; i < attrlist.length; i++) {
+        _this.maintainlogattrlist.push(attrlist[i])
+      }
+    },
+    // 获取设备名称下拉
+    getselectinstrument () {
+      let _this = this
+      selectinstrument()
+        // _this.$axios.get('/instrument/selectlist', {})
+        .then(res => {
+          // response
+          _this.InstrumenNamelist = res.info.items
+        })
+    },
+    // 根据设备名称ID查询 设备编号
+    getInstrumenCode (formName) {
+      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
+              _this.savedata()
+            })
+            .catch(err => {
+              // handle error
+              console.error(err)
+            })
+        } else {
+          return false
+        }
+      })
+    },
+    // 保存附件
+    savedataOne (pid) {
+      let _this = this
+      let params = {
+        AttachmodelList: _this.maintainlogattrlist,
+        MaintainLogId: pid
+
+      }
+      savedataOne(params)
+        // _this.$axios.put('/instrument/savesampleattach', params)
+        .then(res => {
+          if (res.info.code === 0) {
+            _this.$message({
+              type: 'success',
+              message: res.info.message
+            })
+          } else {
+            _this.$message({
+              type: 'warning',
+              message: res.info.message
+            })
+          }
+        })
+        .catch(() => { })
+    },
+
+    deletedata (index) {
+      let _this = this
+      _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '关闭',
+        type: 'warning'
+      })
+        .then(() => {
+          this.maintainlogattrlist.splice(index, 1)
+        })
+        .catch(() => { })
+    },
+    handleCloseAdd () {
+      this.$emit('closeAddDialog')
+      this.testlistform.InstrumenId = ''
+      this.testlistform.OperaUser = ''
+      this.testlistform.OperaTpye = ''
+      this.testlistform.OperaRemark = ''
+      this.maintainlogattrlist = ''
+      this.$refs['testlistform'].resetFields()
+    }
+  }
+}
+
+</script>
+
+<style lang="scss">
+.button {
+  padding: 0;
+  float: right;
+}
+
+.donorsaddformcss .el-col-8 {
+  height: 58px;
+}
+
+.maintainlog div {
+  margin-top: -4px;
+  color: #4f94cd;
+  cursor: pointer;
+}
+
+.maintainlog div span {
+  float: right;
+}
+</style>

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

@@ -0,0 +1,418 @@
+<template>
+  <div>
+    <el-dialog title="编辑记录"
+               :visible.sync="dialogvisible"
+               width="50%"
+               :before-close="handleCloseEdit">
+      <el-form size="mini"
+               :model="testlistform"
+               :rules="rulestestlistform"
+               label-width="130px"
+               height="600px"
+               ref="testlistform">
+        <el-row :gutter="20"
+                class="donorsaddformcss">
+
+          <el-col :span="24">
+            <el-form-item label="设备名称"
+                          required
+                          prop="InstrumenId"
+                          label-width="80px">
+              <el-select ref="InstrumenId"
+                         disabled
+                         v-model="testlistform.InstrumenId"
+                         placeholder="设备名称"
+                         style="width: 100%">
+                <el-option v-for="item in InstrumenNamelist"
+                           :key="item.id"
+                           :label="item.name"
+                           :value="item.id">
+                  <span style="float: left">{{ item.name }}</span>
+                  <span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}&nbsp;{{item.brand}}&nbsp;{{item.model}}</span>
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="24">
+            <el-form-item label="操作人"
+                          required
+                          prop="OperaUser"
+                          label-width="80px">
+              <el-input v-model="testlistform.OperaUser"
+                        placeholder="请输入操作人"
+                        style="width:100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="24">
+            <el-form-item label="操作类型"
+                          required
+                          prop="OperaTpye"
+                          label-width="80px">
+              <el-select ref="reftube"
+                         v-model="testlistform.OperaTpye"
+                         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="24">
+            <el-form-item label="操作日期"
+                          label-width="80px"
+                          prop="OperaOn">
+              <el-date-picker v-model="testlistform.OperaOn"
+                              type="datetime"
+                              style="width:100%"
+                              placeholder="请选择操作日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="24">
+            <el-form-item label="操作说明"
+                          label-width="80px">
+              <el-input v-model="testlistform.OperaRemark"
+                        type="textarea"
+                        :rows=3
+                        placeholder="请输入操作说明"
+                        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>
+      <span slot="footer">
+        <el-button size="mini"
+                   type="primary"
+                   @click="getInstrumenCode('testlistform')">保存</el-button>
+        <el-button size="mini"
+                   @click="handleCloseEdit">关闭</el-button>
+      </span>
+    </el-dialog>
+    <maintainlogdialog @close="attachmentclose"
+                       :attrinfo="attrinfo"
+                       :visible.sync="dialoguploadVisible"></maintainlogdialog>
+  </div>
+</template>
+
+<script>
+import {
+  OperaTpyelist,
+  selectinstrument,
+  DonorsInfoAttachment,
+  initDatamaintainlog,
+  savedataOne,
+  saveeditmaintainlog,
+  InstrumenCode,
+  deleteInstrument
+} from '@/api/instrumentroom'
+import maintainlogdialog from '@/components/samples/maintainlogdialog'
+export default {
+  name: 'materialdetect',
+  props: {
+    maintainlogId: {
+      type: Number,
+      default: 0
+    }
+  },
+  components: {
+    maintainlogdialog
+  },
+  // watch: {
+  //   'maintainlogId': function (newVal) {
+  //     this.initData(newVal)
+  //   }
+  // },
+  data () {
+    return {
+      MaintainLogId: 0,
+      dialogvisible: false,
+      list: [],
+      waituploads: [], // 等待上传的附件列表
+      formtype: '1',
+      dialoguploadVisible: false, // 上传附 件
+      testlistform: {
+        InstrumenId: '',
+        InstrumenName: '',
+        InstrumenCode: '',
+        OperaRemark: '',
+        OperaTpye: '',
+        OperaUser: '',
+        OperaOn: new Date(),
+        uploadeds: [] // 已上传的附件
+      },
+      attrinfo: {
+        ID: 0
+      }, // 附件参数信息
+      ID: '',
+      InstrumenNamelist: [],
+      maintainlogattrlist: [],
+      classificationlist: [],
+
+      rulestestlistform: {
+
+        InstrumenId: [{
+          required: true,
+          message: '请输入设备名称',
+          trigger: 'blur'
+        }],
+        OperaTpye: [{
+          required: true,
+          message: '请输入操作类型',
+          trigger: 'blur'
+        }],
+        OperaUser: [{
+          required: true,
+          message: '请输入操作人',
+          trigger: 'blur'
+        }],
+        OperaOn: [{
+          required: true,
+          message: '请输入品牌名称',
+          trigger: 'blur'
+        }]
+
+      }
+    }
+  },
+  mounted () {
+    // this.getOperaTpyelist()
+    this.getselectinstrument()
+  },
+  methods: {
+    // 保存
+    savedata () {
+      let _this = this
+      saveeditmaintainlog(_this.testlistform.Id, _this.testlistform)
+        // _this.$axios.put('/instrument/saveeditmaintainlog/' + _this.testlistform.Id, _this.testlistform)
+        .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',
+                message: res.info.message
+              })
+            }
+          } else {
+            _this.$message({
+              type: 'warning',
+              message: res.info.message
+            })
+          }
+          this.handleCloseEdit()
+        })
+        .catch(err => {
+          // handle error
+          console.error(err)
+        })
+    },
+    // 保存
+    getInstrumenCode (formName) {
+      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
+              _this.savedata()
+            })
+            .catch(err => {
+              // handle error
+              console.error(err)
+            })
+        } else {
+          return false
+        }
+      })
+    },
+    initData (pid) {
+      let _this = this
+      initDatamaintainlog(pid)
+        .then(function (response) {
+          _this.testlistform = response.info
+        })
+    },
+    getOperaTpyelist () {
+      // 获取样本单位
+      let _this = this
+      let params = {
+        code: 'OperaTpye'
+      }
+      OperaTpyelist(params)
+        // _this.$axios.get('/items/worditem?code=OperaTpye', {})
+        .then(res => {
+          _this.classificationlist = res.info
+        })
+    },
+    // 上传附件
+    maintainlogattr () {
+      let _this = this
+      _this.attrinfo.ID = _this.ID
+      _this.dialoguploadVisible = true
+    },
+    attachmentclose (attrlist) {
+      let _this = this
+      for (let i = 0; i < attrlist.length; i++) {
+        _this.maintainlogattrlist.push(attrlist[i])
+      }
+    },
+    // 获取设备名称下拉
+    getselectinstrument () {
+      let _this = this
+      selectinstrument()
+        // _this.$axios.get('/instrument/selectlist', {})
+        .then(res => {
+          // response
+          _this.InstrumenNamelist = res.info.items
+        })
+    },
+
+    // 保存附件
+    savedataOne (pid) {
+      let _this = this
+      let params = {
+        AttachmodelList: _this.maintainlogattrlist,
+        MaintainLogId: pid
+      }
+      savedataOne(params)
+        // _this.$axios.put('/instrument/savesampleattach', params)
+        .then(res => {
+          if (res.info.code === 0) {
+            _this.$message({
+              type: 'success',
+              message: res.info.message
+            })
+          } else {
+            _this.$message({
+              type: 'warning',
+              message: res.info.message
+            })
+          }
+        })
+        .catch(() => { })
+    },
+    // 返回
+    handleCloseEdit () {
+      this.$emit('closeAddDialog')
+      this.$refs['testlistform'].resetFields()
+    },
+    deletedata (index) {
+      let _this = this
+      _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '关闭',
+        type: 'warning'
+      })
+        .then(() => {
+          this.maintainlogattrlist.splice(index, 1)
+        })
+        .catch(() => { })
+    },
+    // 获取附件
+    getDonorsInfoAttachment (pid) {
+      let _this = this
+      _this.maintainlogattrlist = []
+      DonorsInfoAttachment(pid)
+        .then(res => {
+          _this.list = res.info.items
+          if (_this.list !== null) {
+            for (let i = 0; i < _this.list.length; i++) {
+              // hivfujian
+              _this.maintainlogattrlist.push(_this.list[i])
+            }
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+    },
+    clickachment (host, fid) {
+      window.open(`http://${host}/${fid}`)
+    },
+    // 根据维护记录表Id删除质量附件表
+    deleteinstrument () {
+      // let _this = this
+      deleteInstrument(this.maintainlogId)
+        // this.$axios.delete('/instrument/maintainLogAttachmentdeletearrt/' + this.operaid)
+        .then(function (response) {
+        })
+        .catch(function (error) {
+          console.log(error)
+        })
+    }
+  }
+
+}
+
+</script>
+
+<style lang="scss">
+.button {
+  padding: 0;
+  float: right;
+}
+
+.donorsaddformcss .el-col-8 {
+  height: 58px;
+}
+
+.maintainlog div {
+  margin-top: -4px;
+  color: #4f94cd;
+  cursor: pointer;
+}
+
+.maintainlog div span {
+  float: right;
+}
+</style>

+ 374 - 0
frontend_web/src/views/instrument/maintainlog/index.vue

@@ -0,0 +1,374 @@
+<template>
+  <d2-container>
+    <template slot="header"
+              style="padding: 5px;">
+      <el-form size="mini"
+               ref="form"
+               :inline="true"
+               class="sbutton_padding"
+               style=" margin-top: -7px;text-align:right;">
+
+        <el-form-item label="设备名称"
+                      class="sbutton_margin">
+          <el-input style="width: 140px;"
+                    v-model="search.InstrumenName"
+                    placeholder="请输入设备名称"></el-input>
+        </el-form-item>
+        <el-form-item label="操作类型"
+                      class="sbutton_margin">
+          <el-select v-model="search.OperaTpye"
+                     placeholder="请输入操作类型"
+                     clearable
+                     style="width:140px;">
+            <el-option v-for="item in classificationlist"
+                       :label="item.Value"
+                       :value="item.Value"
+                       :key="item.Value"></el-option>
+          </el-select>
+        </el-form-item>
+        <!-- <el-form-item label="操作人">
+          <el-input v-model="search.OperaUser"
+                    style="width: 165px;"
+                     
+                    placeholder="输入操作人"></el-input>
+        </el-form-item> -->
+        <el-col :span="6"></el-col>
+        <el-form-item label="操作日期"
+                      class="sbutton_margin">
+          <el-date-picker style="width:220px"
+                          v-model="OperaOn"
+                          type="daterange"
+                          range-separator="至"
+                          start-placeholder="开始日期"
+                          end-placeholder="结束日期"></el-date-picker>
+        </el-form-item>
+        <el-button size="mini"
+                   type="primary"
+                   style="margin-left:10px;"
+                   @click="searchdata()"
+                   class="sbutton_margin">查 询</el-button>
+        <el-button size="mini"
+                   type="primary"
+                   @click="clearSearch"
+                   class="sbutton_margin">重 置</el-button>
+        <el-button size="mini"
+                   type="primary"
+                   style="margin-right:6px;"
+                   @click="maintainlogadd()"
+                   class="sbutton_margin">添加</el-button>
+      </el-form>
+    </template>
+    <el-table ref="multipleTable"
+              :data="activities"
+              border
+              stripe
+              tooltip-effect="dark"
+              @sort-change="orderby"
+              height="100%">
+      <el-table-column label="操作"
+                       align="center"
+                       width="100px"
+                       fixed='right'>
+        <template slot-scope="scope">
+          <el-button size="mini"
+                     type="primary"
+                     title="编辑"
+                     @click="editmaintain(scope.row.Id)"
+                     icon="el-icon-edit"
+                     circle></el-button>
+          <el-button size="mini"
+                     @click="deleteinstrument(scope.row)"
+                     type="danger"
+                     title="删除"
+                     style="margin-left:5px"
+                     icon="el-icon-delete"
+                     circle></el-button>
+        </template>
+      </el-table-column>
+
+      <el-table-column prop="InstrumenCode"
+                       align="center"
+                       min-width="160px"
+                       label="设备编号"
+                       show-overflow-tooltip></el-table-column>
+      <el-table-column prop="InstrumenName"
+                       align="center"
+                       min-width="120px"
+                       label="设备名称"
+                       show-overflow-tooltip></el-table-column>
+      <el-table-column prop="OperaTpye"
+                       align="center"
+                       min-width="120px"
+                       label="操作类型"
+                       show-overflow-tooltip></el-table-column>
+      <el-table-column prop="OperaOn"
+                       sortable
+                       label="操作日期"
+                       min-width="120px"
+                       align="center"
+                       show-overflow-tooltip
+                       width="180">
+        <template slot-scope="scope">{{ jstimehandle(scope.row.OperaOn +'') }}</template>
+      </el-table-column>
+      <el-table-column prop="OperaUser"
+                       align="center"
+                       min-width="120px"
+                       label="操作人"
+                       show-overflow-tooltip></el-table-column>
+      <el-table-column prop="OperaRemark"
+                       align="center"
+                       min-width="160px"
+                       label="维护说明"
+                       show-overflow-tooltip
+                       width="300"></el-table-column>
+    </el-table>
+    <!-- </el-card> -->
+    <addmaintainlog ref="addmaintain"
+                    @closeAddDialog="handleCloseAdd"></addmaintainlog>
+    <editmiantainlog ref="editmaintainlog"
+                     @closeAddDialog="handleCloseEdit"
+                     :maintainlogId="selectedMaintainLogId"></editmiantainlog>
+    <!-- </div> -->
+    <template slot="footer">
+      <el-pagination style="margin: -10px;"
+                     @size-change="handleSizeChange"
+                     @current-change="handleCurrentChange"
+                     :current-page="currpage"
+                     :page-sizes="[10, 15, 20]"
+                     :page-size="size"
+                     layout="total, sizes, prev, pager, next, jumper"
+                     :total="totalsize">
+      </el-pagination>
+    </template>
+  </d2-container>
+</template>
+
+<script>
+import {
+  searchdatazl,
+  OperaTpyelist,
+  deleteinstrumentzl
+} from '@/api/instrumentroom'
+import addmaintainlog from './_opera/add'
+import editmiantainlog from './_opera/edit'
+export default {
+  components: {
+    addmaintainlog,
+    editmiantainlog
+  },
+  name: 'instrument',
+  data () {
+    return {
+      selectedMaintainLogId: 0,
+      dialogvisible: false,
+      name: '',
+      totalsize: 0,
+      currpage: 1,
+      size: 10,
+      OperaOn: [], // 录入时期
+      activities: [],
+      search: {
+        InstrumenName: '',
+        InstrumenCode: '',
+        OperaTpye: '',
+        OperaUser: ''
+      },
+      classificationlist: [],
+      InstrumenName: '',
+      InstrumenCode: '',
+      addparam: '',
+      paramid: '',
+      OperaUser: '',
+      // 列表排序
+      Column: {
+        Order: '',
+        Prop: ''
+      }
+    }
+  },
+  mounted () {
+    // if (this.$route.query.id) {
+    //   this.addparam = '?pid=' + this.$route.query.id
+    //   this.paramid = this.$route.query.id
+    //   this.search.InstrumenCode = ''
+    //   this.search.InstrumenName = ''
+    // }
+    this.searchdata()
+    // this.getOperaTpyelist()
+  },
+  methods: {
+    // 获取所有的维护保养记录
+    getDataList () {
+
+    },
+    maintainlogadd () {
+      this.$refs.addmaintain.dialogvisible = true
+    },
+    editmaintain (maintainlogId) {
+      this.$refs.editmaintainlog.getDonorsInfoAttachment(maintainlogId)
+      this.$refs.editmaintainlog.dialogvisible = true
+      this.$refs.editmaintainlog.initData(maintainlogId)
+      this.selectedMaintainLogId = maintainlogId
+    },
+    // 添加  返回当前页面
+    handleCloseAdd () {
+      this.$refs.addmaintain.dialogvisible = false
+      this.searchdata()
+    },
+    // 编辑  返回当前页面
+    handleCloseEdit () {
+      this.$refs.editmaintainlog.dialogvisible = false
+      this.searchdata()
+    },
+    // 初始化列表数据
+    searchdata () {
+      let _this = this
+      let OperaOn = []
+      // let paramid
+      if (!_this.OperaOn) {
+        _this.OperaOn = []
+      }
+      // 解析时间
+      if (_this.OperaOn.length === 2) {
+        _this.OperaOn[1].setHours(23)
+        _this.OperaOn[1].setMinutes(59)
+        _this.OperaOn[1].setSeconds(59)
+        OperaOn.push(_this.formatDateTime(_this.OperaOn[0]))
+        OperaOn.push(_this.formatDateTime(_this.OperaOn[1]))
+      }
+      let params = {
+        _currentPage: this.currpage,
+        _size: this.size,
+        InstrumenCode: this.search.InstrumenCode,
+        InstrumenName: this.search.InstrumenName,
+        OperaTpye: this.search.OperaTpye,
+        OperaUser: this.search.OperaUser,
+        paramid: this.paramid,
+        Order: this.Column.Order,
+        Prop: this.Column.Prop,
+        TypeCode: 2
+      }
+      searchdatazl(params)
+
+        .then(function (response) {
+          _this.activities = response.info.items
+          _this.totalsize = response.info.currentItemCount
+        })
+        .catch(function (error) {
+          console.log(error)
+        })
+    },
+    // 清除查询条件
+
+    handleSizeChange (val) {
+      this.size = val
+      this.currpage = 1
+      this.searchdata()
+    },
+    handleCurrentChange (val) {
+      this.currpage = val
+      this.searchdata()
+    },
+    jstimehandle (val) {
+      if (val === '') {
+        return '----'
+      } else if (val === '0001-01-01T08:00:00+08:00') {
+        return '----'
+      } else if (val === '5000-01-01T23:59:59+08:00') {
+        return '永久'
+      } else {
+        if (val === '0001-01-01T00:00:00Z') {
+          return '----'
+        } else val = val.replace('T', ' ')
+        return val.substring(0, 19)
+      }
+    },
+    // 删除设备信息
+    deleteinstrument (val) {
+      let _this = this
+      _this
+        .$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '关闭',
+          type: 'warning'
+        })
+        .then(() => {
+          deleteinstrumentzl(val.Id)
+            .then(function (response) {
+              // response
+              if (response.info.code === 0) {
+                _this.$message({
+                  type: 'success',
+                  message: response.info.message
+                })
+                // 更新界面
+                _this.searchdata()
+              } else {
+                _this.$message({
+                  type: 'warning',
+                  message: response.info.message
+                })
+              }
+            })
+            .catch(function (error) {
+              console.log(error)
+            })
+        })
+        .catch(() => { })
+    },
+    // getOperaTpyelist () {
+    //   // 获取样本单位
+    //   let _this = this
+    //   let params = {
+
+    //     code: 'OperaTpye'
+    //   }
+    //   OperaTpyelist(params)
+    //     .then(res => {
+    //       _this.classificationlist = res.info
+    //     })
+    // },
+    // 列表排序功能
+    orderby (column) {
+      if (column.order === 'ascending') {
+        this.Column.Order = 'asc'
+      } else if (column.order === 'descending') {
+        this.Column.Order = 'desc'
+      }
+      this.Column.Prop = column.prop
+      this.searchdata()
+    },
+    formatDateTime (date) {
+      var y = date.getFullYear()
+      var m = date.getMonth() + 1
+      m = m < 10 ? '0' + m : m
+      var d = date.getDate()
+      d = d < 10 ? '0' + d : d
+      // var h = date.getHours();
+      // var minute = date.getMinutes();
+      // minute = minute < 10 ? ('0' + minute) : minute;
+      return y + '-' + m + '-' + d // + ' ' + h + ':' + minute;
+    },
+    clearSearch () {
+      this.search.InstrumenCode = ''
+      this.search.InstrumenName = ''
+      this.search.OperaTpye = ''
+      this.search.OperaUser = ''
+      this.OperaOn = []
+      this.searchdata()
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+.el-pagination {
+  margin: 1rem 0 2rem;
+  text-align: right;
+}
+
+.plab {
+  font-size: 13px;
+  color: #999;
+}
+</style>