{"version":3,"sources":["webpack:///./src/components/task/edit/components/locTypeCascader/index.js","webpack:///./src/components/task/edit/components/locTypeCascader/locTypeCascader.vue","webpack:///src/components/task/edit/components/locTypeCascader/locTypeCascader.vue","webpack:///./src/components/task/edit/components/locTypeCascader/locTypeCascader.vue?d76b","webpack:///./src/components/task/edit/components/locTypeCascader/locTypeCascader.vue?b2bf","webpack:///./src/api/type.js"],"names":["locTypeCascader","render","_vm","this","_c","_self","staticClass","class","concat","disableAdd","staticStyle","attrs","placeholder","list","checkStrictly","multiple","disabled","size","on","cascaderOnChange","model","value","cascaderSelected","callback","$$v","expression","hasPermission","_e","$event","stopPropagation","showModal","modalClose","scopedSlots","_u","key","fn","_v","_s","selectedTypeId","proxy","directives","name","rawName","editMode","saveLocType","modalShow","addSub","handleTreeSelect","deleteType","locTypeModel","listFlat","filter","x","id","parentId","length","title","domProps","target","composing","$set","getLbl","code","ord","fileUploaded","attachId","slot","preventDefault","showAttach","coverUploaded","field1","i1","field2","fileDialog","modal","blank","src","show","staticRenderFns","LTT","require","_","components","Cascader","FormItem","InputNumber","Input","Form","Tree","Checkbox","Select","Option","simpleUploader","component","loading","AsyncLoading","error","AsyncLoadError","delay","timeout","props","type","Number","default","locTypekey","String","guid","getParentType","Boolean","withUserId","parentFilterable","data","selectedLabel","postedId","mounted","init","methods","sortByLabel","a","b","label","localeCompare","sortTreeNodes","node","comparator","self","undefined","children","orderBy","forEach","child","compareById","vector","aid","get","bid","rv","perrArr","hasOneOf","$store","state","user","access","_this","getTypeTreeData","params","userId","store","then","res","parentType","types","dataTypes","push","map","app","activeGroup","hostPro","ltt","key_id","key_parent","key_child","GetTree","cascaderModelRecursive","reverse","cid","d","pid","_lasts","_id","$emit","dta","selectedData","e","expand","editSub","locTypeDetail","_this2","confirm","request","api","url","method","_this3","_this4","typeId","uploadedAttachmentId","uploadedUrl","_ref","Promise","resolve","requestApi","rs","dynamicDispatcher"],"mappings":"mIAAA,uBACeA,2B,iGCDXC,EAAS,WAAk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BACLE,OAAQ,MACRrC,OAAQA,EACRlC,KAAMA,IACLqC,MAAK,SAAAC,GACN,GAAW,GAAPA,EAAc,CAChB,IAAI2C,EAAKC,eAAkB5C,EAAKF,GAE9B2C,EADQ,GAANE,GACMA,QAKVF,GAAQ","file":"js/chunk-850b5b4a.0f729f70.js","sourcesContent":["import locTypeCascader from \"./locTypeCascader.vue\";\nexport default locTypeCascader;\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[_c('div',{staticClass:\"d-flex\"},[_c('div',{class:`wd-${_vm.disableAdd ? '100p' : '80p'}`},[_c('Cascader',{staticStyle:{\"width\":\"100%\"},attrs:{\"placeholder\":_vm.placeholder,\"filterable\":\"\",\"options\":_vm.list,\"props\":{ checkStrictly: _vm.checkStrictly, multiple: _vm.multiple },\"disabled\":_vm.disabled,\"clearable\":\"\",\"size\":_vm.size},on:{\"change\":_vm.cascaderOnChange},model:{value:(_vm.cascaderSelected),callback:function ($$v) {_vm.cascaderSelected=$$v},expression:\"cascaderSelected\"}})],1),(\n        _vm.hasPermission([\n          'admin',\n          'planadmin',\n          'hradmin',\n          'archiveadmin',\n          'tushaaladmin',\n          'crmadmin',\n          'contentadmin',\n          'webadmin',\n          'learningadmin',\n          'researcheradmin',\n        ]) &&\n          !_vm.disabled &&\n          !_vm.disableAdd\n      )?_c('div',{staticClass:\"wd-10p mg-l-5\"},[_c('button',{staticClass:\"btn btn-outline-light\",attrs:{\"type\":\"button\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.showModal()}}},[_c('b-icon',{attrs:{\"icon\":\"plus\"}})],1)]):_vm._e()]),_c('b-modal',{attrs:{\"scrollable\":\"\",\"centered\":\"\",\"body-class\":\"pd-0\",\"size\":\"lg\"},on:{\"hide\":function($event){return _vm.modalClose()}},scopedSlots:_vm._u([{key:\"modal-header\",fn:function(){return [_c('a',{staticClass:\"close pos-absolute t-15 r-15\",attrs:{\"role\":\"button\",\"aria-label\":\"Close\"},on:{\"click\":function($event){return _vm.modalClose()}}},[_c('span',{attrs:{\"aria-hidden\":\"true\"}},[_vm._v(\"×\")])]),_c('div',{staticClass:\"media align-items-center\"},[_c('feather',{attrs:{\"type\":\"folder\"}}),_c('div',{staticClass:\"media-body mg-sm-l-20\"},[_c('h4',{staticClass:\"tx-18 tx-sm-20 mg-b-2\"},[_vm._v(\" Төрөл \"+_vm._s(_vm.selectedTypeId == 0 ? \"үүсгэх\" : \"засах\")+\" \")]),_c('p',{staticClass:\"tx-13 tx-color-03 mg-b-0\"},[_vm._v(\" Тохирох утгуудыг бөглөөд хадгалах дарна уу \")])])],1)]},proxy:true},{key:\"modal-footer\",fn:function(){return [_c('button',{staticClass:\"btn btn-white\",attrs:{\"type\":\"button\"},on:{\"click\":function($event){return _vm.modalClose()}}},[_vm._v(\" Болих \")]),_c('button',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.editMode),expression:\"editMode\"}],staticClass:\"btn btn-primary\",on:{\"click\":_vm.saveLocType}},[_vm._v(\" \"+_vm._s(_vm.selectedTypeId == 0 ? \"Үүсгэх\" : \"Засах\")+\" \")])]},proxy:true}]),model:{value:(_vm.modalShow),callback:function ($$v) {_vm.modalShow=$$v},expression:\"modalShow\"}},[_c('div',{staticClass:\"d-flex\"},[_c('div',{staticClass:\"wd-40p\"},[_c('div',{staticClass:\"pd-10 bg-white bd-b\"},[_c('button',{staticClass:\"btn btn-outline-light btn-xs btn-block\",on:{\"click\":function($event){return _vm.addSub(0)}}},[_c('i',{staticClass:\"icon ion-md-add tx-14 mg-r-5 pd-t-5\"}),_vm._v(\" Шинэ төрөл үүсгэх \")])]),_c('Tree',{staticClass:\"tree-sel-filemenu manual-tree\",attrs:{\"data\":_vm.list},on:{\"node-click\":_vm.handleTreeSelect}})],1),_c('div',{staticClass:\"wd-60p bd-l\"},[(_vm.selectedTypeId != 0)?_c('div',{staticClass:\"pd-10 bg-white bd-b\"},[_c('button',{staticClass:\"btn btn-outline-primary btn-xs\",on:{\"click\":function($event){return _vm.addSub(_vm.selectedTypeId)}}},[_c('i',{staticClass:\"icon ion-md-add tx-14 mg-r-5 pd-t-5\"}),_vm._v(\" Дэд төрөл нэмэх \")]),(\n              _vm.hasPermission([\n                'admin',\n                'hradmin',\n                'archiveadmin',\n                'tushaaladmin',\n                'crmadmin',\n                'contentadmin',\n                'webadmin',\n                'learningadmin',\n              ])\n            )?_c('button',{staticClass:\"btn btn-outline-danger btn-xs\",on:{\"click\":function($event){return _vm.deleteType(_vm.selectedTypeId)}}},[_c('i',{staticClass:\"icon ion-md-trash tx-14 mg-r-5 pd-t-5 mg-l-5\"}),_vm._v(\" Устгах \")]):_vm._e()]):_vm._e(),_c('Form',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.editMode),expression:\"editMode\"}],staticClass:\"pd-10\",model:{value:(_vm.locTypeModel),callback:function ($$v) {_vm.locTypeModel=$$v},expression:\"locTypeModel\"}},[_c('FormItem',{staticClass:\"m-b-sm\",attrs:{\"label\":\"Парент\"}},[(\n                _vm.listFlat.filter((x) => x.id == _vm.locTypeModel.parentId).length >\n                  0\n              )?_c('span',[_vm._v(_vm._s(_vm.listFlat.filter((x) => x.id == _vm.locTypeModel.parentId)[0].title))]):_c('span',[_vm._v(\"~\")])]),_c('FormItem',{staticClass:\"m-b-sm\",attrs:{\"label\":\"Нэр\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.locTypeModel.name),expression:\"locTypeModel.name\"}],staticClass:\"el-input__inner\",attrs:{\"placeholder\":\"___\",\"type\":\"text\"},domProps:{\"value\":(_vm.locTypeModel.name)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(_vm.locTypeModel, \"name\", $event.target.value)}}})]),_c('FormItem',{staticClass:\"m-b-sm\",attrs:{\"label\":\"Утга\"}},[_c('Input',{attrs:{\"placeholder\":\"___\"},model:{value:(_vm.locTypeModel.value),callback:function ($$v) {_vm.$set(_vm.locTypeModel, \"value\", $$v)},expression:\"locTypeModel.value\"}})],1),_c('FormItem',{staticClass:\"m-b-sm\",attrs:{\"label\":_vm.getLbl()}},[_c('Input',{attrs:{\"placeholder\":\"___\"},model:{value:(_vm.locTypeModel.code),callback:function ($$v) {_vm.$set(_vm.locTypeModel, \"code\", $$v)},expression:\"locTypeModel.code\"}})],1),_c('FormItem',{staticClass:\"m-b-sm\",attrs:{\"label\":\"Дараалал\"}},[_c('InputNumber',{attrs:{\"placeholder\":\"___\"},model:{value:(_vm.locTypeModel.ord),callback:function ($$v) {_vm.$set(_vm.locTypeModel, \"ord\", $$v)},expression:\"locTypeModel.ord\"}})],1),_c('FormItem',{staticClass:\"m-b-sm\",attrs:{\"label\":`${\n                _vm.locTypeModel.key == 'courseType'\n                  ? 'Сертификат загвар'\n                  : 'Хавсралт'\n              }`}},[_c('simple-uploader',{attrs:{\"propObjectTypeId\":6},on:{\"on-success\":_vm.fileUploaded},model:{value:(_vm.locTypeModel.attachId),callback:function ($$v) {_vm.$set(_vm.locTypeModel, \"attachId\", $$v)},expression:\"locTypeModel.attachId\"}},[_c('div',{attrs:{\"slot\":\"trigger\"},slot:\"trigger\"},[(_vm.locTypeModel.attachId == null)?_c('div',{staticClass:\"btn btn-primary\"},[_c('label',{staticClass:\"custom-file-label\",staticStyle:{\"margin-bottom\":\"0\"}},[_vm._v(\"Файл сонгоогүй байна\")])]):_c('div',{staticClass:\"btn-group wd-100p ht-40-f\"},[_c('div',{staticClass:\"btn btn-outline-primary wd-50p\",on:{\"click\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.showAttach(_vm.locTypeModel.attachId)}}},[_c('feather',{attrs:{\"type\":\"eye\"}}),_vm._v(\"Харах \")],1),_c('div',{staticClass:\"btn btn-outline-danger wd-50p\",on:{\"click\":function($event){$event.preventDefault();$event.stopPropagation();_vm.locTypeModel.attachId = null}}},[_c('feather',{attrs:{\"type\":\"x\"}}),_vm._v(\"Болих \")],1)])])])],1),(_vm.locTypeModel.key == 'courseType')?_c('FormItem',{staticClass:\"m-b-sm\",attrs:{\"label\":\"Ковер зураг\"}},[_c('simple-uploader',{attrs:{\"propObjectTypeId\":6},on:{\"on-success\":_vm.coverUploaded},model:{value:(_vm.locTypeModel.field1),callback:function ($$v) {_vm.$set(_vm.locTypeModel, \"field1\", $$v)},expression:\"locTypeModel.field1\"}},[_c('div',{attrs:{\"slot\":\"trigger\"},slot:\"trigger\"},[(_vm.locTypeModel.field1 == null)?_c('div',{staticClass:\"btn btn-primary\"},[_c('label',{staticClass:\"custom-file-label\",staticStyle:{\"margin-bottom\":\"0\"}},[_vm._v(\"Файл сонгоогүй байна\")])]):_c('div',{staticClass:\"btn-group wd-100p ht-40-f\"},[_c('div',{staticClass:\"btn btn-outline-primary wd-50p\",on:{\"click\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.showAttach(_vm.locTypeModel.field1, true)}}},[_c('feather',{attrs:{\"type\":\"eye\"}}),_vm._v(\"Харах \")],1),_c('div',{staticClass:\"btn btn-outline-danger wd-50p\",on:{\"click\":function($event){$event.preventDefault();$event.stopPropagation();_vm.locTypeModel.field1 = null}}},[_c('feather',{attrs:{\"type\":\"x\"}}),_vm._v(\"Болих \")],1)])])])],1):_vm._e(),(_vm.locTypeModel.key == 'courseType')?_c('FormItem',{staticClass:\"m-b-sm\",attrs:{\"label\":\"Төрлийн сургалтуудыг сурагчийн эхлэл хуудсанд харуулах ?\"}},[_c('Select',{model:{value:(_vm.locTypeModel.i1),callback:function ($$v) {_vm.$set(_vm.locTypeModel, \"i1\", $$v)},expression:\"locTypeModel.i1\"}},[_c('Option',{attrs:{\"value\":0,\"label\":\"Үгүй\"}}),_c('Option',{attrs:{\"value\":1,\"label\":\"Тийм\"}})],1)],1):_vm._e(),(_vm.locTypeModel.key == 'courseType')?_c('FormItem',{staticClass:\"m-b-sm\",attrs:{\"label\":\"Төрлийн сургалтуудыг сурагчийн цэсэнд харуулах ?\"}},[_c('Select',{model:{value:(_vm.locTypeModel.field2),callback:function ($$v) {_vm.$set(_vm.locTypeModel, \"field2\", $$v)},expression:\"locTypeModel.field2\"}},[_c('Option',{attrs:{\"value\":\"0\",\"label\":\"Үгүй\"}}),_c('Option',{attrs:{\"value\":\"1\",\"label\":\"Тийм\"}})],1)],1):_vm._e(),(_vm.locTypeModel.key == 'userManualMenu')?_c('FormItem',{staticClass:\"m-b-sm\",attrs:{\"label\":\"Харагдац\"}},[_c('Input',{attrs:{\"placeholder\":\"___\"},model:{value:(_vm.locTypeModel.field1),callback:function ($$v) {_vm.$set(_vm.locTypeModel, \"field1\", $$v)},expression:\"locTypeModel.field1\"}})],1):_vm._e()],1)],1)])]),_c('b-modal',{attrs:{\"hide-footer\":\"\",\"size\":\"lg\",\"scrollable\":\"\"},model:{value:(_vm.fileDialog.modal),callback:function ($$v) {_vm.$set(_vm.fileDialog, \"modal\", $$v)},expression:\"fileDialog.modal\"}},[_c('div',{staticClass:\"modal-body pd-0\"},[(_vm.fileDialog.blank)?[_c('img',{staticClass:\"wd-100p\",attrs:{\"src\":_vm.fileDialog.src}})]:_c('file-dialog',{attrs:{\"show\":_vm.fileDialog.show,\"id\":_vm.fileDialog.id,\"force\":true},on:{\"update:id\":function($event){return _vm.$set(_vm.fileDialog, \"id\", $event)},\"on-hide\":function($event){_vm.fileDialog.show = false}}})],2)])],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <div>\n    <div class=\"d-flex\">\n      <div :class=\"`wd-${disableAdd ? '100p' : '80p'}`\">\n        <Cascader\n          :placeholder=\"placeholder\"\n          filterable\n          :options=\"list\"\n          :props=\"{ checkStrictly: checkStrictly, multiple: multiple }\"\n          v-model=\"cascaderSelected\"\n          @change=\"cascaderOnChange\"\n          :disabled=\"disabled\"\n          clearable\n          style=\"width:100%\"\n          :size=\"size\"\n        ></Cascader>\n\n        <!-- <template slot-scope=\"{ node, data }\">\n        <span>{{ data.label }} </span>\n        <span v-if=\"!node.isLeaf\"> ({{ data.children.length }}) </span>\n        \n        </template>-->\n      </div>\n\n      <div\n        v-if=\"\n          hasPermission([\n            'admin',\n            'planadmin',\n            'hradmin',\n            'archiveadmin',\n            'tushaaladmin',\n            'crmadmin',\n            'contentadmin',\n            'webadmin',\n            'learningadmin',\n            'researcheradmin',\n          ]) &&\n            !disabled &&\n            !disableAdd\n        \"\n        class=\"wd-10p mg-l-5\"\n      >\n        <!-- <Button class=\"ivu-btn ivu-btn-default\" :size=\"size\" @click=\"showModal()\">\n          <b-icon icon=\"plus\"></b-icon>\n        </Button>-->\n        <button\n          class=\"btn btn-outline-light\"\n          @click.stop=\"showModal()\"\n          type=\"button\"\n        >\n          <b-icon icon=\"plus\"></b-icon>\n        </button>\n      </div>\n    </div>\n    <b-modal\n      v-model=\"modalShow\"\n      @hide=\"modalClose()\"\n      scrollable\n      centered\n      body-class=\"pd-0\"\n      size=\"lg\"\n    >\n      <template #modal-header>\n        <!-- <div class=\"modal-header pd-y-20 pd-x-20 pd-sm-x-30\"> -->\n        <a\n          role=\"button\"\n          aria-label=\"Close\"\n          class=\"close pos-absolute t-15 r-15\"\n          @click=\"modalClose()\"\n        >\n          <span aria-hidden=\"true\">×</span>\n        </a>\n        <div class=\"media align-items-center\">\n          <feather type=\"folder\"></feather>\n          <div class=\"media-body mg-sm-l-20\">\n            <h4 class=\"tx-18 tx-sm-20 mg-b-2\">\n              Төрөл {{ selectedTypeId == 0 ? \"үүсгэх\" : \"засах\" }}\n            </h4>\n            <p class=\"tx-13 tx-color-03 mg-b-0\">\n              Тохирох утгуудыг бөглөөд хадгалах дарна уу\n            </p>\n          </div>\n        </div>\n        <!-- </div> -->\n      </template>\n      <div class=\"d-flex\">\n        <div class=\"wd-40p\">\n          <div class=\"pd-10 bg-white bd-b\">\n            <button\n              class=\"btn btn-outline-light btn-xs btn-block\"\n              @click=\"addSub(0)\"\n            >\n              <i class=\"icon ion-md-add tx-14 mg-r-5 pd-t-5\"></i> Шинэ төрөл\n              үүсгэх\n            </button>\n          </div>\n          <Tree\n            class=\"tree-sel-filemenu manual-tree\"\n            :data=\"list\"\n            @node-click=\"handleTreeSelect\"\n          ></Tree>\n        </div>\n        <div class=\"wd-60p bd-l\">\n          <div class=\"pd-10 bg-white bd-b\" v-if=\"selectedTypeId != 0\">\n            <!-- <Button @click=\"addSub(0)\" type=\"success\">\n                <i class=\"ivu-icon ivu-icon-md-add\"></i> Шинэ\n            </Button>-->\n            <!-- <span>{{selectedLabel}}</span> -->\n            <!-- <button\n              type=\"warning\"\n              class=\"btn btn-outline-warning btn-xs mg-r-5\"\n              @click=\"editSub(selectedTypeId)\"\n            >+\n              <i class=\"icon ion-md-settings tx-14 mg-r-5 pd-t-5\"></i> Засах\n            </button>-->\n            <button\n              class=\"btn btn-outline-primary btn-xs\"\n              @click=\"addSub(selectedTypeId)\"\n            >\n              <i class=\"icon ion-md-add tx-14 mg-r-5 pd-t-5\"></i> Дэд төрөл\n              нэмэх\n            </button>\n            <button\n              class=\"btn btn-outline-danger btn-xs\"\n              @click=\"deleteType(selectedTypeId)\"\n              v-if=\"\n                hasPermission([\n                  'admin',\n                  'hradmin',\n                  'archiveadmin',\n                  'tushaaladmin',\n                  'crmadmin',\n                  'contentadmin',\n                  'webadmin',\n                  'learningadmin',\n                ])\n              \"\n            >\n              <i class=\"icon ion-md-trash tx-14 mg-r-5 pd-t-5 mg-l-5\"></i>\n              Устгах\n            </button>\n            <!-- <ButtonGroup>\n              <Button v-if=\"selectedTypeId != 0\" type=\"warning\" @click=\"editSub(selectedTypeId)\">\n                <i class=\"ivu-icon ivu-icon-md-settings\"></i> Засах\n              </Button>\n              <Button v-if=\"selectedTypeId != 0\" type=\"primary\" @click=\"addSub(selectedTypeId)\">\n                <i class=\"ivu-icon ivu-icon-md-share\"></i> Дэд төрөл нэмэх\n              </Button>\n            </ButtonGroup>-->\n          </div>\n          <Form v-show=\"editMode\" v-model=\"locTypeModel\" class=\"pd-10\">\n            <FormItem label=\"Парент\" class=\"m-b-sm\">\n              <span\n                v-if=\"\n                  listFlat.filter((x) => x.id == locTypeModel.parentId).length >\n                    0\n                \"\n                >{{\n                  listFlat.filter((x) => x.id == locTypeModel.parentId)[0].title\n                }}</span\n              >\n              <span v-else>~</span>\n            </FormItem>\n            <FormItem label=\"Нэр\" class=\"m-b-sm\">\n              <!-- <Input v-model=\"locTypeModel.name\" placeholder=\"___\" /> -->\n              <input\n                v-model=\"locTypeModel.name\"\n                placeholder=\"___\"\n                type=\"text\"\n                class=\"el-input__inner\"\n              />\n            </FormItem>\n            <FormItem label=\"Утга\" class=\"m-b-sm\">\n              <Input v-model=\"locTypeModel.value\" placeholder=\"___\" />\n            </FormItem>\n            <FormItem :label=\"getLbl()\" class=\"m-b-sm\">\n              <Input v-model=\"locTypeModel.code\" placeholder=\"___\" />\n            </FormItem>\n            <FormItem label=\"Дараалал\" class=\"m-b-sm\">\n              <InputNumber\n                v-model=\"locTypeModel.ord\"\n                placeholder=\"___\"\n              ></InputNumber>\n            </FormItem>\n            <FormItem\n              :label=\"\n                `${\n                  locTypeModel.key == 'courseType'\n                    ? 'Сертификат загвар'\n                    : 'Хавсралт'\n                }`\n              \"\n              class=\"m-b-sm\"\n            >\n              <simple-uploader\n                v-model=\"locTypeModel.attachId\"\n                :propObjectTypeId=\"6\"\n                @on-success=\"fileUploaded\"\n              >\n                <div slot=\"trigger\">\n                  <div\n                    v-if=\"locTypeModel.attachId == null\"\n                    class=\"btn btn-primary\"\n                  >\n                    <label style=\"margin-bottom: 0\" class=\"custom-file-label\"\n                      >Файл сонгоогүй байна</label\n                    >\n                  </div>\n                  <div v-else class=\"btn-group wd-100p ht-40-f\">\n                    <div\n                      class=\"btn btn-outline-primary wd-50p\"\n                      @click.prevent.stop=\"showAttach(locTypeModel.attachId)\"\n                    >\n                      <feather type=\"eye\"></feather>Харах\n                    </div>\n                    <div\n                      class=\"btn btn-outline-danger wd-50p\"\n                      @click.prevent.stop=\"locTypeModel.attachId = null\"\n                    >\n                      <feather type=\"x\"></feather>Болих\n                    </div>\n                  </div>\n                </div>\n              </simple-uploader>\n            </FormItem>\n            <FormItem\n              v-if=\"locTypeModel.key == 'courseType'\"\n              label=\"Ковер зураг\"\n              class=\"m-b-sm\"\n            >\n              <simple-uploader\n                v-model=\"locTypeModel.field1\"\n                :propObjectTypeId=\"6\"\n                @on-success=\"coverUploaded\"\n              >\n                <div slot=\"trigger\">\n                  <div\n                    v-if=\"locTypeModel.field1 == null\"\n                    class=\"btn btn-primary\"\n                  >\n                    <label style=\"margin-bottom: 0\" class=\"custom-file-label\"\n                      >Файл сонгоогүй байна</label\n                    >\n                  </div>\n                  <div v-else class=\"btn-group wd-100p ht-40-f\">\n                    <div\n                      class=\"btn btn-outline-primary wd-50p\"\n                      @click.prevent.stop=\"\n                        showAttach(locTypeModel.field1, true)\n                      \"\n                    >\n                      <feather type=\"eye\"></feather>Харах\n                    </div>\n                    <div\n                      class=\"btn btn-outline-danger wd-50p\"\n                      @click.prevent.stop=\"locTypeModel.field1 = null\"\n                    >\n                      <feather type=\"x\"></feather>Болих\n                    </div>\n                  </div>\n                </div>\n              </simple-uploader>\n            </FormItem>\n            <FormItem\n              v-if=\"locTypeModel.key == 'courseType'\"\n              label=\"Төрлийн сургалтуудыг сурагчийн эхлэл хуудсанд харуулах ?\"\n              class=\"m-b-sm\"\n            >\n              <Select v-model=\"locTypeModel.i1\">\n                <Option :value=\"0\" label=\"Үгүй\"></Option>\n                <Option :value=\"1\" label=\"Тийм\"></Option>\n              </Select>\n            </FormItem>\n            <FormItem\n              v-if=\"locTypeModel.key == 'courseType'\"\n              label=\"Төрлийн сургалтуудыг сурагчийн цэсэнд харуулах ?\"\n              class=\"m-b-sm\"\n            >\n              <Select v-model=\"locTypeModel.field2\">\n                <Option value=\"0\" label=\"Үгүй\"></Option>\n                <Option value=\"1\" label=\"Тийм\"></Option>\n              </Select>\n            </FormItem>\n            <FormItem\n              v-if=\"locTypeModel.key == 'userManualMenu'\"\n              label=\"Харагдац\"\n              class=\"m-b-sm\"\n            >\n              <Input v-model=\"locTypeModel.field1\" placeholder=\"___\" />\n            </FormItem>\n          </Form>\n        </div>\n      </div>\n      <template #modal-footer>\n        <!-- <div class=\"modal-footer pd-x-20 pd-y-15\"> -->\n        <button type=\"button\" class=\"btn btn-white\" @click=\"modalClose()\">\n          Болих\n        </button>\n        <button v-show=\"editMode\" class=\"btn btn-primary\" @click=\"saveLocType\">\n          {{ selectedTypeId == 0 ? \"Үүсгэх\" : \"Засах\" }}\n        </button>\n        <!-- </div> -->\n      </template>\n    </b-modal>\n    <!-- <Dialog :transition-names=\"[]\" :visible.sync=\"modalShow\" width=\"800\" footer-hide :close-on-click-modal=\"false\">\n      \n    </Dialog>-->\n    <b-modal v-model=\"fileDialog.modal\" hide-footer size=\"lg\" scrollable>\n      <div class=\"modal-body pd-0\">\n      <template v-if=\"fileDialog.blank\">\n        <img class=\"wd-100p\" :src=\"fileDialog.src\" />\n      </template>\n      <file-dialog\n        v-else\n        :show=\"fileDialog.show\"\n        :id.sync=\"fileDialog.id\"\n        @on-hide=\"fileDialog.show = false\"\n        :force=\"true\"\n      />\n    </div>\n    </b-modal>\n  </div>\n</template>\n\n<script>\nimport AsyncLoadError from \"@/components/base/asyncLoadingError\";\nimport AsyncLoading from \"@/components/base/asyncLoading\";\n\nimport { getTypeTreeData } from \"@/api/type\";\nimport { request } from \"@/api/all\";\nimport { hasOneOf } from \"@/libs/tools\";\nimport \"element-ui/lib/theme-chalk/index.css\";\nimport {\n  Cascader,\n  //ButtonGroup,\n  //Button,\n  FormItem,\n  InputNumber,\n  Input,\n  Form,\n  Tree,\n  Checkbox,\n  Select,\n  Option,\n} from \"element-ui\";\n\nvar LTT = require(\"list-to-tree\");\n\nvar _ = require(\"lodash\");\n\nexport default {\n  components: {\n    Cascader,\n    //ButtonGroup,\n    //Button,\n    FormItem,\n    InputNumber,\n    Input,\n    Form,\n    Tree,\n    Checkbox,\n    Select,\n    Option,\n    simpleUploader: () => ({\n      component: import(\"@/components/modules/media/simpleUploader.vue\"),\n      loading: AsyncLoading,\n      error: AsyncLoadError,\n      delay: 100,\n      timeout: 5000,\n    }),\n    fileDialog: () => ({\n      component: import(\"@/components/modules/media/previewPage.vue\"),\n      loading: AsyncLoading,\n      error: AsyncLoadError,\n      delay: 100,\n      timeout: 5000,\n    }),\n  },\n  name: \"locTypeCascader\",\n  props: {\n    id: {\n      type: Number,\n      default: () => 0,\n    },\n    locTypekey: {\n      type: String,\n      default: () => \"\",\n    },\n    guid: {\n      type: String,\n      default: () => \"\",\n    },\n    getParentType: {\n      type: Boolean,\n      default: () => false,\n    },\n    disabled: {\n      type: Boolean,\n      default: () => false,\n    },\n    disableAdd: {\n      type: Boolean,\n      default: () => false,\n    },\n    size: {\n      type: String,\n      default: () => \"medium\",\n    },\n    checkStrictly: {\n      type: Boolean,\n      default: () => false,\n    },\n    withUserId: {\n      type: String,\n      default: () => \"\",\n    },\n    parentFilterable: {\n      type: Boolean,\n      default: () => false,\n    },\n    parentId: {\n      type: Number,\n      default: () => 0,\n    },\n    placeholder: {\n      type: String,\n      default: () => \"Сонгоно уу\",\n    },\n    multiple: {\n      type: Boolean,\n      default: () => false,\n    },\n  },\n  data() {\n    return {\n      list: [],\n      listFlat: [],\n      cascaderSelected: [],\n      modalShow: false,\n      selectedTypeId: 0,\n      selectedLabel: \"\",\n      locTypeModel: {\n        parentId: 0,\n      },\n      editMode: false,\n      postedId: 0,\n      fileDialog: {\n        modal: false,\n        show: false,\n        id: 0,\n        blank: false,\n        src: \"\",\n      },\n    };\n  },\n  mounted() {\n    this.init();\n  },\n  methods: {\n    sortByLabel(a, b) {\n      return a.label.localeCompare(b.label);\n    },\n    sortTreeNodes(node, comparator) {\n      let self = this;\n      if (node.children != undefined && node.children.length > 0) {\n        // console.log('node', node);\n        // node.children.sort(comparator);\n        node.children = _.orderBy(\n          node.children,\n          [\"ord\", \"label\"],\n          [\"asc\", \"asc\"]\n        );\n        node.children.forEach((child) => self.sortTreeNodes(child, comparator));\n      }\n    },\n    compareById(vector) {\n      return (a, b) => {\n        const aid = Number(a.get(\"ord\"));\n        const bid = Number(b.get(\"ord\"));\n        if (aid > bid) {\n          return vector ? 1 : -1;\n        } else if (aid < bid) {\n          return vector ? -1 : 1;\n        } else {\n          return 0;\n        }\n      };\n    },\n    getLbl() {\n      let rv = \"\";\n      if (this.locTypeModel.key == \"userManualMenu\") {\n        rv = \"Icon\";\n      } else if (this.locTypeModel.key == \"internalAuditProblemLegal\") {\n        rv = \"Legal info\";\n      } else rv = \"Код\";\n      return rv;\n    },\n    hasPermission(perrArr) {\n      return hasOneOf(perrArr, this.$store.state.user.access);\n    },\n    showAttach(id, blank) {\n      if (blank != undefined && blank) {\n        this.fileDialog.blank = true;\n        this.fileDialog.src = id;\n      } else {\n        this.fileDialog.blank = false;\n        this.fileDialog.id = id;\n      }\n      this.fileDialog.show = true;\n      this.fileDialog.modal = true;\n    },\n    init() {\n      getTypeTreeData({\n        params: {\n          key: this.locTypekey,\n          getParentType: this.getParentType,\n          userId: this.withUserId,\n        },\n        store: this.$store,\n      }).then((res) => {\n        if (!this.parentFilterable) {\n          if (\n            this.locTypekey == \"stptpCRM\" &&\n            hasOneOf(\n              [\"zuvlul.stf.gov.mn\"],\n              this.$store.state.app.activeGroup.hostPro\n            )\n          ) {\n            res.data.types = res.data.types.filter((x) =>\n              hasOneOf([x.id], [346685, 346686])\n            );\n          }\n          let dataTypes = res.data.types;\n\n          // let dataTypes = _.orderBy(res.data.types, [\"ord\"], [\"asc\"]);\n          // let dataTypes = _.orderBy(res.data.types, [\"id\"], [\"asc\"]);\n          // console.log('dataTypes', dataTypes);\n\n          this.listFlat = dataTypes;\n          var ltt = new LTT(dataTypes, {\n            key_id: \"id\",\n            key_parent: \"parentId\",\n            key_child: \"children\",\n            // key_ord: \"ord\",\n            label: \"label\",\n          });\n          // ltt.sort(this.compareById(true))\n          this.list = ltt.GetTree();\n          this.list = _.orderBy(\n            ltt.GetTree(),\n            [\"ord\", \"label\"],\n            [\"asc\", \"asc\"]\n          );\n          this.list.forEach((node) =>\n            this.sortTreeNodes(node, this.sortByLabel)\n          );\n          // console.log('list', this.list);\n          //console.log('res.data.types', this.list);\n          this.cascaderSelected = [];\n          if (this.id > 0 || this.postedId > 0) {\n            this.cascaderModelRecursive(\n              this.listFlat,\n              this.postedId > 0 ? this.postedId : this.id\n            );\n            this.cascaderSelected = this.cascaderSelected.reverse();\n          } else this.cascaderSelected = [];\n        } else {\n          this.locTypeModel.parentId = this.parentId;\n          let parentType = res.data.types.filter((x) => x.id == this.parentId);\n          let dataTypes = res.data.types.filter(\n            (x) => x.parentId == this.parentId\n          );\n          this.listFlat = this.listFlat.concat(dataTypes);\n          if (parentType.length > 0) this.listFlat.push(parentType[0]);\n          this.list = dataTypes.map((x) => {\n            return x;\n          });\n\n          if (this.id > 0 || this.postedId > 0) {\n            this.cascaderSelected = [this.id];\n            // this.cascaderModelRecursive(\n            //   this.listFlat,\n            //   this.postedId > 0 ? this.postedId : this.id\n            // );\n            // this.cascaderSelected = this.cascaderSelected.reverse();\n          } else this.cascaderSelected = [];\n\n          //console.log(\"cascadered\",this.cascaderSelected);\n        }\n      });\n    },\n    cascaderModelRecursive(data, cid) {\n      this.cascaderSelected.push(cid);\n      if (data.filter((d) => d.id == cid).length) {\n        let pid = data.filter((d) => d.id == cid)[0].parentId;\n        if (pid > 0) {\n          this.cascaderModelRecursive(data, pid);\n        }\n      }\n    },\n    cascaderOnChange(value) {\n      //console.log(\"cascaderOnChange\", value);\nlet _lasts = [];\n      if (this.multiple) {\n        value.forEach((x) => {\n          // if (Array.isArray(e[x])) {\n          //   e[x].forEach((a) => {\n          //     params += \"&\" + x + \"=\" + a;\n          //   });\n          // } else {\n          //   params += \"&\" + x + \"=\" + e[x];\n          // }\n          let _id = x[x.length - 1] != undefined ? x[x.length - 1] : null;\n          _lasts.push(_id);\n        });\n        //console.log('_lasts', _lasts);\n        this.$emit(\"input\", _lasts);\n      } else {\n        if (value.length) {\n          let _id =\n            value[value.length - 1] != undefined\n              ? value[value.length - 1]\n              : null;\n          this.$emit(\"loctype-selected\", {\n            id: _id,\n            guid: this.guid,\n            dta: this.listFlat,\n          });\n          this.$emit(\"input\", _id);\n\n          let selectedData = this.listFlat.filter((x) => x.id == _id);\n          this.$emit(\"loctype-selected_withdata\", {\n            id: _id,\n            data: selectedData.length ? selectedData[0] : { code: \"\" },\n          });\n        } else {\n          this.$emit(\"input\", null);\n          this.$emit(\"loctype-cleared\");\n        }\n      }\n    },\n    showModal() {\n      this.modalShow = true;\n      this.addSub(0);\n    },\n    modalClose() {\n      this.locTypeModel = {};\n      this.selectedTypeId = 0;\n      this.modalShow = false;\n    },\n    handleTreeSelect(e) {\n      //console.log('handleTreeSelect=> ', e, this.listFlat);\n      if (e != null) {\n        this.cascaderSelected = [];\n        this.cascaderModelRecursive(this.listFlat, e.id);\n        this.cascaderSelected = this.cascaderSelected.reverse();\n        this.$emit(\"input\", e.id);\n        e.expand = true;\n        this.selectedLabel = e.label;\n        this.selectedTypeId = e.id;\n        this.editSub(this.selectedTypeId);\n      } else {\n        this.cascaderSelected = [];\n        this.$emit(\"input\", 0);\n        this.selectedTypeId = 0;\n        this.selectedLabel = \"\";\n      }\n    },\n    addSub(id) {\n      if (id == 0) this.selectedTypeId = 0;\n      this.editMode = true;\n\n      this.locTypeDetail(0, id == 0 ? 0 : id);\n    },\n    deleteType(id) {\n      // TODO: confirm-g nogoo goyo confirmooroo solih\n      if (\n        confirm(\n          \"Төрлийг устгах гэж байна. Үйлдлийг буцаах боломжгүй. Итгэлтэй байна уу?\"\n        )\n      ) {\n        request({\n          data: { id: id },\n          api: { url: \"Type/DeleteType\", method: \"post\" },\n          store: this.$store,\n        }).then((res) => {\n          if (res != false) {\n            this.editMode = false;\n            this.selectedTypeId = 0;\n            this.init();\n          }\n        });\n      }\n    },\n    editSub(id) {\n      this.editMode = true;\n      this.locTypeDetail(id, 0);\n    },\n\n    locTypeDetail(id, pid) {\n      request({\n        params: { id: id, parentId: pid, key: this.locTypekey },\n        api: { url: \"Type/GetInheritedDetail\", method: \"get\" },\n        store: this.$store,\n      }).then((res) => {\n        //console.log('this.locTypeModel=> ', res.data);\n        this.locTypeModel = res.data;\n        // if(this.locTypeModel.key=\"courseType\" && this.locTypeModel.i1==1){\n        //   this.locTypeModel.i1= true;\n        // }\n\n        if (this.parentFilterable) this.locTypeModel.parentId = this.parentId;\n      });\n    },\n    saveLocType() {\n      // if(this.locTypeModel.i1==true){\n      //   this.locTypeModel.i1=1;\n      // }\n\n      request({\n        data: { model: this.locTypeModel },\n        api: { url: \"Type/PostType\", method: \"post\" },\n        store: this.$store,\n      }).then((res) => {\n        if (res != false) {\n          this.editMode = false;\n          this.postedId = res.data.typeId;\n          this.selectedTypeId = res.data.typeId;\n          this.init();\n        }\n      });\n    },\n\n    //# loc type attachment\n    fileUploaded(e) {\n      this.locTypeModel.attachId = e.uploadedAttachmentId;\n    },\n    coverUploaded(e) {\n      this.locTypeModel.field1 = e.uploadedUrl;\n    },\n  },\n};\n</script>\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./locTypeCascader.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./locTypeCascader.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./locTypeCascader.vue?vue&type=template&id=6d6f917f\"\nimport script from \"./locTypeCascader.vue?vue&type=script&lang=js\"\nexport * from \"./locTypeCascader.vue?vue&type=script&lang=js\"\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  null,\n  null\n  \n)\n\nexport default component.exports","import { requestApi } from \"@/api/core\";\nimport { dynamicDispatcher } from \"@/libs/util\";\n\nexport const getTypeTreeData = ({ data, params, store }) => {\n  return new Promise(resolve => {\n    requestApi({\n      api: \"Type/getTreeData\",\n      method: \"get\",\n      params: params,\n      data: data\n    }).then(res => {\n      if (res != false) {\n        let rs = dynamicDispatcher(res, store);\n        if (rs != false) {\n          resolve(rs);\n        } else {\n          resolve(false);\n        }\n      } else {\n        resolve(false);\n      }\n    });\n  });\n};\n"],"sourceRoot":""}