panhui 7 jaren geleden
bovenliggende
commit
e09f54f15f

+ 1 - 1
src/main/vue/src/pages/HandleApproach.vue

@@ -221,7 +221,7 @@ export default {
         }
         else {
           this.$message({
-            message: '场信息录入成功',
+            message: '场信息录入成功',
             type: 'warning'
           });
           this.formData.cowID = ''

+ 23 - 5
src/main/vue/src/pages/HandleBlindMilk.vue

@@ -220,17 +220,32 @@ export default {
         // console.log(data)
         data = this.JsonSort(['牛号', '当前牛舍'], data)
         var list = []
-        Object.keys(data).forEach(item => {
-          list.push({
-            key: item,
-            value: data[item]
+       list.push({
+            key: '牛号',
+            value:data['牛号']
+          })
+         list.push({
+            key: '左前乳区状态',
+            value:'正常'
+          })
+           list.push({
+            key: '右前乳区状态',
+            value:'正常'
+          })
+           list.push({
+            key: '左后乳区状态',
+            value:'正常'
+          })
+           list.push({
+            key: '右后乳区状态',
+            value:'正常'
           })
-        })
 
 
         if (data['左前乳区状态'] == 'true') {
           this.statusList[0].value = true
           this.statusList[0].befor = true
+          list[1].value='盲乳'
         }
         else {
           this.statusList[0].value = false
@@ -241,6 +256,7 @@ export default {
         if (data['右前乳区状态'] == 'true') {
           this.statusList[1].value = true
           this.statusList[1].befor = true
+           list[2].value='盲乳'
         }
         else {
           this.statusList[1].value = false
@@ -251,6 +267,7 @@ export default {
         if (data['左后乳区状态'] == 'true') {
           this.statusList[2].value = true
           this.statusList[2].befor = true
+           list[3].value='盲乳'
         }
         else {
           this.statusList[2].value = false
@@ -261,6 +278,7 @@ export default {
         if (data['右后乳区状态'] == 'true') {
           this.statusList[3].value = true
           this.statusList[3].befor = true
+           list[4].value='盲乳'
         }
         else {
           this.statusList[3].value = false

+ 8 - 9
src/main/vue/src/pages/HandleCalving.vue

@@ -4,9 +4,8 @@
             <div class="contentTitle">{{pageTitle}}</div>
             <el-form ref="form" :model="formData" label-width="80px" style="margin-top:20px;">
                 <el-form-item label="" label-width="0">
-                    <el-input v-model="formData.cowID" prefix-icon="el-icon-search" style="width:300px" maxlength="8" clearable></el-input>
-                    <el-button type="primary" @click="getNowCow" style="width:90px;margin-left:12px">确认</el-button>
-                </el-form-item>
+                     <el-autocomplete prefix-icon="el-icon-search" v-model="formData.cowID" :fetch-suggestions="queryCow" placeholder="请输入牛号" style="width:300px" clearable @select="getNowCow"></el-autocomplete>
+       </el-form-item>
                 <div class="sub" v-if="tableData.length>0">
                     操作牛号:{{editCowInfo['牛号']}}
                 </div>
@@ -116,12 +115,12 @@ export default {
         },
     },
     watch: {
-        'formData.cowID'() {
-            if (this.formData.cowID.length != 8) {
-                return
-            }
-            this.getNowCow()
-        },
+        // 'formData.cowID'() {
+        //     if (this.formData.cowID.length != 8) {
+        //         return
+        //     }
+        //     this.getNowCow()
+        // },
         'formData.num'() {
             setTimeout(() => {
                 this.formData.describe = this.describeList[0]

+ 6 - 2
src/main/vue/src/pages/HandleTreatment.vue

@@ -50,11 +50,11 @@
         </el-form-item>-->
         <el-row>
           <el-table class="handleTable" border :data="drugList" style="width: 100%" size="mini">
-            <el-table-column prop="药品编号" label="编号" fixed="left" align="center"></el-table-column>
+            <el-table-column prop="药品编号" label="编号" fixed="left" align="center" width="120" :show-overflow-tooltip='true'></el-table-column>
             <el-table-column prop="药品名称" label="药品名称" align="center"></el-table-column>
             <el-table-column prop="剂量" label="用量" align="center"></el-table-column>
             <el-table-column prop="使用方法" label="用法" align="center"></el-table-column>
-            <el-table-column prop="医嘱" label="医嘱" align="center"></el-table-column>
+            <el-table-column prop="医嘱" label="医嘱" align="center"  :show-overflow-tooltip='true' width='120'></el-table-column>
           </el-table>
         </el-row>
         <el-row style="margin:10px 0 20px;">
@@ -686,12 +686,15 @@ export default {
       })
     },
     getNowCow() {
+    
 
       this.getHaleInfo('wsCow', 'getCowExtendInfoByCowID', [
         this.formData.cowID, 3
       ], 'json').then((data) => {
         this.editCowInfo = data
         // console.log(data)
+      
+        console.log(data)
         var list = []
         Object.keys(data).forEach(item => {
           list.push({
@@ -764,6 +767,7 @@ export default {
         "veterinary": this.$store.state.userInfo.username,
       }
       var list = []
+        row=this.JsonSort( [ '牛号','当前牛舍','繁殖状态','发病日期'], row)
       Object.keys(row).forEach(item => {
         list.push({
           key: item,

+ 87 - 83
src/main/vue/src/pages/Login.vue

@@ -1,95 +1,99 @@
 <template>
-    <div class="container" :style="{backgroundImage :'url(' + require('../assets/bg_login.jpg') + ')'}">
-        <div class="login-wrapper" @keyup.enter="login">
-            <div class="title">欢迎登录</div>
-            <el-form :model="userInfo" style="width: 350px" ref="form">
-                <el-form-item prop="username" :rules="{required: true, message: '请输入用户名', trigger: 'blur'}">
-                    <el-input v-model="userInfo.username" placeholder="用户名"></el-input>
-                </el-form-item>
-                <el-form-item prop="password" :rules="{required: true, message: '请输入密码', trigger: 'blur'}">
-                    <el-input v-model="userInfo.password" placeholder="密码" type="password"></el-input>
-                </el-form-item>
-                <el-form-item label="记住我">
-                    <el-switch v-model="rememberMe"></el-switch>
-                </el-form-item>
-                <el-form-item>
-                    <el-button :loading="loading" @click="login" type="primary" style="width: 100%;">登录</el-button>
-                </el-form-item>
-            </el-form>
-        </div>
+  <div class="container" :style="{backgroundImage :'url(' + require('../assets/bg_login.jpg') + ')'}">
+    <div class="login-wrapper" @keyup.enter="login">
+      <div class="title">欢迎登录</div>
+      <el-form :model="userInfo" style="width: 350px" ref="form">
+        <el-form-item prop="username" :rules="{required: true, message: '请输入用户名', trigger: 'blur'}">
+          <el-input v-model="userInfo.username" placeholder="用户名"></el-input>
+        </el-form-item>
+        <el-form-item prop="password" :rules="{required: true, message: '请输入密码', trigger: 'blur'}">
+          <el-input v-model="userInfo.password" placeholder="密码" type="password"></el-input>
+        </el-form-item>
+        <el-form-item label="记住我">
+          <el-switch v-model="rememberMe"></el-switch>
+        </el-form-item>
+        <el-form-item>
+          <el-button :loading="loading" @click="login" type="primary" style="width: 100%;">登录</el-button>
+        </el-form-item>
+      </el-form>
     </div>
+  </div>
 </template>
 <script>
-    export default {
-        data() {
-            return {
-                rememberMe: false,
-                loading: false,
-                userInfo: {
-                    username: '',
-                    password: ''
-                }
+export default {
+  data() {
+    return {
+      rememberMe: false,
+      loading: false,
+      userInfo: {
+        username: '',
+        password: ''
+      }
+    }
+  },
+  methods: {
+    login() {
+      this.$store.commit('updateLoginHistory', [{
+        name: '/dashboard',
+        title: '首页'
+      }])
+      this.$refs.form.validate(valid => {
+        if (valid) {
+          this.loading = true;
+          this.$http.post({
+            url: '/auth/login',
+            data: {
+              username: this.userInfo.username,
+              password: this.userInfo.password,
+              remember: this.rememberMe
             }
-        },
-        methods: {
-            login() {
-                this.$refs.form.validate(valid => {
-                    if (valid) {
-                        this.loading = true;
-                        this.$http.post({
-                            url: '/auth/login',
-                            data: {
-                                username: this.userInfo.username,
-                                password: this.userInfo.password,
-                                remember: this.rememberMe
-                            }
-                        }).then(res => {
-                            this.loading = false;
-                            if (res.success) {
-                                this.$router.replace('/');
-                            } else {
-                                this.$message.error('登录失败');
-                            }
-                        }).catch(() => {
-                            this.loading = false;
-                        })
-                    }
-                })
+          }).then(res => {
+            this.loading = false;
+            if (res.success) {
+              this.$router.replace('/');
+            } else {
+              this.$message.error('登录失败');
             }
+          }).catch(() => {
+            this.loading = false;
+          })
         }
+      })
     }
+  }
+}
 </script>
 <style lang="less" scoped>
-    .container {
-        width: 100%;
-        height: 100%;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        background-color: #ebebeb;
-        background-image: url('https://microball.oss-cn-hangzhou.aliyuncs.com/izouma/application/rawpixel-com-565462-unsplash%20%281%29.jpg');
-        background-size: cover;
-        background-position: center;
-        background-repeat: no-repeat;
-    }
+.container {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  background-color: #ebebeb;
+  background-image: url("https://microball.oss-cn-hangzhou.aliyuncs.com/izouma/application/rawpixel-com-565462-unsplash%20%281%29.jpg");
+  background-size: cover;
+  background-position: center;
+  background-repeat: no-repeat;
+}
 
-    .login-wrapper {
-        display: flex;
-        flex-direction: column;
-        align-items: center;
-        justify-content: center;
-        border-radius: 5px;
-        background: white;
-        border: 1px #eaeaea solid;
-        position: absolute;
-        right: 100px;
-        top: 100px;
-        width: 400px;
-        .title {
-            color: #20a0ff;
-            font-weight: bold;
-            width: 350px;
-            line-height: 68px;
-        }
-    }
+.login-wrapper {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  border-radius: 5px;
+  background: white;
+  border: 1px #eaeaea solid;
+  position: absolute;
+  right: 100px;
+  top: 100px;
+  width: 400px;
+  .title {
+    color: #20a0ff;
+    font-weight: bold;
+    width: 350px;
+    line-height: 68px;
+  }
+}
 </style>