|
|
@ -13,13 +13,13 @@ |
|
|
|
<p v-else-if="selectedCategory.isType == 5">文件</p> |
|
|
|
<p v-else /> |
|
|
|
</div> |
|
|
|
<div v-if="selectedCategory.pid !== null" class="info-item"> |
|
|
|
<div v-if="selectedCategory.pid !== '0'" class="info-item"> |
|
|
|
<span>关联父级</span> |
|
|
|
<p>{{ selectedCategory.parentName }}</p> |
|
|
|
</div> |
|
|
|
<div v-if="selectedCategory.isType !== 1 && selectedCategory.isType !== 2" class="info-item"> |
|
|
|
<div v-if="selectedCategory.isType !== 1" class="info-item"> |
|
|
|
<span>档号规则</span> |
|
|
|
<p>{{ selectedCategory.isColumnLength }}</p> |
|
|
|
<p>{{ fileNoFormatStr }}</p> |
|
|
|
</div> |
|
|
|
<div class="info-item info-content"> |
|
|
|
<span>内容说明</span> |
|
|
@ -29,6 +29,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { getNoFormatField } from '@/api/category/fileNoFormat' |
|
|
|
export default { |
|
|
|
name: 'BaseInfo', |
|
|
|
props: { |
|
|
@ -47,12 +48,35 @@ export default { |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
showFields: [] |
|
|
|
fileNoFormatStr: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
// computed: { |
|
|
|
// fileNoFormatStr: function() { |
|
|
|
// console.log(this.fileNoFormat) |
|
|
|
// return this.fileNoFormat.reduce( |
|
|
|
// (previousValue, currentValue) => { |
|
|
|
// previousValue.fieldCnName + previousValue.connector + currentValue.fieldCnName + currentValue.connector}, { fieldCnName: '', connector: '' } |
|
|
|
// ) |
|
|
|
// } |
|
|
|
// }, |
|
|
|
watch: { |
|
|
|
selectedCategory: function(newValue, oldValue) { |
|
|
|
this.initData() |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.initData() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
initData() { |
|
|
|
getNoFormatField({ categoryId: this.selectedCategory.id }).then((res) => { |
|
|
|
this.fileNoFormatStr = '' |
|
|
|
res.forEach((item) => { |
|
|
|
this.fileNoFormatStr += item.fieldCnName + item.connector |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|