|
|
@@ -30,16 +30,24 @@
|
|
|
<el-input v-model="uploadform.Name" placeholder="请输入文档名称" ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="12">
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="有效期至" prop="ValidityTime">
|
|
|
+ <el-date-picker type="datetime" placeholder="请选择有效期" v-model="uploadform.ValidityTime" style="width: 100%;"></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="版本信息" prop="VersionInfo">
|
|
|
- <el-input v-model="uploadform.VersionInfo" placeholder="请输入版本信息" ></el-input>
|
|
|
+ <el-input v-model="uploadform.VersionInfo" placeholder="请输入版本信息"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <!-- <el-col :span="12">
|
|
|
- <el-form-item label="编辑人" prop="CreateBy">
|
|
|
- <el-input v-model="uploadform.CreateBy" placeholder="请输入编辑人"></el-input>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="文档类别">
|
|
|
+ <el-checkbox-group v-model="typeList">
|
|
|
+ <el-checkbox label="通知公告" border></el-checkbox>
|
|
|
+ <el-checkbox label="文件资料" border></el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
</el-form-item>
|
|
|
- </el-col> -->
|
|
|
+ </el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="备注">
|
|
|
<el-input type="textarea" :rows="2" v-model="uploadform.Remark" placeholder="请输入备注信息" ></el-input>
|
|
|
@@ -133,6 +141,7 @@
|
|
|
orgtreelist: [],
|
|
|
JLDirectoryIds: [], //文档结构
|
|
|
list: [],
|
|
|
+ typeList: [], //文档类别列表
|
|
|
uploadform: {
|
|
|
DirectoryId: '', //目录结构Id
|
|
|
Name: '', //文档名称
|
|
|
@@ -140,7 +149,7 @@
|
|
|
NoticeTab: '', //通知公告标签
|
|
|
DocTab: '', //文件资料标签
|
|
|
FileURL: '', //文档地址
|
|
|
- ValidityTime: new Date(), //有效期至
|
|
|
+ ValidityTime: '', //有效期至
|
|
|
Remark: '', //备注
|
|
|
},
|
|
|
AuthorUser: '',
|
|
|
@@ -161,16 +170,16 @@
|
|
|
message: '请填写文档名称',
|
|
|
trigger: 'blur'
|
|
|
}],
|
|
|
+ ValidityTime: [{
|
|
|
+ required: true,
|
|
|
+ message: '请选择有效期至',
|
|
|
+ trigger: 'blur'
|
|
|
+ }],
|
|
|
VersionInfo: [{
|
|
|
required: true,
|
|
|
message: '请填写版本信息',
|
|
|
trigger: 'blur'
|
|
|
}],
|
|
|
- // CreateBy: [{
|
|
|
- // required: true,
|
|
|
- // message: '请输入编辑人',
|
|
|
- // trigger: 'blur'
|
|
|
- // }],
|
|
|
},
|
|
|
}
|
|
|
},
|
|
|
@@ -184,6 +193,15 @@
|
|
|
this.$axios.get('/document/geteditinitinfo/' + this.documentId, {})
|
|
|
.then(res => {
|
|
|
_this.uploadform = res.data.items
|
|
|
+ let list = new Array()
|
|
|
+ // 设置文档类别的对应标签值
|
|
|
+ if (_this.uploadform.NoticeTab) {
|
|
|
+ list.push("通知公告")
|
|
|
+ }
|
|
|
+ if (_this.uploadform.DocTab) {
|
|
|
+ list.push("文件资料")
|
|
|
+ }
|
|
|
+ _this.typeList = list
|
|
|
_this.gettreelist(218)
|
|
|
_this.getwendanginfo(res.data.items.FileURL)
|
|
|
|
|
|
@@ -211,7 +229,7 @@
|
|
|
})
|
|
|
.then(res => {
|
|
|
_this.orgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'ParentId', 'Id,ItemName')
|
|
|
- _this.getfinaljiedian(_this.uploadform.DirectoryId)
|
|
|
+ // _this.getfinaljiedian(_this.uploadform.DirectoryId)
|
|
|
})
|
|
|
.catch(err => {
|
|
|
// handle error
|
|
|
@@ -229,7 +247,6 @@
|
|
|
if (res.data.code === 0) {
|
|
|
// 选中状态
|
|
|
_this.JLDirectoryIds = []
|
|
|
- let pidarr = res.data.message.split(',')
|
|
|
for (var i = pidarr.length - 1; i >= 0; i--) {
|
|
|
if (pidarr[i] !== '0') {
|
|
|
_this.JLDirectoryIds.push(parseInt(pidarr[i]))
|
|
|
@@ -277,6 +294,7 @@
|
|
|
} else {
|
|
|
_this.getattachissuccess()
|
|
|
_this.editdocumentinfo() //保存编辑信息
|
|
|
+ _this.getwendanginfo(_this.uploadform.FileURL) //更新已有文档列表
|
|
|
// 清空上传数据
|
|
|
if (_this.$refs.refuploadattach) {
|
|
|
_this.$refs.refuploadattach.clearFiles()
|
|
|
@@ -303,6 +321,21 @@
|
|
|
editdocumentinfo() {
|
|
|
let _this = this
|
|
|
_this.uploadform.DirectoryId = parseInt(_this.JLDirectoryIds[_this.JLDirectoryIds.length - 1])
|
|
|
+ // 设置文档类别的对应标签值
|
|
|
+ for (let i = 0; i < _this.typeList.length; i++) {
|
|
|
+ //首先清0
|
|
|
+ _this.uploadform.NoticeTab = 0
|
|
|
+ _this.uploadform.DocTab = 0
|
|
|
+ //再设置
|
|
|
+ let v = _this.typeList[i]
|
|
|
+ switch (v) {
|
|
|
+ case "通知公告": _this.uploadform.NoticeTab = 1
|
|
|
+ break;
|
|
|
+ case "文件资料": _this.uploadform.DocTab = 1
|
|
|
+ break;
|
|
|
+ default: _this.uploadform.DocTab = 1
|
|
|
+ }
|
|
|
+ }
|
|
|
this.$axios.put('/document/editdocumentinfo/' + _this.documentId, _this.uploadform)
|
|
|
.then(function (response) {
|
|
|
if (response.data.code === 0) {
|
|
|
@@ -457,7 +490,7 @@
|
|
|
}
|
|
|
|
|
|
.attach-uploader .el-upload:hover {
|
|
|
- border-color: #228B22;
|
|
|
+ border-color: #25ff25;
|
|
|
}
|
|
|
|
|
|
.attach-uploader-icon {
|