| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535 |
- <template>
- <div>
- <div class="borderless">
- <div class="customer-head">
- <div class="customer-back">
- <el-button
- type="danger"
- style="border: none;background: none;color: red"
- icon="el-icon-arrow-left"
- @click="backToList"
- >返回列表
- </el-button>
- </div>
- <el-button
- class="el-button--small-yh add-customer-btn"
- type="primary"
- size="small"
- @click="editCustomer"
- >保存数据
- </el-button>
- </div>
- <containerTitle
- title="基础资料"
- style="margin-top: 60px"
- ></containerTitle>
- <basic-container>
- <el-row>
- <el-col :span="18">
- <avue-form
- ref="form"
- class="trading-form"
- v-model="form"
- :option="option"
- />
- </el-col>
- <el-col :span="6">
- <avue-form class="img-form" :option="option4" v-model="form" />
- </el-col>
- </el-row>
- <avue-form
- ref="form"
- class="trading-form"
- v-model="form"
- :option="option2"
- />
- </basic-container>
- <containerTitle title="详细信息"></containerTitle>
- <basic-container>
- <avue-form
- ref="form"
- class="trading-form"
- v-model="form"
- :option="option3"
- />
- </basic-container>
- </div>
- </div>
- </template>
- <script>
- import { detail, submit } from "@/api/basicData/facultyManagement";
- export default {
- name: "index",
- data() {
- return {
- form: {},
- option: {
- menuBtn: false,
- labelWidth: 100,
- column: [
- {
- label: "姓名",
- prop: "cname",
- rules: [
- {
- required: true,
- message: "",
- trigger: "blur"
- }
- ],
- span: 8
- },
- {
- label: "工号",
- prop: "code",
- rules: [
- {
- required: true,
- message: "",
- trigger: "blur"
- }
- ],
- span: 8
- },
- {
- label: "曾用名",
- prop: "usedName",
- span: 8
- },
- {
- label: "性别",
- prop: "gender",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=sex",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- span: 8
- },
- {
- label: "籍贯",
- prop: "nativePlace",
- span: 8
- },
- {
- label: "民族",
- prop: "nation",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=nationa_lity",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- span: 8
- },
- {
- label: "身份证",
- prop: "idNumber",
- rules: [
- {
- required: true,
- message: "",
- trigger: "blur"
- }
- ],
- span: 8
- },
- {
- label: "出生日期",
- prop: "birthdate",
- type: "date",
- valueFormat: "yyyy-MM-dd",
- span: 8
- },
- {
- label: "婚姻状况",
- prop: "maritalStatus",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=marital_status",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- span: 8
- },
- {
- label: "政治面貌",
- prop: "politicsStatus",
- type: "select",
- dicUrl:
- "/api/blade-system/dict-biz/dictionary?code=politics_status",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- span: 8
- },
- {
- label: "加入日期",
- prop: "joiningDate",
- type: "date",
- valueFormat: "yyyy-MM-dd",
- span: 8
- },
- {
- label: "健康状况",
- prop: "healthCondition",
- type: "select",
- dicUrl:
- "/api/blade-system/dict-biz/dictionary?code=health_condition",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- span: 8
- }
- ]
- },
- option2: {
- menuBtn: false,
- labelWidth: 100,
- column: [
- {
- label: "血型",
- prop: "bloodType",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=blood_type",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- span: 6
- },
- {
- label: "家庭住址",
- prop: "familyAddress",
- span: 6
- },
- {
- label: "邮政编码",
- prop: "postalCode",
- span: 6
- },
- {
- label: "户口性质",
- prop: "category",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=category",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- span: 6
- },
- {
- label: "户口所在地",
- prop: "residentCity",
- span: 6
- },
- {
- label: "联系电话",
- prop: "phone",
- span: 6
- },
- {
- label: "电子邮箱",
- prop: "emailAddress",
- span: 6
- },
- {
- label: "宗教信仰",
- prop: "faith",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=faith",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- span: 6
- },
- {
- label: "紧急联系人",
- prop: "contacts",
- span: 6
- },
- {
- label: "紧急联系人电话",
- prop: "contactNumber",
- span: 6
- },
- {
- label: "国别",
- prop: "nationnality",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=nationnality",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- span: 6
- },
- {
- label: "港澳台侨",
- prop: "indentation",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=TF_status",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- span: 6
- }
- ]
- },
- option3: {
- menuBtn: false,
- labelWidth: 100,
- column: [
- {
- label: "编制类别",
- prop: "compileCategory",
- type: "select",
- dicUrl:
- "/api/blade-system/dict-biz/dictionary?code=compile_category",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- span: 6
- },
- {
- label: "身份类别",
- prop: "identityCategory",
- type: "select",
- dicUrl:
- "/api/blade-system/dict-biz/dictionary?code=identity_category",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- span: 6
- },
- {
- label: "教师类别",
- prop: "teacherCategory",
- type: "select",
- dataType: "string",
- multiple: true,
- dicUrl:
- "/api/blade-system/dict-biz/dictionary?code=teacher_category",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- span: 6
- },
- {
- label: "工作状态",
- prop: "workingCondition",
- type: "select",
- dicUrl:
- "/api/blade-system/dict-biz/dictionary?code=working_condition",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- span: 6
- },
- {
- label: "现工作单位",
- prop: "currentEmployer",
- span: 12
- },
- {
- label: "所在校区",
- prop: "inCampus",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=in_campus",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- rules: [
- {
- required: true,
- message: "",
- trigger: "blur"
- }
- ],
- span: 6
- },
- {
- label: "所在部门",
- prop: "inSection",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=in_section",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- rules: [
- {
- required: true,
- message: "",
- trigger: "blur"
- }
- ],
- span: 6
- },
- {
- label: "所在院系",
- prop: "department",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=department",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- span: 6
- },
- {
- label: "所在教研室",
- prop: "inStaffRoom",
- type: "select",
- dataType: "string",
- multiple: true,
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=in_staff_room",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- span: 6,
- row: true
- },
- {
- label: "双师",
- prop: "doubleTeachers",
- type: "radio",
- dataType: "string",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=TF_status",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- span: 6
- },
- {
- label: "专业带头人",
- prop: "professionalLeader",
- type: "radio",
- dataType: "string",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=TF_status",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- span: 6
- },
- {
- label: "骨干教师",
- prop: "coreTeacher",
- type: "radio",
- dataType: "string",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=TF_status",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- span: 6,
- row: true
- },
- {
- label: "专业特长",
- prop: "professionalExpertise",
- type: "textarea",
- span: 24
- }
- ]
- },
- option4: {
- menuBtn: false,
- labelWidth: 100,
- column: [
- {
- label: "个人头像",
- prop: "headPortrait",
- type: "upload",
- listType: "picture-img",
- dataType: "string",
- action: "/api/blade-resource/oss/endpoint/put-file",
- propsHttp: {
- res: "data",
- url: "link"
- }
- }
- ]
- }
- };
- },
- props: {
- detailData: {
- type: Object
- }
- },
- created() {
- if (this.detailData.id) {
- this.getDetail(this.detailData.id);
- }
- },
- methods: {
- getDetail(id) {
- detail(id)
- .then(res => {
- this.form = res.data.data;
- })
- .finally(() => {
- // this.loading = false;
- // this.showBut = true;
- // this.pageLoading = false;
- });
- },
- //修改提交触发
- editCustomer() {
- this.$refs["form"].validate((valid, done) => {
- done();
- if (valid) {
- submit({ ...this.form })
- .then(res => {
- this.$message.success("保存成功");
- this.form = res.data.data;
- })
- .finally(() => {});
- } else {
- return false;
- }
- });
- },
- //返回列表
- backToList() {
- this.$emit("goBack");
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .trading-form ::v-deep .el-form-item {
- margin-bottom: 8px !important;
- }
- ::v-deep .el-form-item__error {
- display: none !important;
- }
- .img-form ::v-deep .el-form-item {
- height: 150px;
- line-height: 150px;
- margin-bottom: 8px !important;
- }
- .img-form ::v-deep .avue-upload__icon {
- font-size: 20px;
- width: 150px;
- height: 150px;
- line-height: 150px;
- }
- </style>
|