|
@@ -20,96 +20,68 @@
|
|
|
:rules="ruleValidate"
|
|
|
:label-width="'100px'"
|
|
|
>
|
|
|
- <el-form-item label="" prop="id">
|
|
|
- <el-input
|
|
|
- v-model="formModel.id"
|
|
|
- placeholder="请输入"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
<el-form-item label="企联简介" prop="enterpriseIntroduction">
|
|
|
- <el-input
|
|
|
+ <mce-editor
|
|
|
+ ref="editorenterpriseIntroduction"
|
|
|
+ uploadName="upfile"
|
|
|
v-model="formModel.enterpriseIntroduction"
|
|
|
- placeholder="请输入企联简介"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
+ :url="uploadUrl"
|
|
|
+ :config="editorConfig"
|
|
|
+ ></mce-editor>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="企联章程" prop="enterpriseConstitution">
|
|
|
- <el-input
|
|
|
+ <mce-editor
|
|
|
+ ref="editorenterpriseConstitution"
|
|
|
+ uploadName="upfile"
|
|
|
v-model="formModel.enterpriseConstitution"
|
|
|
- placeholder="请输入企联章程"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
+ :url="uploadUrl"
|
|
|
+ :config="editorConfig"
|
|
|
+ ></mce-editor>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="组织架构" prop="organStructure">
|
|
|
- <el-input
|
|
|
+ <mce-editor
|
|
|
+ ref="editororganStructure"
|
|
|
+ uploadName="upfile"
|
|
|
v-model="formModel.organStructure"
|
|
|
- placeholder="请输入组织架构"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
+ :url="uploadUrl"
|
|
|
+ :config="editorConfig"
|
|
|
+ ></mce-editor>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="基本职能" prop="basicFunction">
|
|
|
- <el-input
|
|
|
+ <mce-editor
|
|
|
+ ref="editorbasicFunction"
|
|
|
+ uploadName="upfile"
|
|
|
v-model="formModel.basicFunction"
|
|
|
- placeholder="请输入基本职能"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
+ :url="uploadUrl"
|
|
|
+ :config="editorConfig"
|
|
|
+ ></mce-editor>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="负责人及分工" prop="chargePerson">
|
|
|
- <el-input
|
|
|
+ <mce-editor
|
|
|
+ ref="editorchargePerson"
|
|
|
+ uploadName="upfile"
|
|
|
v-model="formModel.chargePerson"
|
|
|
- placeholder="请输入负责人及分工"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
+ :url="uploadUrl"
|
|
|
+ :config="editorConfig"
|
|
|
+ ></mce-editor>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="分会简介" prop="branchIntroduction">
|
|
|
- <el-input
|
|
|
+ <mce-editor
|
|
|
+ ref="editorbranchIntroduction"
|
|
|
+ uploadName="upfile"
|
|
|
v-model="formModel.branchIntroduction"
|
|
|
- placeholder="请输入分会简介"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
+ :url="uploadUrl"
|
|
|
+ :config="editorConfig"
|
|
|
+ ></mce-editor>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="联系方式" prop="contactInformation">
|
|
|
- <el-input
|
|
|
+ <mce-editor
|
|
|
+ ref="editorcontactInformation"
|
|
|
+ uploadName="upfile"
|
|
|
v-model="formModel.contactInformation"
|
|
|
- placeholder="请输入联系方式"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="创建人" prop="createBy">
|
|
|
- <el-input
|
|
|
- v-model="formModel.createBy"
|
|
|
- placeholder="请输入创建人"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="创建时间" prop="createTime">
|
|
|
- <el-input
|
|
|
- v-model="formModel.createTime"
|
|
|
- placeholder="请输入创建时间"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="更新人" prop="updateBy">
|
|
|
- <el-input
|
|
|
- v-model="formModel.updateBy"
|
|
|
- placeholder="请输入更新人"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="更新时间" prop="updateTime">
|
|
|
- <el-input
|
|
|
- v-model="formModel.updateTime"
|
|
|
- placeholder="请输入更新时间"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="是否删除" prop="delFlag">
|
|
|
- <el-input
|
|
|
- v-model="formModel.delFlag"
|
|
|
- placeholder="请输入是否删除"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
+ :url="uploadUrl"
|
|
|
+ :config="editorConfig"
|
|
|
+ ></mce-editor>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
@@ -124,9 +96,14 @@
|
|
|
<script>
|
|
|
import Constant from "@/constant";
|
|
|
import enterpriseInfoApi from "@/api/base/enterpriseInfo";
|
|
|
+import MceEditor from "@/components/Tinymce";
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
|
|
|
export default {
|
|
|
props: ["businessKey", "title"],
|
|
|
+ components: {
|
|
|
+ "mce-editor": MceEditor,
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
formModel: {},
|
|
@@ -172,6 +149,11 @@ export default {
|
|
|
showDialog: true,
|
|
|
loading: false,
|
|
|
submitting: false,
|
|
|
+ editorConfig: {
|
|
|
+ height: 400,
|
|
|
+ width: "90%",
|
|
|
+ },
|
|
|
+ uploadUrl: Constant.serverUrl + "/tinymce/upload?token=" + getToken(),
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -186,6 +168,15 @@ export default {
|
|
|
(function () {
|
|
|
var id = self.formModel.id;
|
|
|
|
|
|
+ self.formModel.contactInformation =
|
|
|
+ self.$refs.editorcontactInformation.getContent();
|
|
|
+ self.formModel.enterpriseIntroduction = self.$refs.editorenterpriseIntroduction.getContent();
|
|
|
+ self.formModel.enterpriseConstitution = self.$refs.editorenterpriseConstitution.getContent();
|
|
|
+ self.formModel.organStructure = self.$refs.editororganStructure.getContent();
|
|
|
+ self.formModel.basicFunction = self.$refs.editorbasicFunction.getContent();
|
|
|
+ self.formModel.chargePerson = self.$refs.editorchargePerson.getContent();
|
|
|
+ self.formModel.branchIntroduction = self.$refs.editorbranchIntroduction.getContent();
|
|
|
+
|
|
|
if (id == null || id.length == 0) {
|
|
|
return enterpriseInfoApi.add(self.formModel);
|
|
|
} else {
|
|
@@ -230,6 +221,41 @@ export default {
|
|
|
|
|
|
if (jsonData.result) {
|
|
|
self.formModel = jsonData.data;
|
|
|
+ if (self.formModel.contactInformation != null) {
|
|
|
+ self.$refs.editorcontactInformation.setContent(
|
|
|
+ self.formModel.contactInformation
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if (self.formModel.enterpriseIntroduction != null) {
|
|
|
+ self.$refs.editorenterpriseIntroduction.setContent(
|
|
|
+ self.formModel.enterpriseIntroduction
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if (self.formModel.enterpriseConstitution != null) {
|
|
|
+ self.$refs.editorenterpriseConstitution.setContent(
|
|
|
+ self.formModel.enterpriseConstitution
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if (self.formModel.organStructure != null) {
|
|
|
+ self.$refs.editororganStructure.setContent(
|
|
|
+ self.formModel.organStructure
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if (self.formModel.basicFunction != null) {
|
|
|
+ self.$refs.editorbasicFunction.setContent(
|
|
|
+ self.formModel.basicFunction
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if (self.formModel.chargePerson != null) {
|
|
|
+ self.$refs.editorchargePerson.setContent(
|
|
|
+ self.formModel.chargePerson
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if (self.formModel.branchIntroduction != null) {
|
|
|
+ self.$refs.editorbranchIntroduction.setContent(
|
|
|
+ self.formModel.branchIntroduction
|
|
|
+ );
|
|
|
+ }
|
|
|
} else {
|
|
|
self.$message.error(jsonData.message + "");
|
|
|
}
|