|  |  |  | 
|---|
|  |  |  | <el-input v-model="form.label" placeholder="请输入数据标签" v-trim maxlength="50"/> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="数据值" prop="code" required> | 
|---|
|  |  |  | <el-input v-model="form.code" placeholder="请输入数据值" v-trim maxlength="50"/> | 
|---|
|  |  |  | <el-tiptap | 
|---|
|  |  |  | v-if="[175].includes(form.id)" | 
|---|
|  |  |  | v-model="form.code" | 
|---|
|  |  |  | :extensions="extensions" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <el-input v-else v-model="form.code" placeholder="请输入数据值" v-trim /> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="状态" prop="disabled" required class="form-item-status"> | 
|---|
|  |  |  | <el-switch v-model="form.disabled" :active-value="false" :inactive-value="true"/> | 
|---|
|  |  |  | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  | import BaseOpera from '@/components/base/BaseOpera' | 
|---|
|  |  |  | import GlobalWindow from '@/components/common/GlobalWindow' | 
|---|
|  |  |  | import { upload } from '@/api/system/common' | 
|---|
|  |  |  | import { | 
|---|
|  |  |  | // necessary extensions | 
|---|
|  |  |  | Doc, | 
|---|
|  |  |  | Text, | 
|---|
|  |  |  | Paragraph, | 
|---|
|  |  |  | Heading, | 
|---|
|  |  |  | Bold, | 
|---|
|  |  |  | Underline, | 
|---|
|  |  |  | Italic, | 
|---|
|  |  |  | Strike, | 
|---|
|  |  |  | ListItem, | 
|---|
|  |  |  | BulletList, | 
|---|
|  |  |  | OrderedList, | 
|---|
|  |  |  | Image, | 
|---|
|  |  |  | Blockquote, | 
|---|
|  |  |  | TextAlign, | 
|---|
|  |  |  | Indent, | 
|---|
|  |  |  | Table, | 
|---|
|  |  |  | TableHeader, | 
|---|
|  |  |  | TableCell, | 
|---|
|  |  |  | TableRow, | 
|---|
|  |  |  | TextColor, | 
|---|
|  |  |  | HorizontalRule | 
|---|
|  |  |  | } from 'element-tiptap' | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | name: 'OperaDictDataWindow', | 
|---|
|  |  |  | extends: BaseOpera, | 
|---|
|  |  |  | 
|---|
|  |  |  | code: [ | 
|---|
|  |  |  | { required: true, message: '请输入数据值' } | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | extensions: [ | 
|---|
|  |  |  | new Doc(), | 
|---|
|  |  |  | new Text(), | 
|---|
|  |  |  | new Paragraph(), | 
|---|
|  |  |  | new Heading({ level: 5 }), | 
|---|
|  |  |  | new Bold({ bubble: true }), | 
|---|
|  |  |  | new Underline({ bubble: true, menubar: false }), | 
|---|
|  |  |  | new Italic(), | 
|---|
|  |  |  | new Strike(), | 
|---|
|  |  |  | new ListItem(), | 
|---|
|  |  |  | new BulletList(), | 
|---|
|  |  |  | new OrderedList(), | 
|---|
|  |  |  | new Image({ | 
|---|
|  |  |  | uploadRequest (file) { | 
|---|
|  |  |  | const fd = new FormData() | 
|---|
|  |  |  | fd.append('folder', 'visit') | 
|---|
|  |  |  | fd.append('file', file) | 
|---|
|  |  |  | return upload(fd).then(res => { | 
|---|
|  |  |  | return res.url | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }), | 
|---|
|  |  |  | new Blockquote(), | 
|---|
|  |  |  | new TextAlign(), | 
|---|
|  |  |  | new Indent(), | 
|---|
|  |  |  | new Table(), | 
|---|
|  |  |  | new TableHeader(), | 
|---|
|  |  |  | new TableCell(), | 
|---|
|  |  |  | new TableRow(), | 
|---|
|  |  |  | new HorizontalRule(), | 
|---|
|  |  |  | new TextColor() | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|