|
@@ -57,7 +57,7 @@
|
|
|
<CusFormColumn
|
|
|
:span="12"
|
|
|
:required="$util.isValue(state.form.relateIndexId)"
|
|
|
- label="权重"
|
|
|
+ label="节点权重"
|
|
|
v-model:param="state.form.weight"
|
|
|
link="select"
|
|
|
:options="DictionaryStore.nodeSizeList"
|
|
@@ -69,6 +69,18 @@
|
|
|
label="关系描述"
|
|
|
v-model:param="state.form.relationDescription"
|
|
|
/>
|
|
|
+ <CusFormColumn
|
|
|
+ :span="12"
|
|
|
+ label="节点图标"
|
|
|
+ v-model:param="state.form.indexUrl"
|
|
|
+ link="upload"
|
|
|
+ layout="card"
|
|
|
+ type="img"
|
|
|
+ :limit="1"
|
|
|
+ limitNoUpload
|
|
|
+ :delRule="(file) => true"
|
|
|
+ />
|
|
|
+ <el-col :span="12"/>
|
|
|
<el-col :span="12">
|
|
|
<div class="__cus-title_1">索引条件</div>
|
|
|
<CusTable
|
|
@@ -176,7 +188,9 @@ const props = defineProps({
|
|
|
transfer: {}
|
|
|
})
|
|
|
const state: any = reactive({
|
|
|
- form: {},
|
|
|
+ form: {
|
|
|
+ indexUrl: []
|
|
|
+ },
|
|
|
loading: false,
|
|
|
conditionTable: {
|
|
|
selectValue: '',
|
|
@@ -213,6 +227,7 @@ const onSubmit = () => {
|
|
|
} as any).then(() => {
|
|
|
state.loading = true
|
|
|
const params = {...state.form}
|
|
|
+ params.indexUrl = params.indexUrl.length > 0 ? params.indexUrl[0].url : ''
|
|
|
params.indexCondition = state.conditionTable.data.length > 0 ? JSON.stringify(state.conditionTable.data) : ''
|
|
|
params.indexOrder = state.sortTable.data.length > 0 ? JSON.stringify(state.sortTable.data) : ''
|
|
|
if (props.transfer.mode === 'add') {
|
|
@@ -249,6 +264,7 @@ const initDetail = () => {
|
|
|
state.loading = true
|
|
|
sysThemeIndexFindById(props.transfer.id).then(res => {
|
|
|
state.form = res.data
|
|
|
+ state.form.indexUrl = state.form.indexUrl ? [{url: state.form.indexUrl, name: state.form.indexUrl}] : []
|
|
|
state.conditionTable.data = state.form.indexCondition ? JSON.parse(state.form.indexCondition) : []
|
|
|
state.sortTable.data = state.form.indexOrder ? JSON.parse(state.form.indexOrder) : []
|
|
|
initText(state.form.indexId)
|
|
@@ -283,7 +299,8 @@ watch(() => props.show, (n) => {
|
|
|
initDictionary()
|
|
|
if (props.transfer.mode === 'add') {
|
|
|
state.form = {
|
|
|
- isMain: '0'
|
|
|
+ isMain: '0',
|
|
|
+ indexUrl: []
|
|
|
}
|
|
|
initText(props.transfer.indexId)
|
|
|
} else if (props.transfer.mode === 'edit') {
|