mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 10:55:51 +02:00
[v1.1] 新增自动续签并修复了一些 bug
修复后端可能会 panic 的问题 修复前端逻辑问题,新增证书自动续签
This commit is contained in:
parent
27c4b82d54
commit
882fe8c074
121 changed files with 1656 additions and 798 deletions
|
@ -7,7 +7,12 @@
|
|||
:validate-status="error[d.dataIndex] ? 'error' :'success'"
|
||||
:wrapperCol="d.edit.wrapperCol"
|
||||
>
|
||||
<a-input v-if="d.edit.type==='input'" v-model="dataSource[d.dataIndex]" :placeholder="d.edit.placeholder" />
|
||||
<p v-if="d.description" v-html="d.description+'<br/>'"/>
|
||||
<a-input
|
||||
v-if="d.edit.type==='input'"
|
||||
v-model="dataSource[d.dataIndex]"
|
||||
:placeholder="getInputPlaceholder(d, dataSource)"
|
||||
/>
|
||||
<a-textarea v-else-if="d.edit.type==='textarea'" v-model="dataSource[d.dataIndex]"
|
||||
:rows="d.edit.row?d.edit.row:5"/>
|
||||
<std-select-option
|
||||
|
@ -24,13 +29,21 @@
|
|||
:options="d.mask"
|
||||
/>
|
||||
|
||||
<std-multi-check-tag
|
||||
v-else-if="d.edit.type==='multi-check-tag'"
|
||||
v-model="temp[d.dataIndex]"
|
||||
:data-object="temp"
|
||||
:options="d.mask"
|
||||
/>
|
||||
|
||||
<std-selector
|
||||
v-else-if="d.edit.type==='selector'" v-model="temp[d.dataIndex]" :api="d.edit.api"
|
||||
:columns="d.edit.columns"
|
||||
:data_key="d.edit.data_key"
|
||||
:disable_search="d.edit.disable_search" :pagination_method="d.edit.pagination_method"
|
||||
:record-value-index="d.edit.recordValueIndex" :value="fn(temp, d.edit.valueIndex)"
|
||||
:get_params="{...d.edit.get_params, ...bindModel(d.edit.bind, temp)}"
|
||||
:get_params="get_params_fn(d)"
|
||||
:description="d.edit.description"
|
||||
selection-type="radio"
|
||||
/>
|
||||
|
||||
|
@ -45,8 +58,7 @@
|
|||
:crop="d.edit.crop"
|
||||
:auto-upload="d.edit.auto_upload"
|
||||
:crop-options="d.edit.cropOptions" :type="d.edit.upload_type ? d.edit.upload_type : 'img'"
|
||||
@changeFileUrl="url => {$emit('change_'+d.dataIndex, url)}"
|
||||
@uploaded="url => {$emit(d.dataIndex+'Uploaded', url)}"
|
||||
@uploaded="url => {$emit('uploaded', url)}"
|
||||
/>
|
||||
|
||||
<std-date-picker v-else-if="d.edit.type==='date_picker'" v-model="temp[d.dataIndex]"
|
||||
|
@ -72,6 +84,20 @@
|
|||
{{ d.text }}
|
||||
</a-checkbox>
|
||||
|
||||
<std-check-group
|
||||
v-else-if="d.edit.type==='check-group'"
|
||||
v-model="temp[d.dataIndex]"
|
||||
:options="d.options"
|
||||
:allow-other="d.edit.allow_other"
|
||||
/>
|
||||
|
||||
<std-radio-group
|
||||
v-else-if="d.edit.type==='radio-group'"
|
||||
v-model="temp[d.dataIndex]"
|
||||
:options="d.options"
|
||||
:key-type="d.edit.key_type"
|
||||
/>
|
||||
|
||||
<std-transfer
|
||||
v-else-if="d.edit.type==='transfer'"
|
||||
v-model="temp[d.dataIndex]"
|
||||
|
@ -79,14 +105,15 @@
|
|||
:data-key="d.edit.dataKey"
|
||||
/>
|
||||
|
||||
<rich-text-editor v-else-if="d.edit.type==='rich-text'" v-model="temp[d.dataIndex]" />
|
||||
<rich-text-editor v-else-if="d.edit.type==='rich-text'" v-model="temp[d.dataIndex]"/>
|
||||
|
||||
<p v-else-if="d.edit.type==='readonly'">
|
||||
{{ d.mask ? d.mask[fn(temp, d.dataIndex)] : fn(temp, d.dataIndex) }}
|
||||
</p>
|
||||
|
||||
<p v-else>{{ "edit.type 参数非法 " + d.edit.type }}</p>
|
||||
<p v-else>{{ 'edit.type 参数非法 ' + d.edit.type }}</p>
|
||||
|
||||
<p v-if="!dataSource[d.dataIndex] && d.empty_description" v-html="d.empty_description"/>
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
<slot name="supplement"/>
|
||||
|
@ -101,12 +128,18 @@ import StdSelector from './StdSelector'
|
|||
import StdUpload from './StdUpload'
|
||||
import StdDatePicker from './StdDatePicker'
|
||||
import StdTransfer from './StdTransfer'
|
||||
import RichTextEditor from "@/components/RichText/RichTextEditor";
|
||||
import StdCheckTag from "@/components/StdDataEntry/StdCheckTag";
|
||||
import RichTextEditor from '@/components/RichText/RichTextEditor'
|
||||
import StdCheckTag from '@/components/StdDataEntry/StdCheckTag'
|
||||
import StdMultiCheckTag from '@/components/StdDataEntry/StdMultiCheckTag'
|
||||
import StdCheckGroup from '@/components/StdDataEntry/StdCheckGroup'
|
||||
import StdRadioGroup from '@/components/StdDataEntry/StdRadioGroup'
|
||||
|
||||
export default {
|
||||
name: 'StdDataEntry',
|
||||
components: {
|
||||
StdRadioGroup,
|
||||
StdCheckGroup,
|
||||
StdMultiCheckTag,
|
||||
StdCheckTag,
|
||||
RichTextEditor,
|
||||
StdTransfer,
|
||||
|
@ -144,14 +177,14 @@ export default {
|
|||
},
|
||||
watch: {
|
||||
dataSource() {
|
||||
this.temp = this.dataSource
|
||||
this.temp = this.dataSource ?? []
|
||||
},
|
||||
dataList() {
|
||||
this.M_dataList = this.editableColumns(this.dataList)
|
||||
this.M_dataList = this.editableColumns(this.dataList ?? [])
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.temp = this.dataSource
|
||||
this.temp = this.dataSource ?? []
|
||||
if (this.layout === 'horizontal') {
|
||||
this.labelCol = {span: 4}
|
||||
this.wrapperCol = {span: 18}
|
||||
|
@ -159,11 +192,14 @@ export default {
|
|||
this.M_dataList = this.editableColumns(this.dataList)
|
||||
},
|
||||
methods: {
|
||||
get_params_fn(d) {
|
||||
return {...d.edit.get_params, ...this.bindModel(d.edit.bind, this.temp)}
|
||||
},
|
||||
fn: (obj, desc) => {
|
||||
const arr = desc.split('.')
|
||||
while (arr.length) {
|
||||
const top = obj[arr.shift()]
|
||||
if (!top) {
|
||||
if (top === undefined) {
|
||||
return null
|
||||
}
|
||||
obj = top
|
||||
|
@ -186,6 +222,15 @@ export default {
|
|||
}
|
||||
}
|
||||
return object
|
||||
},
|
||||
getInputPlaceholder(d, dataSource) {
|
||||
// edit 模式
|
||||
if (dataSource.id) {
|
||||
return d.edit.placeholder?.edit ?? d.edit.placeholder
|
||||
} else {
|
||||
// add 模式
|
||||
return d.edit.placeholder?.add ?? d.edit.placeholder
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue