{"version":3,"sources":["webpack:///./src/components/officialDoc/form.vue?8975","webpack:///./src/components/officialDoc/form.vue?efac","webpack:///./src/components/officialDoc/form.vue?8332","webpack:///./src/components/officialDoc/form.vue","webpack:///./src/api/officialDoc/doc.ts"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","showDialog","close","onSubmit","directives","name","rawName","value","expression","ref","form","rules","model","callback","$$v","expandNames","slot","staticClass","_v","$set","_l","e","key","Key","Val","docYear","index","_s","loading","_e","fileExt","Id","AttachType","AttachGuid","on","onFileChange","staticRenderFns","DocTitle","required","message","trigger","DocCategory","validator","validate","PublicType","hasFile","refTarget","typeList","yearList","publicList","categoryList","Object","assign","firstType","Select","length","category","then","response","data","None","file","window","eventBus","$on","info","targetId","fetchSource","setInfo","$off","opt","f","DocType","DocYear","DocSerialNo","DocNo","$message","type","DocCompileNo","docCompileNo","CategoryName","docCategoryName","$refs","formData","valid","obj","chkFile","msg","IsError","Message","sendData","dangerouslyUseHTMLString","console","log","$emit","closeDialog","resetFields","compileNo","typeName","newVal","toString","components","FormDialog","singleFile","component","apiUrl","GetInfo","id","GetByCheck","PostData","emptyData","DocReleaseUnit","DocContent","Description","ApproveDate","Date","Inactive","NewUserId","NewDate","UpdateUserId","UpdateDate","PublicTypeName","DocTypeName","getByCheck","year","num","method","url","params","docType","docNum","getInfo","postData"],"mappings":"uHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,cAAc,CAACE,MAAM,CAAC,MAAQ,OAAO,KAAO,QAAQ,QAAUN,EAAIO,WAAW,MAAQP,EAAIQ,MAAM,OAASR,EAAIS,WAAW,CAACL,EAAG,UAAU,CAACM,WAAW,CAAC,CAACC,KAAK,UAAUC,QAAQ,YAAYC,MAAOb,EAAW,QAAEc,WAAW,YAAYC,IAAI,WAAWT,MAAM,CAAC,MAAQN,EAAIgB,KAAK,cAAc,QAAQ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EAAc+C,EAAcC,GACnD,OAAO,eAAS,CACZC,OAAQ,MACRC,IAAKnB,EACLoB,OAAQ,CACJC,QAASpD,EACTpD,QAASmG,EACTM,OAAQL,MAIPM,EAAU,SAACxB,GACpB,OAAO,eAAS,CACZmB,OAAQ,MACRC,IAAKrB,EAAQC,MAgBRyB,EAAW,SAAC1H,GACrB,OAAO,eAAS,CACZoH,OAAQ,OACRC,IAAKlB,EACLlD,KAAMjD","file":"js/chunk-5530a83b.c4bb5e2c.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('form-dialog',{attrs:{\"title\":\"新增批文\",\"size\":\"small\",\"visible\":_vm.showDialog,\"close\":_vm.close,\"submit\":_vm.onSubmit}},[_c('el-form',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.loading),expression:\"loading\"}],ref:\"formData\",attrs:{\"model\":_vm.form,\"label-width\":\"120px\",\"status-icon\":\"\",\"rules\":_vm.rules}},[_c('el-collapse',{model:{value:(_vm.expandNames),callback:function ($$v) {_vm.expandNames=$$v},expression:\"expandNames\"}},[_c('el-collapse-item',{attrs:{\"name\":\"info\"}},[_c('template',{slot:\"title\"},[_c('i',{staticClass:\"el-icon-collapse-plus-minus\"}),_vm._v(\" 批文信息\\n \")]),_c('div',[_c('el-row',{attrs:{\"gutter\":20}},[_c('el-col',{attrs:{\"span\":22}},[_c('el-form-item',{attrs:{\"label\":\"批复文号\",\"prop\":\"docCompileNo\"}},[_c('div',{staticClass:\"select-doc\"},[_c('div',{staticClass:\"doc-col\"},[_c('el-select',{model:{value:(_vm.form.DocType),callback:function ($$v) {_vm.$set(_vm.form, \"DocType\", $$v)},expression:\"form.DocType\"}},_vm._l((_vm.typeList),function(e){return _c('el-option',{key:e.Key,attrs:{\"label\":e.Val,\"value\":e.Key}})}),1)],1),_c('div',{staticClass:\"doc-col\"},[_c('el-select',{model:{value:(_vm.docYear),callback:function ($$v) {_vm.docYear=$$v},expression:\"docYear\"}},_vm._l((_vm.yearList),function(e){return _c('el-option',{key:e.Key,attrs:{\"label\":e.Val,\"value\":e.Key}})}),1)],1),_c('div',{staticClass:\"doc-col\"},[_c('el-input',{model:{value:(_vm.form.DocSerialNo),callback:function ($$v) {_vm.$set(_vm.form, \"DocSerialNo\", $$v)},expression:\"form.DocSerialNo\"}},[_c('template',{slot:\"append\"},[_vm._v(\"号\")])],2)],1)])])],1)],1),_c('el-row',{attrs:{\"gutter\":20}},[_c('el-col',{attrs:{\"span\":22}},[_c('el-form-item',{attrs:{\"label\":\"批复标题\",\"prop\":\"DocTitle\"}},[_c('el-input',{model:{value:(_vm.form.DocTitle),callback:function ($$v) {_vm.$set(_vm.form, \"DocTitle\", $$v)},expression:\"form.DocTitle\"}})],1)],1)],1),_c('el-row',{attrs:{\"gutter\":20}},[_c('el-col',{attrs:{\"span\":22}},[_c('el-form-item',{attrs:{\"label\":\"批复类型\",\"prop\":\"DocCategory\"}},[_c('el-radio-group',{model:{value:(_vm.form.DocCategory),callback:function ($$v) {_vm.$set(_vm.form, \"DocCategory\", $$v)},expression:\"form.DocCategory\"}},_vm._l((_vm.categoryList),function(e,index){return _c('el-radio',{key:index,attrs:{\"label\":e.Key}},[_vm._v(_vm._s(e.Val))])}),1)],1)],1)],1),_c('el-row',{attrs:{\"gutter\":20}},[_c('el-col',{attrs:{\"span\":22}},[_c('el-form-item',{attrs:{\"label\":\"公开形式\",\"prop\":\"PublicType\"}},[_c('el-radio-group',{model:{value:(_vm.form.PublicType),callback:function ($$v) {_vm.$set(_vm.form, \"PublicType\", $$v)},expression:\"form.PublicType\"}},_vm._l((_vm.publicList),function(e,index){return _c('el-radio',{key:index,attrs:{\"label\":e.Key}},[_vm._v(_vm._s(e.Val))])}),1)],1)],1)],1),_c('el-row',{attrs:{\"gutter\":20}},[_c('el-col',{attrs:{\"span\":11}},[_c('el-form-item',{attrs:{\"label\":\"批复日期\",\"prop\":\"ApproveDate\"}},[_c('el-date-picker',{attrs:{\"value-format\":\"yyyy-MM-dd\",\"placeholder\":\"\"},model:{value:(_vm.form.ApproveDate),callback:function ($$v) {_vm.$set(_vm.form, \"ApproveDate\", $$v)},expression:\"form.ApproveDate\"}})],1)],1)],1),_c('el-row',{attrs:{\"gutter\":20}},[_c('el-col',{attrs:{\"span\":22}},[_c('el-form-item',{attrs:{\"label\":\"附件\",\"prop\":\"fileId\"}},[(!_vm.loading)?_c('single-file',{ref:\"refFile\",attrs:{\"fileExt\":_vm.fileExt,\"referId\":_vm.form.Id,\"referType\":_vm.form.AttachType,\"tempGuid\":_vm.form.AttachGuid},on:{\"fileChange\":_vm.onFileChange}}):_vm._e()],1)],1)],1)],1)],2)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { Component, Vue, Watch, Prop } from 'vue-property-decorator'\r\nimport { emptyData, OfficialDocData, postData } from '@/api/officialDoc/doc'\r\nimport { DDLItem, getOfficialDocTypes, getOfficialDocYears, getOfficialDocPublicTypes, getOfficialDocCategories } from '@/api/common/select'\r\nimport { validateIntKey, showVaildMsg } from '@/configs/validate'\r\nimport { tryToInt, getDDLName } from '@/configs/functions'\r\nimport { UploadOptData } from '@/api/common/upload'\r\nimport { AttachInfo } from '@/api/common/attach'\r\nimport { enFirstType } from '@/configs/enums'\r\nimport { officialDocFormat } from '@/configs/fileTypes'\r\nimport singleFile from '@/components/upload/singleFile.vue'\r\nimport Element from 'element-ui'\r\nimport FormDialog from '@/components/dialog/formDialog.vue'\r\n\r\nconst getFormRules = (form: { [key: string]: string | any }) => {\r\n return {\r\n // docCompileNo: [{ required: true, message: '请输入批文号', trigger: 'change' }],\r\n DocTitle: [{ required: true, message: '请输入批文标题', trigger: 'blur' }],\r\n DocCategory: [{ required: true, validator: validateIntKey('请选择批复类型'), trigger: 'change' },],\r\n PublicType: [{ required: true, validator: validateIntKey('请选择公开形式'), trigger: 'change' },],\r\n // fileId: [{ required: true, validator: validateIntKey('请上传附件'), trigger: 'blur' },]\r\n }\r\n}\r\n@Component({\r\n components: { FormDialog, singleFile }\r\n})\r\nexport default class OfficialDocForm extends Vue {\r\n public name = 'OfficialDocForm'\r\n public expandNames = ['info']\r\n // 从父级获取参数,是否打dialog\r\n public showDialog: boolean = false\r\n\r\n public hasFile: boolean = false\r\n public fileExt: string = officialDocFormat\r\n public refTarget: string = '' //触发事件的对象\r\n public loading = false\r\n public typeList: DDLItem[] = []\r\n public yearList: DDLItem[] = []\r\n public publicList: DDLItem[] = []\r\n public categoryList: DDLItem[] = []\r\n public form: OfficialDocData = Object.assign({}, emptyData)\r\n public rules = getFormRules(this.form)\r\n public $refs!: {\r\n formData: Element.Form\r\n }\r\n get docCompileNo(): string {\r\n let f = this.form\r\n let compileNo = ''\r\n if (this.docYear > 0 && f.DocType > 0 && f.DocSerialNo != '') {\r\n var typeName = getDDLName(this.typeList, f.DocType)\r\n compileNo = typeName + '﹝' + f.DocYear + '﹞' + f.DocSerialNo + '号'\r\n }\r\n // f.DocCompileNo = compileNo\r\n return compileNo\r\n }\r\n get docCategoryName(): string {\r\n let f = this.form\r\n let name = ''\r\n if (f.DocCategory > 0) {\r\n name = getDDLName(this.categoryList, f.DocCategory)\r\n }\r\n return name\r\n }\r\n get docYear(): number {\r\n return tryToInt(this.form.DocYear)\r\n }\r\n set docYear(newVal: number) {\r\n this.form.DocYear = newVal.toString()\r\n }\r\n public fetchSource() {\r\n const firstType = enFirstType.Select\r\n if (this.typeList.length === 0) {\r\n //category 0.所有批文 1.立项批文Resvered_Flag1=true,2.批复/意见文号(Resvered_Flag2=true 冀文物发、文物保函、办保函)\r\n const category = 0\r\n getOfficialDocTypes(category, firstType).then((response: { data: any }) => {\r\n const data = response.data\r\n if (data) {\r\n this.typeList = data\r\n }\r\n })\r\n }\r\n if (this.yearList.length === 0) {\r\n getOfficialDocYears(firstType).then((response: { data: any }) => {\r\n const data = response.data\r\n if (data) {\r\n this.yearList = data\r\n }\r\n })\r\n }\r\n if (this.publicList.length === 0) {\r\n getOfficialDocPublicTypes(enFirstType.None).then((response: { data: any }) => {\r\n const data = response.data\r\n if (data) {\r\n this.publicList = data\r\n }\r\n })\r\n }\r\n if (this.categoryList.length === 0) {\r\n getOfficialDocCategories(enFirstType.None).then((response: { data: any }) => {\r\n const data = response.data\r\n if (data) {\r\n this.categoryList = data\r\n }\r\n })\r\n }\r\n }\r\n public onFileChange(data: { opts: UploadOptData, file: AttachInfo }) {\r\n this.hasFile = data.file.Id > 0\r\n }\r\n public created() {\r\n }\r\n public mounted() {\r\n window.eventBus.$on(\"openOfficialDocForm\", (info: any) => {\r\n this.showDialog = true\r\n this.refTarget = info.targetId\r\n this.fetchSource()\r\n this.setInfo(info)\r\n })\r\n }\r\n public beforeDestroy() {\r\n window.eventBus.$off(\"openOfficialDocForm\")\r\n }\r\n public setInfo(opt: any) {\r\n let f = Object.assign({}, emptyData)\r\n f.DocType = opt.DocType\r\n f.DocYear = opt.DocYear\r\n f.DocSerialNo = opt.DocNo\r\n f.AttachType = opt.AttachType\r\n f.AttachGuid = opt.AttachGuid\r\n this.form = f\r\n }\r\n public chkFile() {\r\n if (!this.hasFile) {\r\n this.$message({\r\n message: '请上传附件',\r\n type: 'warning'\r\n })\r\n return false\r\n }\r\n return true\r\n }\r\n public onSubmit() {\r\n let f = this.form// Object.assign({}, this.form)\r\n f.DocCompileNo = this.docCompileNo\r\n f.CategoryName = this.docCategoryName\r\n this.$refs.formData.validate((valid: boolean, obj: any) => {\r\n if (valid && this.chkFile()) {\r\n postData(f).then((response: { data: any }) => {\r\n const data = response.data\r\n const msg = f.Id > 0 ? '保存' : '创建'\r\n if (data && !data.IsError) {\r\n this.$message({\r\n message: `${msg}成功`,\r\n type: 'success'\r\n })\r\n if (f.Id == 0) {\r\n f.Id = +data.Message\r\n }\r\n this.sendData(f)\r\n } else {\r\n this.$message({\r\n dangerouslyUseHTMLString: true, message: `${data.Message}`,\r\n type: 'success'\r\n })\r\n console.log('提交失败', data)\r\n }\r\n }, (data: any) => {\r\n console.log(data)\r\n })\r\n } else {\r\n showVaildMsg(this.$message, obj)\r\n }\r\n })\r\n }\r\n public sendData(f: OfficialDocData) {\r\n window.eventBus.$emit('submitOfficialDocForm', {\r\n targetId: this.refTarget,\r\n data: f\r\n })\r\n //console.log('submitOfficialDocForm', f)\r\n this.closeDialog()\r\n }\r\n public closeDialog() {\r\n this.showDialog = false\r\n this.$refs.formData.resetFields()\r\n }\r\n //这里的close执行取消操作,对应的父级做反馈反馈\r\n public close() {\r\n window.eventBus.$emit('cancelOfficialDocForm', {\r\n targetId: this.refTarget\r\n })\r\n this.closeDialog()\r\n }\r\n}\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./form.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./form.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./form.vue?vue&type=template&id=35618d22&scoped=true&\"\nimport script from \"./form.vue?vue&type=script&lang=ts&\"\nexport * from \"./form.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"35618d22\",\n null\n \n)\n\nexport default component.exports","import { tryAxios } from '@/api/common/auth'\r\nimport { urlPrefix } from '@/configs/api'\r\n\r\nconst apiUrl = `${urlPrefix}/OfficialDoc`\r\n//#region select数据源相关api\r\nconst GetInfo = (id: number) => `${apiUrl}/${id}`\r\nconst GetList = `${apiUrl}`\r\nconst Delete = (id: number) => `${apiUrl}/${id}`\r\nconst GetByCheck = `${apiUrl}/GetByCheck`\r\nconst PostData = `${apiUrl}`\r\n//#endregion\r\n\r\nexport const emptyData: OfficialDocData = {\r\n Id: 0,\r\n PublicType: 0,\r\n DocType: 0,\r\n DocYear: '',\r\n DocSerialNo: '',\r\n DocCategory: 0,\r\n DocTitle: '',\r\n DocCompileNo: '',\r\n DocReleaseUnit:0,\r\n DocContent: '',\r\n Description: '',\r\n ApproveDate: new Date(),\r\n Inactive: false,\r\n NewUserId: 0,\r\n NewDate: new Date(),\r\n UpdateUserId: 0,\r\n UpdateDate: new Date(),\r\n\r\n PublicTypeName: '',\r\n DocTypeName: '',\r\n CategoryName: '',\r\n AttachType: 0,\r\n AttachGuid: ''\r\n}\r\nexport interface OfficialDocData {\r\n Id: number\r\n PublicType: number\r\n DocType: number\r\n DocYear: string\r\n DocSerialNo: string\r\n DocCategory: number\r\n DocTitle: string\r\n DocCompileNo: string\r\n DocReleaseUnit:number\r\n DocContent: string\r\n Description: string\r\n ApproveDate: Date\r\n Inactive: boolean\r\n NewUserId: number\r\n NewDate: Date\r\n UpdateUserId: number\r\n UpdateDate: Date\r\n\r\n PublicTypeName: string\r\n DocTypeName: string\r\n CategoryName: string\r\n\r\n AttachType: number\r\n AttachGuid: string\r\n}\r\nexport const getByCheck = (type: number, year: string, num: string) => {\r\n return tryAxios({\r\n method: 'get',\r\n url: GetByCheck,\r\n params: {\r\n docType: type,\r\n docYear: year,\r\n docNum: num\r\n }\r\n })\r\n}\r\nexport const getInfo = (id: number) => {\r\n return tryAxios({\r\n method: 'get',\r\n url: GetInfo(id)\r\n })\r\n}\r\nexport const getList = (param: any) => {\r\n return tryAxios({\r\n method: 'get',\r\n url: GetList,\r\n params: param\r\n })\r\n}\r\nexport const remove = (id: number) => {\r\n return tryAxios({\r\n method: 'delete',\r\n url: Delete(id)\r\n })\r\n}\r\nexport const postData = (form: OfficialDocData) => {\r\n return tryAxios({\r\n method: 'post',\r\n url: PostData,\r\n data: form\r\n })\r\n}"],"sourceRoot":""}