Forráskód Böngészése

前端: 去掉文件及通知模块的 版本号 一列。

baichengfei 5 éve
szülő
commit
55e5b959c2

+ 72 - 75
src/dashoo.cn/frontend_web/src/pages/documentmanage/_opera/edit.vue

@@ -35,11 +35,11 @@
               <el-date-picker type="datetime" placeholder="请选择有效期" v-model="uploadform.ValidityTime" style="width: 100%;"></el-date-picker>
             </el-form-item>
           </el-col> -->
-          <el-col :span="8">
-            <el-form-item label="版本信息" prop="VersionInfo">
-              <el-input v-model="uploadform.VersionInfo" placeholder="请输入版本信息"></el-input>
-            </el-form-item>
-          </el-col>
+          <!--<el-col :span="8">-->
+          <!--  <el-form-item label="版本信息" prop="VersionInfo">-->
+          <!--    <el-input v-model="uploadform.VersionInfo" placeholder="请输入版本信息"></el-input>-->
+          <!--  </el-form-item>-->
+          <!--</el-col>-->
           <el-col :span="8">
             <el-form-item label="类型" prop="DocTab">
               <el-select v-model="uploadform.RangeType" placeholder="请选择">
@@ -132,7 +132,7 @@
         authUser: 'authUser'
       })
     },
-    data() {
+    data () {
       var CheckDirectoryId = (rule, value, callback) => {
         if (this.JLDirectoryIds && this.JLDirectoryIds.length < 1) {
           callback(new Error('请选择文档结构'))
@@ -150,24 +150,24 @@
           label: 'ItemName',
           children: 'children'
         },
-        orgtreelist: [], //文档结构
-        JLDirectoryIds: [], //文档结构Id
+        orgtreelist: [], // 文档结构
+        JLDirectoryIds: [], // 文档结构Id
         list: [],
         // typeList: [], //文档类别列表
         uploadform: {
-          DirectoryId: '', //目录结构Id
-          Name: '', //文档名称
-          VersionInfo: '', //文档版本
-          NoticeTab: '', //通知公告标签
-          DocTab: '', //文件资料标签
+          DirectoryId: '', // 目录结构Id
+          Name: '', // 文档名称
+          VersionInfo: '', // 文档版本
+          NoticeTab: '', // 通知公告标签
+          DocTab: '', // 文件资料标签
           RangeType: '',
-          FileURL: '', //文档地址
-          ValidityTime: '', //有效期至
-          Remark: '', //备注
+          FileURL: '', // 文档地址
+          ValidityTime: '', // 有效期至
+          Remark: '' // 备注
         },
         AuthorUser: '',
         AuthorUserName: '',
-        loginDialogVisible: false, //登陆验证弹窗
+        loginDialogVisible: false, // 登陆验证弹窗
         isLoginSucceed: false,
         acceptUsers: [],
         username: '',
@@ -189,10 +189,10 @@
             trigger: 'blur'
           }],
           VersionInfo: [{
-            required: true,
+            required: false,
             message: '请填写版本信息',
             trigger: 'blur'
-          }],
+          }]
         },
         DocTaboptions: [
           {
@@ -208,18 +208,18 @@
             label: '外部'
           }
         ],
-        //标题设置
+        // 标题设置
         path: '',
         pathName: '',
-        pathName2: '',
+        pathName2: ''
       }
     },
