| | |
| | | formatter_percent = window.top.formatter_percent; |
| | | formatter_password = window.top.formatter_password; |
| | | formatter_split = window.top.formatter_split; |
| | | formatter_replace = window.top.formatter_replace; |
| | | formatter_replace_val = window.top.formatter_replace_val; |
| | | |
| | | formatter_prefixorunit = window.top.formatter_prefixorunit; |
| | | formatter_earlyWarning = window.top.formatter_earlyWarning; |
| | |
| | | ' </template> '+ |
| | | |
| | | ' <template v-else-if="tableField.type == \'icon\'"> '+ |
| | | ' <i v-if="scope.row[tableField.field] && scope.row[tableField.field] != \'0\' && tableFieldClick[tableField.field] && tableFieldClick[tableField.field].val.onclick" :class="[tableField.icon, \'h_cellclick\']" '+ |
| | | ' <i v-if="scope.row[tableField.field] && scope.row[tableField.field] != \'0\' && tableFieldClick[tableField.field] && tableFieldClick[tableField.field].val.onclick" '+ |
| | | ' :class="[(tableFieldClick[tableField.field] && tableFieldClick[tableField.field].val) ? tableFieldClick[tableField.field].val.icon : \'\', \'h_cellclick\']" :style="{color: (tableFieldClick[tableField.field] && tableFieldClick[tableField.field].val) ? tableFieldClick[tableField.field].val.iconcolor : \'#000\'}"'+ |
| | | ' @click.stop="cellValClick(scope.row, tableField, scope.row[tableField.field], \'valclick\')"></i> '+ |
| | | ' <i v-else-if="scope.row[tableField.field] && scope.row[tableField.field] != \'0\'" :class="[tableField.icon, \'h_cellclick\']" ></i> '+ |
| | | ' <i v-else-if="scope.row[tableField.field] && scope.row[tableField.field] != \'0\'" :class="[(tableFieldClick[tableField.field] && tableFieldClick[tableField.field].val) ? tableFieldClick[tableField.field].val.icon : \'\']" :style="{color: (tableFieldClick[tableField.field] && tableFieldClick[tableField.field].val) ? tableFieldClick[tableField.field].val.iconcolor : \'#000\'}"></i> '+ |
| | | |
| | | ' <i v-else-if="!scope.row[tableField.field] && tableField.nullicon" :class="[tableField.nullicon]" ></i> '+ |
| | | //' <i v-else></i> '+ |
| | |
| | | //无点击 |
| | | ' <el-tag v-else size="small" :type="(tableField.tagtype && tableField.tagtype[scope.row[tableField.field]]) ? tableField.tagtype[scope.row[tableField.field]] : \'\'">{{tableFieldClick[tableField.field].defaultval.val}}</el-tag>'+ |
| | | ' </template> '+ |
| | | ' </template> '+ |
| | | ' <template v-else-if="tableField.type == \'icon\'"> '+ |
| | | ' <i v-if="scope.row[tableField.field] && scope.row[tableField.field] != \'0\' && tableFieldClick[tableField.field] && tableFieldClick[tableField.field].val.onclick" '+ |
| | | ' :class="[(tableFieldClick[tableField.field] && tableFieldClick[tableField.field].val) ? tableFieldClick[tableField.field].val.icon : \'\']" :style="{color: (tableFieldClick[tableField.field] && tableFieldClick[tableField.field].val) ? tableFieldClick[tableField.field].val.iconcolor : \'#000\', \'font-size\': \'24px\'}"'+ |
| | | ' @click.stop="cellValClick(scope.row, tableField, scope.row[tableField.field], \'valclick\')"></i> '+ |
| | | ' <i v-else-if="scope.row[tableField.field] && scope.row[tableField.field] != \'0\'" :class="[(tableFieldClick[tableField.field] && tableFieldClick[tableField.field].val) ? tableFieldClick[tableField.field].val.icon : \'\']" :style="{color: (tableFieldClick[tableField.field] && tableFieldClick[tableField.field].val) ? tableFieldClick[tableField.field].val.iconcolor : \'#000\', \'font-size\': \'24px\'}"></i> '+ |
| | | |
| | | ' <i v-else-if="!scope.row[tableField.field] && tableField.nullicon" :class="[tableField.nullicon]" ></i> '+ |
| | | //' <i v-else></i> '+ |
| | | ' </template> '+ |
| | | //如果没有tableField.type并且有值 |
| | | ' <template v-else-if="scope.row[tableField.field] || scope.row[tableField.field] === 0 || scope.row[tableField.field] === false"> '+ |
| | |
| | | // 数据加载时的转圈圈 |
| | | '<div v-loading="istableloading" v-if="istableloading" class="h_table_loading"></div> '+ |
| | | // 表格工具栏 - 标题、功能组、多选 |
| | | '<div v-if="isshowtool && ((tableAttr.istitle && tableAttr.title) || (istablebuttons && tablebuttons.length) || ((isbasicfilterfields && (tableAttr.toolbarobj && tableAttr.toolbarobj.isbasicfilterfields) && tableBasicFilterFields.length) || (isfilterfield && (tableAttr.toolbarobj && tableAttr.toolbarobj.isfilterfield))) || (tableAttr.tag && tableAttr.tag.name)) || ((tableAttr.toolbarobj && ((isbasicfilterfields && tableAttr.toolbarobj.isbasicfilterfields) || (tableAttr.toolbarobj.more_datalist && tableAttr.toolbarobj.more_datalist.length))) || (isshowShoppingcart && (tableAttr.isSelection || isSelection)) || (tableToolButtons && tableToolButtons.length))" class="h_h_table" :ref="\'h_tabletool\' + href"> '+ |
| | | '<div v-if="isshowtool && ((tableAttr.istitle && tableAttr.title) || (istablebuttons && tablebuttons.length) || ((isbasicfilterfields && (tableAttr.toolbarobj && tableAttr.toolbarobj.isbasicfilterfields) && tableBasicFilterFields.length) || (isfilterfield && (tableAttr.toolbarobj && tableAttr.toolbarobj.isfilterfield))) || (tableAttr.tag && tableAttr.tag.name)) || ((tableAttr.toolbarobj && (tableAttr.toolbarobj.more_datalist && tableAttr.toolbarobj.more_datalist.length)) || (isshowShoppingcart && (tableAttr.isSelection || isSelection)) || (tableToolButtons && tableToolButtons.length))" class="h_h_table" :ref="\'h_tabletool\' + href"> '+ |
| | | // 表格本身功能(标题、字段顺序、表刷新、表标签) |
| | | '<div v-if="(tableAttr.istitle && tableAttr.title) || (istablebuttons && tablebuttons.length) || ((isbasicfilterfields && (tableAttr.toolbarobj && tableAttr.toolbarobj.isbasicfilterfields) && tableBasicFilterFields.length) || (isfilterfield && (tableAttr.toolbarobj && tableAttr.toolbarobj.isfilterfield))) || (tableAttr.tag && tableAttr.tag.name)" class="h_table_tool_left">'+ |
| | | // 标题 |
| | | '<div v-if="tableAttr.istitle && tableAttr.title" class="h_table_title">'+ |
| | | '<div v-if="tableAttr.istitle && tableAttr.title" class="h_table_title ">'+ |
| | | '<i class="iconfont icon-fuzhushuxian" style="color: #0270c1;"></i>'+ |
| | | '<span style="font-size: 14px;">{{tableAttr.title}}</span>'+ |
| | | '</div> '+ |
| | | //表字段配置 |
| | | '<div v-if="istablebuttons && tablebuttons.length" class="h_table_title"> '+ |
| | | '<div v-if="istablebuttons && tablebuttons.length" class="h_table_title "> '+ |
| | | '<div v-if="isdraggableorder && doTableFields.length > 0" class="h_table_editfield"> '+ |
| | | '<h-draggable-order-tree :switchfloat="isdraggableorder_switchfloat" :datalist="doTableFields" :selectdatalist="showTableFields" :identificationfield="identificationfield" '+ |
| | | ':labelfield="orderlabelfield" :isselectfield="orderisselect" :isdraggablegroup="isdraggablegroup" icon="el-icon-setting" title="表格字段设置" v-on:save-order="saveOrder"> '+ |
| | |
| | | else if(e.formatter == "formatter_password") { |
| | | e.formatter_f = function(a,b,c,d) {return formatter_password(a,b,c,d)} |
| | | } |
| | | |
| | | else if(e.formatter == "formatter_earlyWarning") { |
| | | e.formatter_f = function(a,b,c,d) {return formatter_earlyWarning(a,b,c,d)} |
| | | } |
| | | |
| | | |
| | | else if(e.formatter == "formatter_replace") { |
| | | var format = e.formatpattern;//替换的字段格式 |
| | | e.formatter_f = function(a,b,c,d) {return formatter_replace(a,b,c,d, format)} |
| | | } |
| | | else if(e.formatter == "formatter_replace_val") { |
| | | var format = e.formatpattern;//替换的字段格式,有值才替换 |
| | | e.formatter_f = function(a,b,c,d) {return formatter_replace_val(a,b,c,d, format)} |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | ' :disabled = "typeof (fieldObj.disabled) != \'undefined\' ? fieldObj.disabled : (disabled ? true : false)" '+ |
| | | ' :value="formData[fieldObj.field] && formData[fieldObj.field].length == fieldObj.options.length ? true : false" @change="handleCheckAllChange($event, fieldObj, formData)">全选</el-checkbox>'+ |
| | | |
| | | '<el-checkbox-group v-model="formData[fieldObj.field]" class="h_form_checkboxgroup" '+ |
| | | '<el-checkbox-group v-model="formData[fieldObj.field]" class="h_form_checkboxgroup aaa" '+ |
| | | ' :disabled = "typeof (fieldObj.disabled) != \'undefined\' ? fieldObj.disabled : (disabled ? true : false)" @change="formchange($event, fieldObj)"> '+ |
| | | '<el-checkbox v-for="(o, k) in fieldObj.options" :key="k" :label="o.code"><div :style="{width: fieldObj.valuewidth ? fieldObj.valuewidth : \'100%\'}">{{o.value}}</div></el-checkbox> '+ |
| | | '<el-checkbox v-for="(o, k) in fieldObj.options" :key="\'f_checkboxobj\' + k" :label="o.code"><div :style="{width: fieldObj.valuewidth ? fieldObj.valuewidth : \'100%\'}">{{o.value}}</div></el-checkbox> '+ |
| | | '</el-checkbox-group> '+ |
| | | '</div>'+ |
| | | '<div v-else>'+ |
| | |
| | | var unit = e.suffix;//后缀或单位 |
| | | this.formDataFace[prop] = formatter_prefixorunit(null, null, value, null, prefix, unit); |
| | | } |
| | | else if(e.formatter == "formatter_replace") { |
| | | var format = e.formatpattern;//拼接的字段格式 format = "#{name}-{name}%" |
| | | this.formDataFace[prop] = formatter_replace(this.formData, null, value, null, format); |
| | | } |
| | | else if(e.formatter == "formatter_replace_val") { |
| | | var format = e.formatpattern;//替换的字段格式,有值才替换 |
| | | this.formDataFace[prop] = formatter_replace_val(this.formData, null, value, null, format); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | var prefix = e.prefix;//前缀 |
| | | var unit = e.suffix;//后缀或单位 |
| | | this.formDataFace[prop] = formatter_prefixorunit(null, null, value, null, prefix, unit); |
| | | } |
| | | else if(e.formatter == "formatter_replace") { |
| | | var format = e.formatpattern;//拼接的字段格式 format = "#{name}-{name}%" |
| | | this.formDataFace[prop] = formatter_replace(this.formData, null, value, null, format); |
| | | } |
| | | else if(e.formatter == "formatter_replace_val") { |
| | | var format = e.formatpattern;//替换的字段格式,有值才替换 |
| | | this.formDataFace[prop] = formatter_replace_val(this.formData, null, value, null, format); |
| | | } |
| | | |
| | | } |
| | |
| | | var unit = e.suffix;//后缀或单位 |
| | | this.formDataFace[prop] = formatter_prefixorunit(null, null, value, null, prefix, unit); |
| | | } |
| | | else if(e.formatter == "formatter_replace") { |
| | | var format = e.formatpattern;//替换的字段格式 |
| | | this.formDataFace[prop] = formatter_replace(this.formData, null, value, null, format); |
| | | } |
| | | else if(e.formatter == "formatter_replace_val") { |
| | | var format = e.formatpattern;//替换的字段格式,有值才替换 |
| | | this.formDataFace[prop] = formatter_replace_val(this.formData, null, value, null, format); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | '<div v-if="formAttr.istitle && formAttr.title" class="h_form_title_name">{{formAttr.title}}</div> '+ |
| | | |
| | | '<template v-for="(g, k) in tableFieldsGroup"> '+ |
| | | '<div v-if="g.name && g.name !=\' \' " style="margin: 0;"><i class="iconfont icon-fuzhushuxian" style="color: #0270c1;"></i><span class="h_form_group_name">{{g.name}}</span></div> '+ |
| | | '<div v-if="g.name && g.name !=\' \' " class="h_form_group"><i class="iconfont icon-fuzhushuxian" style="color: #0270c1;"></i><span class="h_form_group_name">{{g.name}}</span></div> '+ |
| | | '<div style="margin: 0; padding-left: 0px">'+ |
| | | '<h-newform-a '+ |
| | | //外部参数 |