markdown修复

dev_review
yujialong 1 year ago
parent 8082bc6975
commit 354171d454
  1. 30
      src/components/quill/index.vue
  2. 2
      src/setting.js
  3. 19
      src/views/customer/AddCustomer.vue
  4. 1231
      src/views/match/manage/matchInfo.vue
  5. 12
      src/views/serve/projectAdd.vue

@ -2,13 +2,13 @@
<div> <div>
<el-radio-group v-if="!readonly" <el-radio-group v-if="!readonly"
class="type-radio" class="type-radio"
v-model="type" v-model="editorType"
@change="typeChange"> @change="typeChange">
<el-radio :label="0">富文本</el-radio> <el-radio label="0">富文本</el-radio>
<el-radio :label="1">markdown</el-radio> <el-radio label="1">markdown</el-radio>
</el-radio-group> </el-radio-group>
<div v-show="!type" <div v-show="editorType == 0"
class="quill" class="quill"
ref="quill" ref="quill"
:class="classes"> :class="classes">
@ -26,7 +26,7 @@
</div> </div>
<mavon-editor class="md" <mavon-editor class="md"
v-model="mdVal" v-model="mdVal"
v-show="type" v-show="editorType == 1"
ref="md" ref="md"
:ishljs="true" :ishljs="true"
:subfield="false" :subfield="false"
@ -79,14 +79,19 @@ export default {
*/ */
elseRead: { elseRead: {
type: String, default: 'false' type: String, default: 'false'
} },
//
type: {
type: String,
default: '0'
},
}, },
data () { data () {
return { return {
headers: { headers: {
token: sessionStorage.getItem('token') token: sessionStorage.getItem('token')
}, },
type: 0, editorType: '0',
mdVal: '', mdVal: '',
Quill: null, Quill: null,
currentValue: '', currentValue: '',
@ -136,17 +141,23 @@ export default {
}, },
watch: { watch: {
type: {
handler (val) {
this.editorType = val
},
immediate: true
},
value: { value: {
handler (val) { handler (val) {
if (!this.type) { if (this.type == 0) {
if (val !== this.currentValue) { if (val !== this.currentValue) {
this.currentValue = val; this.currentValue = val;
if (this.Quill) { if (this.Quill) {
this.Quill.pasteHTML(this.value); this.Quill.pasteHTML(this.value);
} }
} }
if (!this.mdVal) this.mdVal = val
} }
if (!this.mdVal) this.mdVal = val
}, },
immediate: true immediate: true
} }
@ -169,6 +180,7 @@ export default {
methods: { methods: {
// //
typeChange (val) { typeChange (val) {
this.$emit('update:type', val)
if (!this.mdVal) this.mdVal = this.value if (!this.mdVal) this.mdVal = this.value
}, },

@ -12,7 +12,7 @@ if (isDev) {
host = 'http://121.37.12.51/' host = 'http://121.37.12.51/'
// host = 'https://huorantech.cn/' // host = 'https://huorantech.cn/'
// host = 'http://192.168.31.217:9000/'// 榕 // host = 'http://192.168.31.217:9000/'// 榕
// host = 'http://192.168.31.51:9000/'// 赓 host = 'http://192.168.31.51:9000/'// 赓
} else if (isPro) { } else if (isPro) {
jumpPath = 'https://www.huorantech.cn/judgmentPoint/' jumpPath = 'https://www.huorantech.cn/judgmentPoint/'
} }

@ -992,8 +992,7 @@ export default {
this.customerVisible = false this.customerVisible = false
this.submiting = false this.submiting = false
this.$message.success('添加成功') this.$message.success('添加成功')
this.form.schoolId = res.schoolId this.getSchoolData(res.schoolId)
this.getSchoolData()
}).catch((res) => { }).catch((res) => {
this.submiting = false this.submiting = false
}) })
@ -1136,14 +1135,24 @@ export default {
this.form.customerName = '' this.form.customerName = ''
}, },
// / // /
getSchoolData () { getSchoolData (schoolId) {
let data = { let data = {
schoolName: '', schoolName: '',
provinceId: '', provinceId: '',
cityId: '' cityId: ''
} }
this.$get(this.api.querySchoolData).then(res => { this.$get(this.api.querySchoolData).then(({ list }) => {
this.schoolList = res.list this.schoolList = list
// schoolId
if (schoolId) {
const item = list.find(e => e.schoolId == schoolId)
if (item) {
this.form.schoolId = schoolId
this.form.provinceId = item.provinceId
this.getCityData()
this.form.cityId = item.cityId
}
}
}).catch(res => { }); }).catch(res => { });
}, },
// //

File diff suppressed because it is too large Load Diff

@ -70,6 +70,7 @@
<quill :border="true" <quill :border="true"
:readonly="isDetail" :readonly="isDetail"
v-model="projectManage.experimentTarget" v-model="projectManage.experimentTarget"
:type.sync="projectManage.experimentTargetType"
:minHeight="150" :minHeight="150"
:height="150" /> :height="150" />
</el-form-item> </el-form-item>
@ -90,6 +91,7 @@
<quill :border="true" <quill :border="true"
:readonly="isDetail" :readonly="isDetail"
v-model="projectManage.experimentDescription" v-model="projectManage.experimentDescription"
:type.sync="projectManage.experimentDescriptionType"
:minHeight="150" :minHeight="150"
:height="150" /> :height="150" />
</el-form-item> </el-form-item>
@ -241,6 +243,7 @@
<quill :border="true" <quill :border="true"
:readonly="isDetail" :readonly="isDetail"
v-model="projectManage.experimentHint" v-model="projectManage.experimentHint"
:type.sync="projectManage.experimentHintType"
:minHeight="150" :minHeight="150"
:height="150" /> :height="150" />
</el-form-item> </el-form-item>
@ -337,7 +340,10 @@ export default {
state: 0, // (0稿 1) state: 0, // (0稿 1)
isOpen: 0, // (0 1 0) isOpen: 0, // (0 1 0)
ztOpen: 0, // (0 1 0) ztOpen: 0, // (0 1 0)
isDel: 0 // (0 1 0) isDel: 0, // (0 1 0)
experimentTargetType: '0',
experimentDescriptionType: '0',
experimentHintType: '0',
}, },
projectJudgmentData: [], //() projectJudgmentData: [], //()
oriPer: '', // oriPer: '', //
@ -431,6 +437,9 @@ export default {
this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => { this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => {
let { projectManage, projectJudgmentVos } = res; let { projectManage, projectJudgmentVos } = res;
if (!projectManage.remark) projectManage.remark = projectManage.projectName // if (!projectManage.remark) projectManage.remark = projectManage.projectName //
if (!projectManage.experimentDescriptionType) projectManage.experimentDescriptionType = '0'
if (!projectManage.experimentHintType) projectManage.experimentHintType = '0'
if (!projectManage.experimentTargetType) projectManage.experimentTargetType = '0'
this.projectManage = projectManage; this.projectManage = projectManage;
this.projectJudgmentData = projectJudgmentVos; this.projectJudgmentData = projectJudgmentVos;
this.oriPer = projectManage.permissions this.oriPer = projectManage.permissions
@ -529,6 +538,7 @@ export default {
this.submiting = true this.submiting = true
this.$store.dispatch("setSystemId", this.projectManage.systemId); this.$store.dispatch("setSystemId", this.projectManage.systemId);
this.projectManage.state = state; this.projectManage.state = state;
console.log("🚀 ~ file: projectAdd.vue:537 ~ handleSubmit ~ this.projectManage:", this.projectManage)
this.projectManage.ztOpen = state ? 0 : 1 this.projectManage.ztOpen = state ? 0 : 1
let { systemId } = this.projectManage; let { systemId } = this.projectManage;
if (this.projectId) { if (this.projectId) {

Loading…
Cancel
Save