-    created() {
+    created () {
       this.documentId = this.$route.params.opera
       this.initinfo()
     },
     methods: {
-      initinfo() {
+      initinfo () {
         let _this = this
         this.$axios.get('/document/geteditinitinfo/' + this.documentId, {})
           .then(res => {
@@ -245,11 +245,10 @@
             // _this.typeList = list
             _this.gettreelist(218)
             _this.getwendanginfo(res.data.items.FileURL)
-
           })
       },
-      //文档列表
-      getwendanginfo(iUrl) {
+      // 文档列表
+      getwendanginfo (iUrl) {
         let _this = this
         _this.maintainlogattrlist = []
         let exArr = iUrl.split('|')
@@ -259,18 +258,18 @@
         }
         _this.maintainlogattrlist.push(params)
       },
-      //获取文档结构树
-      gettreelist(pid) {
+      // 获取文档结构树
+      gettreelist (pid) {
         let _this = this
         let params = {
           pid: pid + ''
         }
         _this.$axios.get('/items/gettreeitemsdetail', {
-            params
-          })
+          params
+        })
           .then(res => {
             _this.orgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'ParentId', 'Id,ItemName')
-            //显示原来文档结构
+            // 显示原来文档结构
             let arr = []
             arr.push(_this.orgtreelist[0].id)
             arr.push(_this.orgtreelist[0].children[0].id)
@@ -281,40 +280,40 @@
             console.error(err)
           })
       },
-      clickachment(url, uid) {
+      clickachment (url, uid) {
         window.open(`http://${url}`)
       },
-      //保存编辑信息
-      save() {
+      // 保存编辑信息
+      save () {
         let _this = this
-        this.$refs["uploadform"].validate((valid) => {
+        this.$refs['uploadform'].validate((valid) => {
           if (valid) {
             if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
-              // 上传附件是否完成判断
+            // 上传附件是否完成判断
               if (!this.attachissuccess()) {
                 this.$message.error('有附件未成功上传!不能保存数据')
                 return
               }
-              //判断是否存在已上传文档
+              // 判断是否存在已上传文档
               if (_this.maintainlogattrlist.length > 0) {
                 _this.$confirm('此操作将更改现有文档, 是否继续?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                  }).then(() => {
-                    _this.getattachissuccess()
-                    _this.editdocumentinfo() //保存编辑信息
-                    _this.getwendanginfo(_this.uploadform.FileURL) //更新已有文档列表
-                    // 清空上传数据
-                    if (_this.$refs.refuploadattach) {
-                      _this.$refs.refuploadattach.clearFiles()
-                    }
-                  })
+                  confirmButtonText: '确定',
+                  cancelButtonText: '取消',
+                  type: 'warning'
+                }).then(() => {
+                  _this.getattachissuccess()
+                  _this.editdocumentinfo() // 保存编辑信息
+                  _this.getwendanginfo(_this.uploadform.FileURL) // 更新已有文档列表
+                  // 清空上传数据
+                  if (_this.$refs.refuploadattach) {
+                    _this.$refs.refuploadattach.clearFiles()
+                  }
+                })
                   .catch(() => {})
               } else {
                 _this.getattachissuccess()
-                _this.editdocumentinfo() //保存编辑信息
-                _this.getwendanginfo(_this.uploadform.FileURL) //更新已有文档列表
+                _this.editdocumentinfo() // 保存编辑信息
+                _this.getwendanginfo(_this.uploadform.FileURL) // 更新已有文档列表
                 // 清空上传数据
                 if (_this.$refs.refuploadattach) {
                   _this.$refs.refuploadattach.clearFiles()
@@ -326,19 +325,18 @@
                   type: 'warning',
                   message: '请上传文档'
                 })
-                return
               } else {
-                _this.editdocumentinfo() //保存编辑信息
+                _this.editdocumentinfo() // 保存编辑信息
               }
             }
           } else {
-            console.log('error submit!!');
-            return false;
+            console.log('error submit!!')
+            return false
           }
         })
       },
-      //执行保存操作
-      editdocumentinfo() {
+      // 执行保存操作
+      editdocumentinfo () {
         let _this = this
         _this.uploadform.DirectoryId = parseInt(_this.JLDirectoryIds[_this.JLDirectoryIds.length - 1])
         // 设置文档类别的对应标签值
@@ -374,7 +372,7 @@
             console.log(error)
           })
       },
