{"version":3,"sources":["webpack:///./src/components/officialDoc/select.vue?5906","webpack:///./src/components/officialDoc/select.vue?b1ce","webpack:///./src/components/officialDoc/select.vue?a121","webpack:///./src/components/officialDoc/select.vue","webpack:///./src/components/heritageUnit/form/project/list.vue?3aab","webpack:///./src/components/heritageUnit/form/project/list.vue?1f86","webpack:///./src/components/heritageUnit/form/project/list.vue?ec75","webpack:///./src/components/heritageUnit/form/project/list.vue","webpack:///./src/api/officialDoc/doc.ts"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","on","checkDoc","model","value","callback","$$v","docType","expression","_l","e","key","Key","attrs","Val","docYear","docNo","slot","_v","form","Id","_s","msg","_e","staticRenderFns","refTo","loading","typeList","yearList","guid","Object","assign","DocType","DocYear","toString","DocSerialNo","fetchDoc","byId","docId","then","response","data","f","$confirm","confirmButtonText","cancelButtonText","type","opt","DocNo","AttachType","AttachGuid","targetId","window","eventBus","$emit","catch","$message","message","getDoc","$on","info","fetchSource","$nextTick","$off","firstType","Select","length","category","m","CategoryName","DocCompileNo","DocTitle","default","component","directives","name","rawName","modifiers","ref","list","scopedSlots","_u","fn","addData","scope","$event","editData","$index","removData","closeDataForm","unitId","console","log","fetchData","error","showDataForm","index","item","splice","id","dataId","components","UnitProjectForm","apiUrl","GetInfo","GetByCheck","PostData","emptyData","PublicType","DocCategory","DocReleaseUnit","DocContent","Description","ApproveDate","Date","Inactive","NewUserId","NewDate","UpdateUserId","UpdateDate","PublicTypeName","DocTypeName","getByCheck","year","num","method","url","params","docNum","getInfo","postData"],"mappings":"oJAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAG,MAAM,CAACE,YAAY,cAAc,CAACF,EAAG,MAAM,CAACE,YAAY,WAAW,CAACF,EAAG,YAAY,CAACG,GAAG,CAAC,OAASP,EAAIQ,UAAUC,MAAM,CAACC,MAAOV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AAOC,SAASU,KAAK,6BAjFzB,GAA6C,QAG3C,gBADC,eAAK,CAAES,QAAS,K,6BAFE,EAAe,gBALnC,eAAU,CACT6B,WAAY,CACVC,gBAAA,iBAGiB,WCpCga,I,YCOjb7B,EAAY,eACd,EACAhF,EACA+B,GACA,EACA,KACA,WACA,MAIa,aAAAiD,E,2CClBf,oKAGM8B,EAAS,GAAH,OAAM,OAAN,gBAENC,EAAU,SAACL,GAAD,gBAAmBI,EAAnB,YAA6BJ,IAGvCM,GAFU,GAAH,OAAMF,GAEA,GAAH,OAAMA,EAAN,gBACVG,EAAW,GAAH,OAAMH,GAGPI,EAA6B,CACtCvF,GAAI,EACJwF,WAAY,EACZ5E,QAAS,EACTC,QAAS,GACTE,YAAa,GACb0E,YAAa,EACbtC,SAAU,GACVD,aAAc,GACdwC,eAAe,EACfC,WAAY,GACZC,YAAa,GACbC,YAAa,IAAIC,KACjBC,UAAU,EACVC,UAAW,EACXC,QAAS,IAAIH,KACbI,aAAc,EACdC,WAAY,IAAIL,KAEhBM,eAAgB,GAChBC,YAAa,GACbpD,aAAc,GACdpB,WAAY,EACZC,WAAY,IA4BHwE,EAAa,SAAC5E,EAAc6E,EAAcC,GACnD,OAAO,eAAS,CACZC,OAAQ,MACRC,IAAKrB,EACLsB,OAAQ,CACJxH,QAASuC,EACT/B,QAAS4G,EACTK,OAAQJ,MAIPK,EAAU,SAAC9B,GACpB,OAAO,eAAS,CACZ0B,OAAQ,MACRC,IAAKtB,EAAQL,MAgBR+B,EAAW,SAAC/G,GACrB,OAAO,eAAS,CACZ0G,OAAQ,OACRC,IAAKpB,EACLjE,KAAMtB","file":"js/chunk-1ad977c2.310d4695.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{staticClass:\"select-doc\"},[_c('div',{staticClass:\"doc-col\"},[_c('el-select',{on:{\"change\":_vm.checkDoc},model:{value:(_vm.docType),callback:function ($$v) {_vm.docType=$$v},expression:\"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',{on:{\"change\":_vm.checkDoc},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',{on:{\"blur\":_vm.checkDoc},model:{value:(_vm.docNo),callback:function ($$v) {_vm.docNo=$$v},expression:\"docNo\"}},[_c('template',{slot:\"append\"},[_vm._v(\"号\")])],2)],1)]),(_vm.form.Id>0)?_c('div',{staticClass:\"doc-msg\"},[_vm._v(\"\\n \"+_vm._s(_vm.msg)+\"\\n \")]):_vm._e()])}\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\r\nimport { Component, Vue, Watch, Prop } from 'vue-property-decorator'\r\nimport { getByCheck, getInfo, OfficialDocData, emptyData } from '@/api/officialDoc/doc'\r\nimport { tryToInt, newGuid } from '@/configs/functions'\r\nimport { enFirstType } from '@/configs/enums'\r\nimport { DDLItem, getOfficialDocTypes, getOfficialDocYears } from '@/api/common/select'\r\n\r\n@Component\r\nexport default class DocSelector extends Vue {\r\n //@docChange=\"getDoc\" getDoc(data:{ Id: number, Ref: string })\r\n @Prop({ default: 0 })\r\n public docId!: number\r\n //控件标识,在页面中多次使用时,通过refTo来判断\r\n @Prop({ default: '' })\r\n public refTo: string = ''\r\n\r\n public loading: boolean = false\r\n public typeList: DDLItem[] = []\r\n public yearList: DDLItem[] = []\r\n public guid: string = ''\r\n public form: OfficialDocData = Object.assign({}, emptyData)\r\n public docType: number = 0\r\n public docYear: number = 0\r\n public docNo: string = ''\r\n get msg(): string {\r\n let m = ''\r\n const f = this.form\r\n if (f.Id > 0) {\r\n m = f.CategoryName + ':' + f.DocCompileNo + ' ' + f.DocTitle\r\n }\r\n return m\r\n }\r\n public checkDoc() {\r\n if (this.docType > 0 && this.docYear > 0 && this.docNo != '') {\r\n this.form.DocType = this.docType\r\n this.form.DocYear = this.docYear.toString()\r\n this.form.DocSerialNo = this.docNo\r\n this.fetchDoc(false)\r\n }\r\n }\r\n public fetchDoc(byId: boolean) {\r\n this.loading = true\r\n if (byId) {\r\n getInfo(this.docId).then((response: { data: any }) => {\r\n this.form = response.data\r\n this.docType = this.form.DocType\r\n this.docYear = tryToInt(this.form.DocYear)\r\n this.docNo = this.form.DocSerialNo\r\n this.loading = false\r\n })\r\n }\r\n else {\r\n let f = this.form\r\n getByCheck(f.DocType, f.DocYear, f.DocSerialNo).then((response: { data: any }) => {\r\n f = response.data\r\n this.loading = false\r\n if (f.Id == 0) {\r\n this.$confirm('该批文不存在,是否要新增?', '提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n }).then(() => {\r\n this.guid = newGuid()\r\n const opt = {\r\n DocType: this.docType,\r\n DocYear: this.docYear,\r\n DocNo: this.docNo,\r\n AttachType: f.AttachType,\r\n AttachGuid: f.AttachGuid,\r\n targetId: this.guid\r\n }\r\n window.eventBus.$emit('openOfficialDocForm', opt)\r\n }).catch(() => {\r\n this.$message({\r\n type: 'info',\r\n message: '已取消操作'\r\n })\r\n // this.form = Object.assign({}, emptyData)\r\n // this.docType = 0\r\n // this.docYear = 0\r\n this.form.DocSerialNo = this.docNo = ''\r\n })\r\n }\r\n else {\r\n this.form = f\r\n this.getDoc()\r\n }\r\n })\r\n }\r\n }\r\n public getDoc() {\r\n this.$emit('docChange', { data: this.form, refTo: this.refTo })\r\n }\r\n public mounted() {\r\n window.eventBus.$on('submitOfficialDocForm', (info: { targetId: string, data: OfficialDocData }) => {\r\n if (this.guid === info.targetId) {\r\n this.form = Object.assign({}, info.data)\r\n this.getDoc()\r\n }\r\n })\r\n window.eventBus.$on('cancelOfficialDocForm', (info: { targetId: string }) => {\r\n if (this.guid === info.targetId) {\r\n this.form.DocSerialNo = this.docNo = ''\r\n }\r\n })\r\n this.fetchSource()\r\n this.$nextTick(() => {\r\n if (this.docId > 0) {\r\n this.fetchDoc(true)\r\n }\r\n })\r\n\r\n //延迟查询\r\n // setTimeout(() => {\r\n // console.log('setTimeout', new Date(), this.docId)\r\n // if (this.docId > 0) {\r\n // this.fetchDoc(true)\r\n // }\r\n // }, 50)\r\n }\r\n public beforeDestroy() {\r\n window.eventBus.$off('submitOfficialDocForm')\r\n window.eventBus.$off('cancelOfficialDocForm')\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 }\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!./select.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!./select.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./select.vue?vue&type=template&id=21a44b6b&scoped=true&\"\nimport script from \"./select.vue?vue&type=script&lang=ts&\"\nexport * from \"./select.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 \"21a44b6b\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{},[_c('el-table',{directives:[{name:\"loading\",rawName:\"v-loading.body\",value:(_vm.loading),expression:\"loading\",modifiers:{\"body\":true}}],ref:\"tbList\",attrs:{\"data\":_vm.list}},[_c('el-table-column',{attrs:{\"prop\":\"ProjectName\",\"label\":\"工程名称\"}}),_c('el-table-column',{attrs:{\"prop\":\"PropertiesName\",\"label\":\"工程性质\"}}),_c('el-table-column',{attrs:{\"prop\":\"LxName\",\"label\":\"立项名称\"}}),_c('el-table-column',{attrs:{\"prop\":\"DocNo\",\"label\":\"立项文号\",\"width\":\"\"}}),_c('el-table-column',{attrs:{\"prop\":\"UserName\",\"label\":\"添加人\",\"width\":\"\"}}),_c('el-table-column',{attrs:{\"class-name\":\"action\",\"label\":\"操作\",\"width\":\"100\",\"align\":\"center\"},scopedSlots:_vm._u([{key:\"header\",fn:function(ref){return [_c('el-tooltip',{attrs:{\"content\":\"添加\",\"placement\":\"top-start\"}},[_c('a',{on:{\"click\":_vm.addData}},[_c('i',{staticClass:\"iconfont icon-btn-add\"})])])]}},{key:\"default\",fn:function(scope){return [_c('el-tooltip',{attrs:{\"content\":\"修改\",\"placement\":\"top-start\"}},[_c('a',{on:{\"click\":function($event){return _vm.editData(scope.$index)}}},[_c('i',{staticClass:\"iconfont icon-pen-edit\"})])]),_c('el-tooltip',{attrs:{\"content\":\"删除\",\"placement\":\"top-start\"}},[_c('a',{on:{\"click\":function($event){return _vm.removData(scope.$index)}}},[_c('i',{staticClass:\"iconfont icon-trash\"})])])]}}])},[_c('span')])],1),_c('unit-project-form',{ref:\"projectCtrl\",attrs:{\"closeDialog\":_vm.closeDataForm}})],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\r\nimport { Component, Vue, Prop } from 'vue-property-decorator'\r\nimport { UnitProjectData, getList, removeData } from '@/api/heritageUnit/unitProject'\r\nimport UnitProjectForm from './form.vue'\r\n\r\n@Component({\r\n components: {\r\n UnitProjectForm\r\n }\r\n})\r\nexport default class UnitProjectList extends Vue {\r\n public name = 'UnitProjectList'\r\n @Prop({ default: 0 })\r\n public unitId: number = 0\r\n\r\n public loading = false\r\n public list: UnitProjectData[] = []\r\n // dynamic component\r\n public $refs!: {\r\n projectCtrl: UnitProjectForm\r\n }\r\n public loadData() {\r\n if (this.unitId == 0) {\r\n this.$message({\r\n message: '文保单位未匹配,请检查',\r\n type: 'warning'\r\n })\r\n console.log('UnitId为0,请赋值')\r\n }\r\n else {\r\n this.fetchData()\r\n }\r\n }\r\n public fetchData() {\r\n this.loading = true\r\n getList(this.unitId).then((response: { data: any }) => {\r\n this.list = response.data\r\n this.loading = false\r\n }).catch((error: any) => {\r\n console.log(error)\r\n })\r\n }\r\n public addData() {\r\n this.showDataForm(0)\r\n }\r\n public editData(index: number) {\r\n const item = this.list[index]\r\n this.showDataForm(item.Id)\r\n }\r\n public removData(index: number) {\r\n this.$confirm(`确定要删除吗?`, '提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n })\r\n .then(() => {\r\n var item = this.list[index]\r\n removeData(item.Id).then(() => {\r\n this.$message({ type: 'success', message: '删除成功' })\r\n this.list.splice(index, 1)\r\n })\r\n })\r\n .catch(() => {\r\n this.$message({\r\n type: 'info',\r\n message: '操作已取消'\r\n })\r\n })\r\n }\r\n //修改后,直接保存到数据库里\r\n public showDataForm(id: number) {\r\n window.eventBus.$emit('openUnitProjectForm', {\r\n unitId: this.unitId,\r\n dataId: id\r\n })\r\n }\r\n public closeDataForm() {\r\n console.log('closeUnitProjectForm')\r\n }\r\n public mounted() {\r\n //按需加载\r\n window.eventBus.$on('loadUnitProjectList', (unitId: number) => {\r\n this.unitId = unitId\r\n this.fetchData()\r\n })\r\n window.eventBus.$on('submitUnitProjectForm', (info: any) => {\r\n this.fetchData()\r\n })\r\n }\r\n public beforeDestroy() {\r\n window.eventBus.$off('loadUnitProjectList')\r\n window.eventBus.$off('submitUnitProjectForm')\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!./list.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!./list.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./list.vue?vue&type=template&id=73870a64&scoped=true&\"\nimport script from \"./list.vue?vue&type=script&lang=ts&\"\nexport * from \"./list.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 \"73870a64\",\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":""}