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

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

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

File diff suppressed because it is too large Load Diff

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

Loading…
Cancel
Save