-      beforeAvatarUpload(file) {
+      beforeAvatarUpload (file) {
         let isLt50m = file.size / 1024 / 1024 / 50 < 1
         if (!isLt50m) {
           this.$message.error('上传文件大小不能超过 50MB!')
@@ -383,7 +381,7 @@
         return true
       },
       // 判断附件是否上传成功
-      attachissuccess() {
+      attachissuccess () {
         if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
           for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
             if (this.$refs.refuploadattach.uploadFiles[i].status !== 'success') {
@@ -393,7 +391,7 @@
         }
         return true
       },
-      uploadrequest(option) {
+      uploadrequest (option) {
         let _this = this
         if (process.client) {
           const myDomain = window.location.host
@@ -410,7 +408,7 @@
                   url: res.data.publicUrl,
                   fid: res.data.fid
                 })
-                //显示文档名称
+                // 显示文档名称
                 if (_this.uploadform.Name == '') {
                   _this.uploadform.Name = _this.$refs.refuploadattach.uploadFiles[0].name
                 }
@@ -431,7 +429,7 @@
             })
         }
       },
-      getattachissuccess() {
+      getattachissuccess () {
         this.uploadform.FileURL = ''
         if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
           for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
@@ -446,8 +444,8 @@
           }
         }
       },
-      //取消验证
-      cancelLogin() {
+      // 取消验证
+      cancelLogin () {
         if (this.isLoginSucceed) {
           this.isLoginSucceed = false
         } else {
@@ -455,14 +453,14 @@
         }
         this.loginDialogVisible = false
       },
-      //密码验证
-      confirmLogin() {
+      // 密码验证
+      confirmLogin () {
         let _this = this
         let fields = {
           username: this.username,
-          password: this.password,
+          password: this.password
         }
-        this.$axios.post("/users/checkUserPwd?RealName=" + this.AuthorUserName, fields)
+        this.$axios.post('/users/checkUserPwd?RealName=' + this.AuthorUserName, fields)
           .then(res => {
             if (res.data.code == 0) {
               _this.loginDialogVisible = false
@@ -480,14 +478,14 @@
             console.error(err)
           })
       },
-      //删除文件
-      deletedatafile() {
+      // 删除文件
+      deletedatafile () {
         let _this = this
         _this.$confirm('此操作将彻底删除该数据, 是否继续?', '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          })
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
           .then(() => {
             _this.maintainlogattrlist = []
           })
@@ -495,7 +493,6 @@
       }
     }
   }
-
 </script>
 <style lang="scss">
   .samplesinputmaincard .el-card__header {

+ 36 - 37
src/dashoo.cn/frontend_web/src/pages/documentmanage/add.vue

@@ -35,11 +35,11 @@
               <el-date-picker type="datetime" placeholder="请选择有效期" v-model="uploadform.ValidityTime" style="width: 100%;"></el-date-picker>
             </el-form-item>
           </el-col> -->
-          <el-col :span="8">
-            <el-form-item label="版本信息" prop="VersionInfo">
-              <el-input v-model="uploadform.VersionInfo" placeholder="请输入版本信息"></el-input>
-            </el-form-item>
-          </el-col>
+          <!--<el-col :span="8">-->
+          <!--  <el-form-item label="版本信息" prop="VersionInfo">-->
+          <!--    <el-input v-model="uploadform.VersionInfo" placeholder="请输入版本信息"></el-input>-->
+          <!--  </el-form-item>-->
+          <!--</el-col>-->
           <el-col :span="8">
             <el-form-item label="类型" prop="RangeType">
               <el-select v-model="uploadform.RangeType" placeholder="请选择">
@@ -117,7 +117,7 @@
       })
     },
     watch: {
-      visible(val) {
+      visible (val) {
         this.selfVisible = val
         if (this.visible) {
           if (this.$refs.refuploadattach) {
@@ -127,11 +127,11 @@
           this.createoptions
         }
       },
-      selfVisible(val) {
+      selfVisible (val) {
         this.$emit('update:visible', val)
       }
     },
-    data() {
+    data () {
       var CheckDirectoryId = (rule, value, callback) => {
         if (this.uploadform.JLDirectoryId && this.uploadform.JLDirectoryId.length < 1) {
           callback(new Error('请选择文档结构'))
@@ -166,9 +166,9 @@
           DocTab: '',
           FileURL: '',
           Remark: '',
-          ValidityTime: '2122-01-01T10:00:00+08:00', //默认有效期至2122年1月1日
+          ValidityTime: '2122-01-01T10:00:00+08:00', // 默认有效期至2122年1月1日
           // typeList: [], //文档类别列表
-          JLDirectoryId: [322,323] //默认基础文档
+          JLDirectoryId: [322, 323] // 默认基础文档
         },
         rules: {
           JLDirectoryId: [{
@@ -187,7 +187,7 @@
             trigger: 'blur'
           }],
           VersionInfo: [{
-            required: true,
+            required: false,
             message: '请填写版本信息',
             trigger: 'blur'
           }],
@@ -200,8 +200,8 @@
           Diseaseinfo: [{
             validator: checkUploaddoc,
             required: true,
-            trigger: 'blur',
-          }],
+            trigger: 'blur'
+          }]
         },
         DocTaboptions: [
           {
@@ -217,18 +217,18 @@
             label: '外部'
           }
         ],
-        loginDialogVisible: false, //登陆验证弹窗
+        loginDialogVisible: false, // 登陆验证弹窗
         isLoginSucceed: false,
         acceptUsers: [],
         username: '',
         password: '',
-        //标题设置
+        // 标题设置
         path: '',
         pathName: '',
-        pathName2: '',
+        pathName2: ''
       }
     },
-    created() {
+    created () {
       let parentId = this.$route.query.exid
       let type = this.$route.query.type
       if (type == 1) {
@@ -246,14 +246,14 @@
       // this.getfinaljiedian(parentId)
     },
     methods: {
-      gettreelist(pid) {
+      gettreelist (pid) {
         let _this = this
         let params = {
           pid: pid + ''
         }
         _this.$axios.get('/items/gettreeitemsdetail', {
-            params
-          })
+          params
+        })
           .then(res => {
             _this.orgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'ParentId', 'Id,ItemName')
           })
@@ -262,7 +262,7 @@
             console.error(err)
           })
       },
-      getfinaljiedian(Id) {
+      getfinaljiedian (Id) {
         let _this = this
         this.$axios.get('/items/treeitemsdetailparentlist/' + Id, {})
           .then(res => {
@@ -287,8 +287,8 @@
             console.error(err)
           })
       },
-      save() {
-        this.$refs["uploadform"].validate((valid) => {
+      save () {
+        this.$refs['uploadform'].validate((valid) => {
           if (valid) {
             let _this = this
             if (_this.$refs.refuploadattach.uploadFiles && _this.$refs.refuploadattach.uploadFiles.length > 0) {
@@ -337,12 +337,12 @@
               })
             }
           } else {
-            console.log('error submit!!');
-            return false;
+            console.log('error submit!!')
+            return false
           }
         })
       },
-      beforeAvatarUpload(file) {
+      beforeAvatarUpload (file) {
         let isLt50m = file.size / 1024 / 1024 / 50 < 1
         if (!isLt50m) {
           this.$message.error('上传文件大小不能超过 50MB!')
@@ -351,7 +351,7 @@
         return true
       },
       // 判断附件是否上传成功
-      attachissuccess() {
+      attachissuccess () {
         if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
           for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
             if (this.$refs.refuploadattach.uploadFiles[i].status !== 'success') {
@@ -361,7 +361,7 @@
         }
         return true
       },
-      uploadrequest(option) {
+      uploadrequest (option) {
         let _this = this
         if (process.client) {
           const myDomain = window.location.host
@@ -396,7 +396,7 @@
             })
         }
       },
-      getattachissuccess() {
+      getattachissuccess () {
         this.uploadform.FileURL = ''
         if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
           for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
@@ -411,8 +411,8 @@
           }
         }
       },
-      //取消验证
-      cancelLogin() {
+      // 取消验证
+      cancelLogin () {
         if (this.isLoginSucceed) {
           this.isLoginSucceed = false
         } else {
@@ -420,14 +420,14 @@
         }
         this.loginDialogVisible = false
       },
-      //密码验证
-      confirmLogin() {
+      // 密码验证
+      confirmLogin () {
         let _this = this
         let fields = {
           username: this.username,
-          password: this.password,
+          password: this.password
         }
-        this.$axios.post("/users/checkUserPwd?RealName=" + this.AuthorUserName, fields)
+        this.$axios.post('/users/checkUserPwd?RealName=' + this.AuthorUserName, fields)
           .then(res => {
             if (res.data.code == 0) {
               _this.loginDialogVisible = false
@@ -444,10 +444,9 @@
             // handle error
             console.error(err)
           })
-      },
+      }
     }
   }
-
 </script>
 <style lang="scss">
   .samplesinputmaincard .el-card__header {

+ 2 - 1
src/dashoo.cn/frontend_web/src/pages/documentmanage/files.vue

@@ -58,7 +58,7 @@
                 <el-tag v-if="scope.row.DocTab">文件资料</el-tag>
               </template>
             </el-table-column>
-            <el-table-column prop="VersionInfo" label="文档版本" width="100" align="center" header-align="center" show-overflow-tooltip></el-table-column>
+            <!--<el-table-column prop="VersionInfo" label="文档版本" width="100" align="center" header-align="center" show-overflow-tooltip></el-table-column>-->
             <el-table-column prop="CreateBy" label="编辑人" align="center" header-align="center" show-overflow-tooltip></el-table-column>
             <el-table-column prop="CreateOn" label="编辑时间" align="center" header-align="center" show-overflow-tooltip>
               <template slot-scope="scope">
@@ -70,6 +70,7 @@
                 {{ jstimehandle(scope.row.ValidityTime+'') }}
               </template>
             </el-table-column>
+            <el-table-column prop="Remark" label="备注" align="center" min-width="60px" header-align="center" show-overflow-tooltip></el-table-column>
           </el-table>
           <el-pagination style="float:right;margin:10px 0 10px 0;" @size-change="handleSizeChange" @current-change="handleCurrentChange"
             :current-page="currentPage" :page-size="size" :page-sizes="[10, 15, 20 ]" layout="total, sizes, prev, pager, next, jumper"

+ 2 - 1
src/dashoo.cn/frontend_web/src/pages/documentmanage/notice.vue

@@ -58,7 +58,7 @@
                 <!-- <el-tag v-if="scope.row.DocTab">文件资料</el-tag> -->
               </template>
             </el-table-column>
-            <el-table-column prop="VersionInfo" label="文档版本" width="100" align="center" header-align="center" show-overflow-tooltip></el-table-column>
+            <!--<el-table-column prop="VersionInfo" label="文档版本" width="100" align="center" header-align="center" show-overflow-tooltip></el-table-column>-->
             <el-table-column prop="CreateBy" label="编辑人" align="center" header-align="center" show-overflow-tooltip></el-table-column>
             <el-table-column prop="CreateOn" label="编辑时间" align="center" header-align="center" show-overflow-tooltip>
               <template slot-scope="scope">
@@ -70,6 +70,7 @@
                 {{ jstimehandle(scope.row.ValidityTime+'') }}
               </template>
             </el-table-column>
+            <el-table-column prop="Remark" label="备注" align="center" min-width="60px" header-align="center" show-overflow-tooltip></el-table-column>
           </el-table>
           <el-pagination style="float:right;margin:10px 0 10px 0;" @size-change="handleSizeChange" @current-change="handleCurrentChange"
             :current-page="currentPage" :page-size="size" :page-sizes="[10, 15, 20 ]" layout="total, sizes, prev, pager, next, jumper"