1
continuous-integration/drone/push Build is running
Details
continuous-integration/drone/push Build is running
Details
parent
67dd01c0be
commit
4c8f2675ad
|
@ -12,7 +12,7 @@
|
||||||
<el-form-item label="文件类型: " prop="FileTypeId">
|
<el-form-item label="文件类型: " prop="FileTypeId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.FileTypeId"
|
v-model="form.FileTypeId"
|
||||||
style="width:100%;"
|
style="width: 100%"
|
||||||
size="small"
|
size="small"
|
||||||
filterable
|
filterable
|
||||||
>
|
>
|
||||||
|
@ -41,21 +41,26 @@
|
||||||
:on-exceed="handleExceed"
|
:on-exceed="handleExceed"
|
||||||
:disabled="form.Type === ''"
|
:disabled="form.Type === ''"
|
||||||
>
|
>
|
||||||
<el-button size="small" type="primary" :disabled="form.FileTypeId === ''" :loading="btnLoading">Select</el-button>
|
<el-button
|
||||||
<span
|
size="small"
|
||||||
slot="tip"
|
type="primary"
|
||||||
style="margin-left:10px;"
|
:disabled="form.FileTypeId === ''"
|
||||||
class="el-upload__tip"
|
:loading="btnLoading"
|
||||||
|
>Select</el-button
|
||||||
>
|
>
|
||||||
|
<span slot="tip" style="margin-left: 10px" class="el-upload__tip">
|
||||||
(must be in pdf format)
|
(must be in pdf format)
|
||||||
</span>
|
</span>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="需要签署的用户类型: " prop="NeedConfirmedUserTypeIdList">
|
<el-form-item
|
||||||
|
label="需要签署的用户类型: "
|
||||||
|
prop="NeedConfirmedUserTypeIdList"
|
||||||
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.NeedConfirmedUserTypeIdList"
|
v-model="form.NeedConfirmedUserTypeIdList"
|
||||||
style="width:100%;"
|
style="width: 100%"
|
||||||
multiple
|
multiple
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -66,7 +71,18 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="查看最短时间(分钟): " prop="SignViewMinimumMinutes">
|
<el-form-item label="是否仅内部签署: " prop="DocUserSignType">
|
||||||
|
<el-switch
|
||||||
|
v-model="form.DocUserSignType"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="0"
|
||||||
|
>
|
||||||
|
</el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="查看最短时间(分钟): "
|
||||||
|
prop="SignViewMinimumMinutes"
|
||||||
|
>
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.SignViewMinimumMinutes"
|
v-model="form.SignViewMinimumMinutes"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
|
@ -81,9 +97,16 @@
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
|
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
|
||||||
<el-form-item style="text-align:right;">
|
<el-form-item style="text-align: right">
|
||||||
<el-button size="small" type="primary" :disabled="form.FileTypeId === '' || form.Name === ''" :loading="saveBtnLoading" @click="handleSave">Save</el-button>
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
:disabled="form.FileTypeId === '' || form.Name === ''"
|
||||||
|
:loading="saveBtnLoading"
|
||||||
|
@click="handleSave"
|
||||||
|
>Save</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -96,8 +119,10 @@ export default {
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() { return {} }
|
default() {
|
||||||
}
|
return {}
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
@ -108,19 +133,26 @@ export default {
|
||||||
Name: '',
|
Name: '',
|
||||||
Path: '',
|
Path: '',
|
||||||
IsDeleted: false,
|
IsDeleted: false,
|
||||||
SignViewMinimumMinutes: null
|
SignViewMinimumMinutes: null,
|
||||||
|
DocUserSignType: 0,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
FileTypeId: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
FileTypeId: [
|
||||||
SignViewMinimumMinutes: [{ required: true, message: 'Please specify', trigger: ['change'] }],
|
{ required: true, message: 'Please select', trigger: ['blur'] },
|
||||||
NeedConfirmedUserTypeIdList: [{ required: true, message: 'Please select', trigger: ['blur'] }]
|
],
|
||||||
|
SignViewMinimumMinutes: [
|
||||||
|
{ required: true, message: 'Please specify', trigger: ['change'] },
|
||||||
|
],
|
||||||
|
NeedConfirmedUserTypeIdList: [
|
||||||
|
{ required: true, message: 'Please select', trigger: ['blur'] },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
fileList: [],
|
fileList: [],
|
||||||
userTypeOptions: [],
|
userTypeOptions: [],
|
||||||
btnLoading: false,
|
btnLoading: false,
|
||||||
saveBtnLoading: false,
|
saveBtnLoading: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
dictionaryList: {}
|
dictionaryList: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -137,8 +169,8 @@ export default {
|
||||||
{
|
{
|
||||||
name: this.data.Name,
|
name: this.data.Name,
|
||||||
url: this.data.Path,
|
url: this.data.Path,
|
||||||
path: this.data.Path
|
path: this.data.Path,
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
this.form.Id = this.data.Id
|
this.form.Id = this.data.Id
|
||||||
|
@ -147,25 +179,31 @@ export default {
|
||||||
this.form.Path = this.data.Path
|
this.form.Path = this.data.Path
|
||||||
this.form.IsDeleted = this.data.IsDeleted
|
this.form.IsDeleted = this.data.IsDeleted
|
||||||
this.form.SignViewMinimumMinutes = this.data.SignViewMinimumMinutes
|
this.form.SignViewMinimumMinutes = this.data.SignViewMinimumMinutes
|
||||||
|
this.form.DocUserSignType = this.data.DocUserSignType
|
||||||
}
|
}
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
// 获取文件类型下拉框
|
// 获取文件类型下拉框
|
||||||
getDicData() {
|
getDicData() {
|
||||||
getBasicDataSelects(['Sys_Document']).then(res => {
|
getBasicDataSelects(['Sys_Document'])
|
||||||
|
.then((res) => {
|
||||||
this.dictionaryList = { ...res.Result }
|
this.dictionaryList = { ...res.Result }
|
||||||
}).catch(() => {
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
.catch(() => {})
|
||||||
},
|
},
|
||||||
// 获取用户类型下拉数据
|
// 获取用户类型下拉数据
|
||||||
getUserType() {
|
getUserType() {
|
||||||
getTrialUserTypeList().then(res => {
|
getTrialUserTypeList()
|
||||||
|
.then((res) => {
|
||||||
this.userTypeOptions = res.Result
|
this.userTypeOptions = res.Result
|
||||||
if (this.form.Id) {
|
if (this.form.Id) {
|
||||||
this.form.NeedConfirmedUserTypeIdList = this.data.NeedConfirmedUserTypeIds
|
this.form.NeedConfirmedUserTypeIdList =
|
||||||
|
this.data.NeedConfirmedUserTypeIds
|
||||||
}
|
}
|
||||||
}).catch(() => { this.loading = false })
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
beforeUpload(file) {
|
beforeUpload(file) {
|
||||||
// 检测文件类型是否符合要求
|
// 检测文件类型是否符合要求
|
||||||
|
@ -181,26 +219,35 @@ export default {
|
||||||
async handleUploadFile(param) {
|
async handleUploadFile(param) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
var file = await this.fileToBlob(param.file)
|
var file = await this.fileToBlob(param.file)
|
||||||
const res = await this.OSSclient.put(`/System/DocumentToSign/${param.file.name}${new Date().getTime()}`, file)
|
const res = await this.OSSclient.put(
|
||||||
this.fileList.push({ name: param.file.name, path: this.$getObjectName(res.url), url: this.$getObjectName(res.url) })
|
`/System/DocumentToSign/${param.file.name}${new Date().getTime()}`,
|
||||||
|
file
|
||||||
|
)
|
||||||
|
this.fileList.push({
|
||||||
|
name: param.file.name,
|
||||||
|
path: this.$getObjectName(res.url),
|
||||||
|
url: this.$getObjectName(res.url),
|
||||||
|
})
|
||||||
this.form.Path = this.$getObjectName(res.url)
|
this.form.Path = this.$getObjectName(res.url)
|
||||||
this.form.Name = param.file.name
|
this.form.Name = param.file.name
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$refs.sysAttachmentFrom.validate(valid => {
|
this.$refs.sysAttachmentFrom.validate((valid) => {
|
||||||
if (!valid) return
|
if (!valid) return
|
||||||
if (!this.form.Name) {
|
if (!this.form.Name) {
|
||||||
this.$alert('Please select file.')
|
this.$alert('Please select file.')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.saveBtnLoading = true
|
this.saveBtnLoading = true
|
||||||
addOrUpdateSystemDocument(this.form).then(res => {
|
addOrUpdateSystemDocument(this.form)
|
||||||
|
.then((res) => {
|
||||||
this.saveBtnLoading = false
|
this.saveBtnLoading = false
|
||||||
this.$emit('closeDialog')
|
this.$emit('closeDialog')
|
||||||
this.$emit('getList')
|
this.$emit('getList')
|
||||||
this.$message.success('Uploaded successfully')
|
this.$message.success('Uploaded successfully')
|
||||||
}).catch(() => {
|
})
|
||||||
|
.catch(() => {
|
||||||
this.saveBtnLoading = false
|
this.saveBtnLoading = false
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -220,14 +267,16 @@ export default {
|
||||||
},
|
},
|
||||||
checkFileSuffix(fileName) {
|
checkFileSuffix(fileName) {
|
||||||
var typeArr = ['pdf']
|
var typeArr = ['pdf']
|
||||||
var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase()
|
var extendName = fileName
|
||||||
|
.substring(fileName.lastIndexOf('.') + 1)
|
||||||
|
.toLocaleLowerCase()
|
||||||
if (typeArr.indexOf(extendName) !== -1) {
|
if (typeArr.indexOf(extendName) !== -1) {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue